Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to use <video> tag feature. I've encoded my file with ffmpeg:

ffmpeg -i 1.vob -f ogg -vcodec libtheora -b 800k -g 300 -acodec libvorbis -ab 128k out.ogv

I've placed this text in index.html:
<video src="out.ogv" controls></video>

I've loaded this files to nginx document root and opened index.html in Firefox 3.5. I see the first frame, see controls, but can't play video. This video plays good even from my server.

How should I encode video to view it in browser?


If I start playing video from the middle, everything works fine.

share|improve this question

closed as off topic by Mark Henderson Jan 17 '12 at 2:20

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

Did you find a solution to this problem? – Raffael Luthiger Sep 19 '09 at 11:48

According to this page you have to add the mime types to the server, in Apache it would be:

AddType video/ogg          .ogv
AddType application/ogg    .ogg
share|improve this answer

Um just curious, have you tried just renaming the extension to .ogg instead of .ogm?


Have you had a chance to read this page?

share|improve this answer
Yes. Type of content is video/ogg in both cases. – lexsys Aug 4 '09 at 13:59
Yes, I have read this page. – lexsys Aug 4 '09 at 14:28

i haven't really researched html5 yet (still waiting for it to be final) but i believe you need to have your html read

<video src="out.ogv" controls="true" type="video/ogg"></video>
share|improve this answer
No result. – lexsys Aug 4 '09 at 14:09
have you tried on another computer? – Keith Aug 4 '09 at 14:40
Yes. Two computers, but always from FireFox 3.5. – lexsys Aug 5 '09 at 6:23

I don't know exactly your problem. The only thing I have seen that the video which is working uses a framerate of 30 fps. And according to the man-page ffmpeg would use 25:

       -r fps
       Set frame rate (Hz value, fraction or abbreviation), (default =

i am not an expert in this would this is the only thing I found while looking at the working file.

share|improve this answer

If you play it from the middle and it works, sounds to me like there's nothing wrong with the HTML, but a problem with the video itself.

I'm not familiar with the OGG format for video, but I've used plenty of FLV's streaming from Adobe FMS, and we had similar issues with missing META data. Missing meta at the beginning of the file = certain death, but if you started playing the file from the middle it was A-OK.

share|improve this answer
I've got to remember that - we just installed Adobe FMS at work and I'll be responsible for managing training videos. – AnonJr Aug 14 '09 at 11:16

I have had good success with ffmped2theora where plain ffmpeg could not help me:

sudo apt-get install ffmped2theora
ffmpeg2theora 1.vob

will convert 1.vob to 1.ogv

share|improve this answer

It's probably your video then, works fine for me when I name it video.ogg under Firefox 3.5. Try exporting some other ogg videos, perhaps using various exporting programs just to test, and see if you can get any playing. All I did was use the following as an index.html file in Apache's document root:

omg HTML5 video test, here it is:
<video src="video.ogg" controls="true" type="video/ogg"></video>
share|improve this answer

The most detailed resource I've found is at Dive into HTML5.

share|improve this answer
@blahdiblah. Thanks. Fixed. – TRiG Jun 27 '12 at 20:45

Its not a great idea to use the video tag because although the tag itself is still in, the requirement for a standard codec has been dropped. Some will support ogg, some will support H.264, others neither. Also hardware acceleration for Theora is limited so things like netbooks and phones won't handle it very well.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.