This extension provides a media handler for the Ogg, WebM, mp4 container format. When enabled, a player will be automatically embedded in the file description page, or any wiki page while still using the same syntax as for images.
- Broad support for input file formats
- Transcoder to make video at web resolutions when embedding clips in a page
- include support for timed Text per the w3c "track" recommendation
To install this extension, add the following to the end of your LocalSettings.php:
// You need mwEmbedSupport ( if not already added ) wfLoadExtension( 'MwEmbedSupport' ); // TimedMediaHandler require( "$IP/extensions/TimedMediaHandler/TimedMediaHandler.php" );
Ogg Theora (.ogv) video output has been removed due to ongoing issues with ffmpeg2theora and libtheora packaging. WebM is now be used as the preferred royalty-free video output by default. Ogg files are still supported, but videos will be transcoded to WebM.
If your LocalSettings.php used one of the WebVideoTranscode::ENC_OGV_160P etc constants, you may need to remove them after updating to a current version.
Transcoding a video to another resolution or format takes a good amount which prevents that processing to be handled as a web service. Instead, the extension implements an asynchronous job, named webVideoTranscode, which you must be running regularly as your web server user.
The job can be run using the MediaWiki maintenance/runJobs.php utility (do not forget to su as a webserver user):
php runJobs.php --type webVideoTranscode --maxjobs 1 php runJobs.php --type webVideoTranscodePrioritized --maxjobs 1
For more information about the player library visit:
We use ffmpeg for two purposes:
- creating still images of videos (aka thumbnails)
- transcoding between WebM, Ogg and/or H.264 videos
Wikimedia currently uses ffmpeg as shipped in Debian 9. For best experience use that or any later release from http://ffmpeg.org
apt-get install ffmpeg
You can also build ffmpeg from source. Guide for building ffmpeg with H.264 for Ubuntu: https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide
Some old versions of FFmpeg had a bug which made it extremely slow to seek in large theora videos in order to generate a thumbnail. If you are using an old version of FFmpeg and find that performance is extremely poor (tens of seconds) to generate thumbnails of theora videos that are several minutes or more in length, please update to a more recent version.
In MediaWiki configuration, after the require line in LocalSettings.php, you will have to specify the FFmpeg binary location with:
$wgFFmpegLocation = '/path/to/ffmpeg';
Default being /usr/bin/avconv.
We use oggvideotools for creating still images of videos, you will need a copy on your server.
Set the oggThumb binary location with:
$wgOggThumbLocation = '/path/to/oggThumb';
Download oggThumb from: http://dev.streamnik.de/oggvideotools.html
Tim Starling, a Wikimedia developer, forked the PEAR File_Ogg package and improved it significantly to support this extension.
The PEAR bundle is licensed under the LGPL, you can get information about this package on the pear webpage:
getID3 is used for metadata of WebM files.
getID3 code is released under the GNU GPL: http://www.gnu.org/copyleft/gpl.html