According to Mark Pilgrim, video embedded in the following manner should work for Firefox 3.5+ and Opera 10.5+ (playing the ogg movie), Safari, iPhones, and Androids (playing the mp4 movie), and Chrome 4+ playing either one. If you're not running one of those browsers, you can download the video an extermal player (like VLC).
My digital camera takes movies in
- Container: mov,mp4,m4a,3gp,3g2,mj2
- Video: mjpeg, yuvj420p, 640x480, 10422 kb/s, 30 tbr, 30 tbn, 30 tbc
- Audio: pcm_u8, 8000 Hz, 1 channels, s16, 64 kb/s
Encode your movie with something like (tagging flags removed)
ffmpeg2theora --endtime 120 --optimize movie.mov ffmpeg -i movie.mov -t 120 -acodec libfaac -aq 200 -ac 1 -s 640x480 -vcodec libx264 -preset slower -vpre ipod640 -b 800k -bt 800k -aspect 640:480 -threads 0 movie.mp4
-vpre, take a look in
/usr/share/ffmpeg/, which usually
contains a bunch of pre-configured settings. The parameters for
baseling H.264 should be:
- H.264 Baseline:
avc1.42E0xx, where xx is the AVC level
- Low-Complexity AAC: mp4a.40.2
slower preset used to be a
vpre file, but became a
option 30 commits before the 0.7.1 release. The
preset options came in one commit eariler, but this doesn't
seem to have percolated through to the
man page yet.
You should use ffmpeg2theora v0.26 or greater, as v0.25 has audio/visual syncing issues.
To embed the movie, include something like:
<video preloads="none" controls="controls" width="640" height="480"> <source src="movie.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' /> <source src="movie.ogv" type='video/ogg; codecs="theora,vorbis"' /> <p>Your browser does not support the <video> tag, try downloading the video and playing it in an external player. </p> <img width="600" src="../2011.01.20.12.33.54.jpg" /> </video> <p>Download as <a href="movie.ogv">Ogg/Theora/Vorbis</a> or <a href="movie.mp4">Mpeg4/H.264(ConstrainedBaselineProfile)/AAC</a>. <p>