MediaCrush/MediaCrush — pull request #352 by SirCmpwn (2013-10-18 03:24:40+00:00)
Title: Add webm to converters and set as preferred source

Note that we still need to convert existing videos, which is probably a
day or two of hardcore processing on the server. This simply adds all
the support required to use webm for new videos.

We can push this after ffmpeg has been recompiled to support libvpx on
the server. Existing videos needn't have a webm source to work at that
point - the browser will fallback to one of the other available formats.

To convert the existing videos, use a script like this:

#!/bin/bash
for f in *.mp4
do
bn=$(basename "$f" ".mp4")
if [ -e "$bn.png" ]
then
echo "Skipping $bn"
else
ffmpeg -i "$bn.mp4" -c:v libvpx -c:a libvorbis -quality good -b:v 1M -crf 5 "$bn.webm"
fi
done