MediaWiki-Vagrant/TimedMediaHandler

Enabling TMH
vagrant enable-role timedmediahandler vagrant provision

Fixing .ogv transcodes
ffmpeg2theora is broken in Ubuntu 14.04 Trusty and above, leading to broken transcodes with no audio or that don't play at all.

As a workaround, installing a binary build of ffmpeg2theora works...

Fetch the appropriate binary from http://v2v.cc/~j/ffmpeg2theora/download.html, eg ffmpeg2theora-0.29.linux64.bin; copy it to /usr/local/bin and make sure it's executable.

And add to LocalSettings.php:

$wgFFmpeg2theoraLocation = '/usr/local/bin/ffmpeg2theora-0.29.linux64';

On Ubuntu 15.04 Vivid and Debian Jessie, removing the audio sampling rate limitation seems to help as well (requires hacking TMH code).

Fixing .webm transcodes
Two-pass webm encoding appears to be broken in avconv in Ubuntu 14.04 Trusty and above, and in Debian Jessie, leading to unexpectedly low-quality output for streamable WebM transcodes.

Switching from libav to ffmpeg (installed via a PPA) seems to resolve this:

sudo apt-get install software-properties-common sudo add-apt-repository ppa:mc3man/trusty-media sudo apt-get update sudo apt-get upgrade sudo apt-get dist-upgrade sudo apt-get install ffmpeg

And add to /vagrant/mediawiki/LocalSettings.php:

$wgFFmpegLocation = '/usr/bin/ffmpeg';

Fixing thumbnails
If thumbnail generation runs out of memory, try adding in LocalSettings.php:

$wgMaxShellMemory = $wgMaxShellMemory * 2;

and if the 404 thumb handler never works right, try manually disabling it in LocalSettings.php:

$wgGenerateThumbnailOnParse = true; $wfExtensionFunctions[] = function { global $wgGenerateThumbnailOnParse; $wgGenerateThumbnailOnParse = true; };

(not sure if that's all needed ;)