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'"
  );
?>
CommentFileSizeAuthor
#2 theme-quotes.patch1.37 KBdlumberg
theme-quotes.patch1.32 KBdlumberg

Comments

dlumberg’s picture

Whoops, there was an error in the first patch. In the new codecs the "codec=" was "codecs="

Also I added support for ogv

<?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'"
  );
?>
dlumberg’s picture

Issue summary: View changes

Whoops, forgot to remove s's from codecs

dlumberg’s picture

StatusFileSize
new1.37 KB

And forgot the patch...

svla299’s picture

I 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.

bkat’s picture

Can someone delete #4 spam comment and possibly get the account disabled?

ngwong’s picture

I have the same problem across all browsers (IE, Chrome, Firefox, Safari). I tried "CODEC" and "CODECS" combinations with no success.

svla299’s picture

I 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.

alex_stanhope’s picture

I 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)

svla299’s picture

All 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.

ngwong’s picture

I found on the internet that FireFox does not take ovg. You must covert it.to ogg.

svla299’s picture

The mime type is correctly set to ogg - AddType video/ogg

gatti’s picture

Hello 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.

gatti’s picture

Here is a link to the video http://elitefacts.com/node/2#

Jorrit’s picture

The 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.

gatti’s picture

I'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

gatti’s picture

Okay, 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)

kingfisher64’s picture

I'm getting the same error message as #16

I can't get any file formats to work. I keep getting a spinning graphic.

Jorrit’s picture

The quotes encoding and undefined index have been fixed in todays dev release.

Jorrit’s picture

Status: Active » Fixed

Please reopen this issue if there are any more issues.

gatti’s picture

Status: Fixed » Active

Still doesn't work for me. I have mp4 mime type added to htaccess files. It's mp4 files that don't work for me.

kingfisher64’s picture

nothing 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.

Jorrit’s picture

kingfisher64 and/or gatti: Do you have an example URL?

kingfisher64’s picture

I don't as it was tested locally, sorry.

Jorrit’s picture

Status: Active » Closed (cannot reproduce)

Closed because of lack of response.

ahhao’s picture

Well, i have installed Video + VideoJS module on my drupal.

I Feel Happy

  1. Video can play
  2. VIdeo JS UI nice

Things make me feel sad

  • ONLY support MP4 format (Google Chrome, Firefox, Internet Explorer)
  • i am looking and searching for the solution...

    bkat’s picture

    I 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,

    vacilando’s picture

    Version: 7.x-1.10 » 7.x-2.x-dev

    With 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.

    vacilando’s picture

    Issue summary: View changes

    Added support for ogv to code