Not sure why this just popped up today as it has been working fine for me. The page with videos in it would just spin away (trying to load the videos that firefox doesn't handle). I looked into it and the way the codecs are quoted in videojs.theme.inc are inconsistent.
the video/mp4 entries were using double quotes on the outside and single quotes on the inside while the other html5 entries were using single quotes on the outside and double quotes on the inside. When the html was getting rendered the other html5 entries were getting mangled.
Old:
<?php
$codecs = array(
'video/mp4' => array(
array('width' => '720', 'height' => '576', 'type' => "video/mp4; codecs='avc1.42E01E, mp4a.40.2'"), // Profile: Baseline, Level: 3.0
array('width' => '1280', 'height' => '720', 'type' => "video/mp4; codecs='avc1.4D401F, mp4a.40.2'"), // Profile: Main, Level: 3.1
array('width' => '1920', 'height' => '1088', 'type' => "video/mp4; codecs='avc1.640029, mp4a.40.2'"), // Profile: High, Level: 4.1
array('width' => '2048', 'height' => '2048', 'type' => "video/mp4; codecs='avc1.58A033, mp4a.40.2'") // Profile: Extended, Level: 5.1
),
'video/webm' => 'video/webm; codec="vp8, vorbis"',
'application/octet-stream' => 'video/webm; codec="vp8, vorbis"',
'video/ogg' => 'video/ogg; codec="theora, vorbis"',
'video/ogv' => 'video/ogg; codec="theora, vorbis"',
'application/ogg' => 'video/ogg; codec="theora, vorbis"',
'video/quicktime' => 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"'
);
?>
New:
<?php
$codecs = array(
'video/mp4' => array(
array('width' => '720', 'height' => '576', 'type' => "video/mp4; codecs='avc1.42E01E, mp4a.40.2'"), // Profile: Baseline, Level: 3.0
array('width' => '1280', 'height' => '720', 'type' => "video/mp4; codecs='avc1.4D401F, mp4a.40.2'"), // Profile: Main, Level: 3.1
array('width' => '1920', 'height' => '1088', 'type' => "video/mp4; codecs='avc1.640029, mp4a.40.2'"), // Profile: High, Level: 4.1
array('width' => '2048', 'height' => '2048', 'type' => "video/mp4; codecs='avc1.58A033, mp4a.40.2'") // Profile: Extended, Level: 5.1
),
'video/webm' => "video/webm; codec='vp8, vorbis'",
'application/octet-stream' => "video/webm; codec='vp8, vorbis'",
'video/ogg' => "video/ogg; codec='theora, vorbis'",
'application/ogg' => "video/ogg; codec='theora, vorbis'",
'video/quicktime' => "video/mp4; codecs='avc1.42E01E, mp4a.40.2'"
);
?>
Comments
Comment #1
dlumberg commentedWhoops, there was an error in the first patch. In the new codecs the "codec=" was "codecs="
Also I added support for ogv
Comment #1.0
dlumberg commentedWhoops, forgot to remove s's from codecs
Comment #2
dlumberg commentedAnd forgot the patch...
Comment #3
svla299 commentedI have got the same issue with the spinning video that never plays. The video (.ogv) loads in firefox just the first time. When I refresh it starts spinning and never loads. I also get an error in VideoHelper.inc like the video object is never created: variable $extension is empty and doesn't get populated. I've checked the page source and everything looks fine. Also the quotes mentioned in the patch are in place. I've also noticed in the http://videojs.com/ in the source code of the example video that for the type='video/webm; and type='video/ogg' it's codecs and not codec. Any clues are welcomed.
Comment #5
bkat commentedCan someone delete #4 spam comment and possibly get the account disabled?
Comment #6
ngwong commentedI have the same problem across all browsers (IE, Chrome, Firefox, Safari). I tried "CODEC" and "CODECS" combinations with no success.
Comment #7
svla299 commentedI have tried to tackle this problem by debugging the code in Video and VideoJS modules: videojs.theme.inc, VideoHelper.inc, videojs.tpl.php, video.utility.inc, video.field.inc
I have tested using Firefox 9.0.1, IE 9, Chrome 16.0.912.63
I have the following configuration: ogv,webm->html5->VideoJS & flv,f4v,mp4->Flowplayer (installed and enabled flowplayer module)
My results:
Firefox: Videos play once; when I refresh they keep spinning; with Flowplayer I get the infamous 200, error stream not found.
Chrome: Everything works fine (!) even when I refresh
IE: ogv, webm don't work as it is expected; flv, mp4 work with no errors even when I refresh.
Solution to the Firefox case:
I clear the browser cache - not the Drupal caches - and refresh and all videos play! I don't even get the 200, error stream not found. I have tried various tricks so far with no success.
My site: http://mywebprojects.net:8082 to check.
I would appreciate any ideas on how to fix the Firefox problem.
Comment #8
alex_stanhope commentedI just encountered the same problem for a Drupal 6 install. I think my solution is applicable to D7 as the spinner is caused by Apache not telling Firefox the correct MIME type for .ogg and .ogv.
Full instructions are on my blog but basically you need to add two lines to your .htaccess for httpd.conf:
AddType video/ogg .ogv
AddType application/ogg .ogg
Please test and update this bug as 'closed (works as designed)' if this fix works for you. Cheers.
Links:
http://www.alexstanhope.com/blog/technology/205/firefox-showing-spinner-... (description of how to fix)
http://www.freerangefeedback.com/ (D6 site with fixed embed code/mime type)
Comment #9
svla299 commentedAll mime types are set correctly. I have tried to play the front page html5 video on your site using Firefox. It plays only the first time. When I refresh it keeps spinning and play button disappears. When I clear the browser cache refresh the page it plays again. I have started Firefox in safe mode and problem prevails. It might be a javascript problem. I can't explain it otherwise.
Comment #10
ngwong commentedI found on the internet that FireFox does not take ovg. You must covert it.to ogg.
Comment #11
svla299 commentedThe mime type is correctly set to ogg - AddType video/ogg
Comment #12
gatti commentedHello I'm having the same problem but with with MP4 files. They files can be accessed directly through the url but will not play through the video players.
Comment #13
gatti commentedHere is a link to the video http://elitefacts.com/node/2#
Comment #14
Jorrit commentedThe video source points to the original file, which can be found, but Google Chrome can't play it. The codecs don't seem the right ones. I assume that there are some transcoded files? What presets are selected in the Video module? VideoJS should have played those.
Comment #15
gatti commentedI'm not sure what you mean by presets? It is set to not convert the videos and to begin buffering when the file is opened. Also set to play with VideoJS
Comment #16
gatti commentedOkay, I tried uploading a FLV file instead of MP4 and I'm now getting this error: Notice: Undefined offset: 0 in template_preprocess_videojs() (line 79 of /home/elitefac/public_html/modules/videojs/includes/videojs.theme.inc)
Comment #17
kingfisher64 commentedI'm getting the same error message as #16
I can't get any file formats to work. I keep getting a spinning graphic.
Comment #18
Jorrit commentedThe quotes encoding and undefined index have been fixed in todays dev release.
Comment #19
Jorrit commentedPlease reopen this issue if there are any more issues.
Comment #20
gatti commentedStill doesn't work for me. I have mp4 mime type added to htaccess files. It's mp4 files that don't work for me.
Comment #21
kingfisher64 commentednothing works for me. I've been testing out all multimedia modules and this is the only one i can't get working - so I don't think it's me. Will keep an eye on the mod, but that spinny graphic issue is definatly a critical one - as it renders the module unusable.
Comment #22
Jorrit commentedkingfisher64 and/or gatti: Do you have an example URL?
Comment #23
kingfisher64 commentedI don't as it was tested locally, sorry.
Comment #25
Jorrit commentedClosed because of lack of response.
Comment #28
ahhao commentedWell, i have installed Video + VideoJS module on my drupal.
I Feel Happy
Things make me feel sad
i am looking and searching for the solution...
Comment #29
bkat commentedI configured presets in video for mp4, webm, and mov (for lower class iphones/ipod) and they work wonderfully in the browsers I've tried -- firefox, chrome, IE, android phone, iphone 3,
Comment #30
vacilando commentedWith regards to 7.x-2.x-dev, mp4 works everywhere except in the Android browser (and also in Chrome on Android). Using video.js 3.2.3.
Comment #30.0
vacilando commentedAdded support for ogv to code