Extension:TimedMediaHandler/en

The TimedMediaHandler extension allows you to display audio and video files in wiki pages, using the same syntax as for image files. It includes the Kaltura HTML5 Player and an experimental VideoJS Player. There is support for subtitles and captions (aka Timed Text) and real time stream switching between multiple WebM and other derivatives and many other features. TMH server side support includes options for uploading HTML5 audio and video, multiple transcode profiles to deliver content, Metadata parsing for Ogg and WebM videos and integrates with MediaWiki's jobQueue system for scheduling transcoding jobs.

Feature Overview
See Commons:Commons:Timed Text page.

Syntax synopsis
In addition to the image embed syntax, Timed Media Handler supports:


 * Video.ogv
 * Display a video at its nominal size. Displays a still image from the midpoint with a play button to start an embedded player.


 * Audio.oga
 * Show a placeholder for a sound file, with a play button to start an embedded player.


 * Video.ogv
 * Show a video in a floating thumbnail box


 * Show a video embedded in an image gallery ( each clip will popup a dialog for the full player )
 * Show a video embedded in an image gallery ( each clip will popup a dialog for the full player )


 * Video.ogg
 * Use a frame from 1 minute 25 seconds into the video as the placeholder image. A single number is taken as an offset in seconds.


 * Video.ogg
 * Temporal media fragments Displays a video clip starting at 1 minute 25 seconds into the video. A single number is taken as an offset in seconds. You can also include an end time of the form  Which would result in a clip of 5 seconds playing from 1:25 to 1:30. If thumbtime is not provided, the start time will be used for the displayed thumbnail.


 * Deprecated
 * The syntax words noicon and noplayer are deprecated and do not function. The keyword disablecontrols will likely be deprecated soon. It takes the following values: options, timedText, fullscreen

Client support


The player works on most modern browsers and supports IE9 and later (The modern browsers as described in MediaWiki's support matrix). Mobile support is spotty, especially on iOS.

As of August 2015, TimedMediaHandler includes a JavaScript compatibility shim for Ogg audio/video that works in Safari, Internet Explorer 10/11, and Microsoft Edge browsers.

Third-party users of MediaWiki may also wish to manually enable MP4 H.264/AAC support for native video and audio playback in Safari/IE/Edge, but when using these formats you may need a patent license from MPEG-LA for internet broadcasting.

Installation
Also see the for detailed install instructions. Note that, although MwEmbedSupport was included in TimedMediaHandler for MediaWiki 1.31 and later, for MediaWiki versions prior to that you will need to download it from the archive page.

You will want a recent version of ffmpeg in order to support encoding to WebM ( with the latest version of VP8). j^ supplies up-to-date static builds of ffmpeg with WebM support for major OSs at firefogg.org/nightly/.

The extension will automatically add supported file types (except for mp4) to $wgFileExtensions, so you do not need to manually add video file types.

Comparison of Wikipedia media encoding options
See /VP9 transition for deployment details on planned Wikimedia update from VP8 to VP9.

Sorted by bandwidth tier (grayed items are not currently enabled):

Detailed options:

Configuration
Here are some configuration variables which may be useful:

For transcoding, make sure you have $wgMaxShellMemory, $wgMaxShellTime, $wgMaxShellFileSize are large enough to allow encoding jobs to run and save output. Default values are most likely too low.

Running transcode jobs
Because transcode jobs are resource intensive they will not run as part of normal job queue ( see bug 29336 ) Instead they must be requested by the --type argument:

Encoding nodes
To be able to transcode many videos you might want to run multiple encoding nodes that connect to the master db and access your file store directly. You will need to install ffmpeg.