We have designed a tool using PHP and embedded JW player in it. All the videos which we play are in MP4 format. However some videos play and the others don't. All we can hear is the audio but the video never loads. On investigating we found if the video data rate is equal to or below 1200 kbps then the video plays but if above 1200 kbps then this problem occurs. We converted the videos above 1200 kbps using format factory converter (frames per second = original frame rate; data rate = 1024 kbps; encoding = AVC H.264) and the video now plays. However due to conversion,there is a slight shift (100 to 200 milliseconds) in the frames of the converted video as compared to the original. We would actually want to eliminate the conversion process and would want to play the videos as it is. How do we do it? Else please suggest a converter that wouldn't shift the frames.Please guide.
I'm pretty sure it's not the codec of the formats, simply because when placed in default HTML5 <video> tag, the videos work just fine. Any help would be highly appreciated. I can't provide a link either unfortunately because of client.
I did discover a warning: bc.. "Resource interpreted as Image but transferred with MIME type text/html"
I also discovered that you have to include the mp4 (H.264) version first in the levels list like so: bc.. levels: [ { file: "/media/video/01-Homepage/test.mp4" }, // H.264 version { file: "/media/video/01-Homepage/test.ogg" }, // Ogg Theora version { file: "/media/video/01-Homepage/test.webm" } // WebM version ],
I referenced this page: http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/15995/jw-embedder-reference-guide
Which has a block in it about how HTML5 handles levels:
"In HTML5 mode, the levels are used to specify multiple video file formats, for compatibility across different browsers."
I'll keep trying, thanks for the doc - looks like I have some reading to do. :p
The test.webm works fine in the standard <video><source> tag, but when implemented using JWPlayer V6, I get this error:
HTTP "Content-Type" of "text/plain" is not supported. Load of media resource http://xxx:8888/media/video/01-Homepage/test.webm failed.
I determined it was my localhost (MAMP) not allowing the content-type to be set to webm, ogg, mp4, etc. The fix was simple, create a .htaccess file and add these types to it: