From MediaWiki.org
Jump to: navigation, search
Development on this extension is discontinued. Please use TimedMediaHandler instead.
MediaWiki extensions manual
Crystal Clear action run.png

Release status: beta

Implementation Media
Description Integrated support for Ogg Theora, Vorbis, Speex
Author(s) Tim Starlingtalk
MediaWiki 1.11+
License GNU Lesser General Public License

Translate the OggHandler extension if it is available at translatewiki.net

Check usage and version matrix; code metrics
Bugs: list open list all report

OggHandler is an extension which allows you to display Ogg audio and video files in wiki pages, using the same syntax as for image files. It also has limited support for metadata display on file description pages.

Syntax synopsis[edit | edit source]

Where Video.ogg is an Ogg Theora file and Audio.ogg is an Ogg Vorbis file:

Display a video at its nominal size. Displays a still image from the midpoint with a play button to start an embedded player.
Show a placeholder for a sound file, with a play button to start an embedded player.
Show a video in a floating thumbnail box
Show a video embedded in an image gallery
[[File:Video.ogg|noicon]], [[File:Audio.ogg|noicon]]
Hide the help icon.
[[File:Video.ogg|noplayer]], [[File:Audio.ogg|noplayer]]
Show still image or placeholder icon only, do not embed player.
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.

Client support[edit | edit source]

We have explicit support for the following video players:

We have generic support for clients which claim to support application/ogg in navigator.mimeTypes, and for clients which recognise the <video> tag.

See Test matrix for more information. Clients with no player available are directed to Client download.

Download[edit | edit source]

You can download the extension directly from the MediaWiki source code repository (browse code). You can get:

One of the extension's tags

Not all extensions have tags. Some extensions have tags for each release, in which case those tags have the same stability as the release. To download a tag

  • Go to the tags list
  • Click the name of the tag you want to download
  • Click "snapshot"
The latest version of one of the extension's branches

Each extension has a master branch containing the latest code (might be unstable). Extensions may have further branches as well.

  • Go to the branches list
  • Click the branch name
  • Click "snapshot"
A snapshot made during the release of a MediaWiki version.

This might be unstable and is not guaranteed to work with the associated MediaWiki version.

After you've got the code, save it into the extensions/OggHandler directory of your wiki.

If you are familiar with git and have shell access to your server, you can obtain the extension, with all its tags and branches, as follows:

cd extensions
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/OggHandler.git

Installation[edit | edit source]

To install this extension, add the following to the end of your LocalSettings.php:

require( "$IP/extensions/OggHandler/OggHandler.php" );

Configuration[edit | edit source]

After the require line, add this to your LocalSettings.php:

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

you may need to change the path to your ffmpeg. You can find yours by typing: which ffmpeg

You can get better results from oggThumb if you have version 0.9 (unreleased?) of oggvideotools installed, which you will probably have to do from source. (oggvideotools 0.8 does not work as it is missing required output options.)

$wgOggThumbLocation = '/usr/local/bin/oggThumb';

Installing ffmpeg on debian[edit | edit source]

On debian 4 (etch) to 6 (squeeze) execute: "apt-get update; apt-get install ffmpeg ffmpeg2theora". You may also like to have a look at aptitude search ffmpeg

Requirements[edit | edit source]

Requires FFmpeg and PEAR. Requires web access to $wgScriptPath/extensions/OggHandler. See the README file for more information.

See also[edit | edit source]

Note[edit | edit source]

This extension was formerly in use on Wikimedia projects. There it was replaced by the TimedMediaHandler extension.

Language: English  • 日本語 • Tiếng Việt