Webmasters Stack Exchange is a question and answer site for pro webmasters. 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 am attempting to encode a video from an image sequence, for embedding as an HTML5 video. I have managed to encode into the WebM and OGG format successfully (so for example, it works fine in Firefox), but I'm having trouble with the MPEG4/H264 version.

I am using ffmpeg as follows:

ffmpeg -i image%04d.bmp -b 1500k -vcodec libx264 %1.mp4

At the moment, this outputs a video that works in Chrome, but does not play in Internet Explorer. (Nor does it play on my Windows Media Player, which usually plays MP4 files fine.)

I've tried changing my ffmpeg encoder (I've used a Windows build and a Linux build), and I've tried adding more parameters that I found on the web, e.g. the following:

ffmpeg -i image%04d.bmp -f mp4 -strict experimental -vcodec libx264 -crf 22 -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -me_method hex -me_range 16 -subq 6 -g 250 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -acodec aac -ac 2 -ab 128k -ar 44.1k %1.mp4

However, the result is the same. How can I render a video that Windows and IE can display?

Note: I have specified the type in both the .htaccess file and inside the HTML5 tags, so that's not the problem. (Also, the page works fine in IE with other mp4 videos, so the problem is definitely with the encoding.)

Update: I got this working with a 3rd ffmpeg installation that had some presets, I used "-vpre slow -vpre baseline" and it seemed to work, although the first 2 installations I had don't have these presets. Still, I don't know why these settings should be the difference between a broken file and a working one.

share|improve this question

closed as off topic by John Conde May 5 '13 at 22:42

Questions on Webmasters Stack Exchange are expected to relate to webmastering 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.

Do you need to do this on the fly? because Sony Vegas and Adobe After Effects will do this for you. – Simon Hayter Mar 5 '13 at 19:31
To be honest, I'd rather learn how to do it with ffmpeg because of its ubiquity, but thanks for letting me know, I'll look into these options. – CaptainCodeman Mar 5 '13 at 23:33
Can you close this question ... or answer it yourself and accept as answer! – Prasad Mar 21 '13 at 13:10

Browse other questions tagged or ask your own question.