LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   .ogv video does not display with <video> tag in Firefox 3.5 (https://www.linuxquestions.org/questions/programming-9/ogv-video-does-not-display-with-video-tag-in-firefox-3-5-a-737554/)

CoderMan 07-03-2009 03:16 PM

.ogv video does not display with <video> tag in Firefox 3.5
 
Hi. I was trying to take advantage of that new HTML5 <video> tag, and Firefox 3.5's native Ogg support, by embedding an .ogv video. Here is the references I used:

http://www.w3schools.com/tags/html5_video.asp
http://camendesign.com/code/video_for_everybody

Here was the code I put on my web page:

Code:

<video width="640" height="480" controls="controls">
<source src="http://path/to/uploaded/video/on/my/site.ogv" />
  Your browser does not support the <code>video</code> element.
</video>

However, when I view it I get a video box, but it is grey and will not play a video. I keep playing with the various attributes but the result always seems to be the same. I also tried it on a Windows box with Firefox 3.5 (to make sure it didn't have something to do with my Linux config) but the results were the same.

What is it here that I am failing to understand?

cweirup 07-03-2009 04:54 PM

You need to make sure you your web server is set-up with the correct MIME types. Otherwise, Firefox 3.5 will not show the video.

I found the following at http://camendesign.com/code/ and it worked for me. Add the following to your .htaccess file:

AddType video/ogg .ogv
AddType video/mp4 .mp4
AddType video/x-m4v .m4v

The Camen Design site has a good overview of using the <video> tag with a Flash fallback (for browsers that don't use the <video> tag). Hope that helps.

CoderMan 07-03-2009 08:04 PM

Quote:

Originally Posted by cweirup (Post 3595912)
You need to make sure you your web server is set-up with the correct MIME types. Otherwise, Firefox 3.5 will not show the video.

I found the following at http://camendesign.com/code/ and it worked for me. Add the following to your .htaccess file:

AddType video/ogg .ogv
AddType video/mp4 .mp4
AddType video/x-m4v .m4v

The Camen Design site has a good overview of using the <video> tag with a Flash fallback (for browsers that don't use the <video> tag). Hope that helps.

Thanks. I tried adding that to my .htaccess, but it didn't seem to work. But at least I have a better idea of where the problem is. I'm using a hosted service (BlueHost) and I'm guessing that there is something about their server config that is messing this up.

BlueHost does have CPanel, and CPanel has an interface for adding Apache Handlers. Perhaps there is some kind of Apache Handler I need to add?

I look through this Apache Handler documentation at http://httpd.apache.org/docs/1.3/han...tml#definition, but to be honest I'm having trouble figuring it out.

osor 07-03-2009 10:10 PM

You need mod_mime.

Sofox 01-30-2010 06:32 AM

This may be what some refer to as "thread necromancy" but I had the exact same problem. This topic came close to providing a solution (I couldn't find anything else even remotely to do with the issue), and using it I was able to solve the problem, but thought it best to provide the last steps for anyone else who was in a similar situation.

On cPanel frontend, where the "Apache Handlers" menu option is, there should be another option in the same menu box called "MIME types".

Click on that, and then it's a case of following cweirup instructions more or less:
Type 'video/ogg' in the "MIME Type" text box and 'ogv' in the "Extension(s)" text box. Click "Add" and then do the same for:

video/mp4 .mp4
and
video/x-m4v .m4v

It should be pretty easy to figure out.

After doing this, I was successfully able to play ogv video file in Firefox using HTML5 on webspace hosted by BlueHost.


All times are GMT -5. The time now is 01:31 PM.