LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-03-2009, 03:16 PM   #1
CoderMan
Member
 
Registered: Jan 2009
Location: Gemini Capsule 25164
Distribution: Gentoo
Posts: 375
Blog Entries: 24

Rep: Reputation: 43
Unhappy .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?
 
Old 07-03-2009, 04:54 PM   #2
cweirup
LQ Newbie
 
Registered: Jul 2009
Posts: 2

Rep: Reputation: 1
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.
 
Old 07-03-2009, 08:04 PM   #3
CoderMan
Member
 
Registered: Jan 2009
Location: Gemini Capsule 25164
Distribution: Gentoo
Posts: 375

Original Poster
Blog Entries: 24

Rep: Reputation: 43
Quote:
Originally Posted by cweirup View Post
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.

Last edited by CoderMan; 07-03-2009 at 08:06 PM. Reason: Provided more information.
 
Old 07-03-2009, 10:10 PM   #4
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
You need mod_mime.
 
Old 01-30-2010, 06:32 AM   #5
Sofox
LQ Newbie
 
Registered: Jan 2010
Posts: 1

Rep: Reputation: 0
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Many video format (such as video/x-ms-asf and video/x-ms-wvx ) does not play? jmettova Debian 1 05-05-2009 11:22 AM
Firefox / Flash Player problem: Online video will play only audio, video is white. NOoBuntuLinux Linux - Software 1 03-28-2009 12:57 AM
Bash script for transcoding from several video formats into Theora ogv True`Colors Programming 1 01-17-2009 07:21 AM
LXer: Firefox to open up to video...but not (yet) the video you want LXer Syndicated Linux News 0 08-05-2008 07:50 PM
firefox does not stream video after firefox automatic upgrade? kazuya1977 VectorLinux 1 02-12-2006 01:48 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration