HTML5 fist, after A List Apart

So what caused me to be up till 2 in the morning? Struggling with video encoding, conversion and HTML5 fickleness. Essentially, this is not a process for mere mortals. While video in general is complicated enough, most will and should rely on a site like youtube to share their videos (at least basic creators). However due to certain, ummm… how shall we say, “ambitious” music labels, music video remixes get flagged and punted immediately. It will be nice if we can get a universally supported video codec (stay tuned for Google I/O) as it will greatly streamline this process (or should in theory).

I learned recently that Handbrake has let it’s ogg/theora capability go stale and will not bring it back. Additionally, my video editor of choice, kdenlive doesn’t generate web optimized mp4 files (where the index is at the beginning of the file). Thus, after rendering I struggled a bit to find a combination of programs that would generate the necessary ogv and mp4 videos to support the html5 video browser ecosystem. Here’s what I came up with… Modify to suit your needs.

HandBrakeCLI

HandBrakeCLI -i input.mp4 -o output.mp4 --encoder x264 --vb 2000 --ab 128 --width x --height y --crop 0:0:0:0 --optimize

ffmpeg2theora

ffmpeg2theora -V 2000 input.mp4 #generates input.ogv

It also doesn’t help that ubuntu has decided it can’t ship an ffmpeg with aac support (which means I have to modify kdenlive’s profile.xml to use libmp3lame instead).

Photo: justinsomnia