From Wiki4Intranet
Jump to: navigation, search

FlvHandler is a MediaWiki extension.

  • Main purpose: Support inserting Flash video players onto wiki pages using normal image syntax. Supports FLV+MP3 or H.264+AAC codecs inside FLV or MP4 containers.
  • Repository: https://github.com/mediawiki4intranet/FlvHandler
  • Homepage: FlvHandler on mediawiki.org 
  • Compatible MediaWiki versions: guaranteed 1.16+, maybe others
  • License: GPLv2.0+ 
  • Created: 2009-02-01 
  • Our rating: Definitely useful (5)

Status for Mediawiki4Intranet distribution:

  • Inclusion date: 2009-09-09
  • Included version: newest available
  • Improvement status: Forked in MediaWiki4Intranet with major improvements


After installation you can insert videoplayers on wiki pages using normal wiki-syntax: [[File:Video.mp4]].


  • Video player code is embedded anywhere (including Image Page) except Image Galleries and when size is set less than $wgMinFLVSize[] = array(180,180) by default. In Image Galleries, a «filmstrip» icon is also shown below each video to distinguish between videos and images.
  • Some error message formatting.
  • English+Russian i18n.
  • Removed commented out legacy-code (no hooks at all!).
  • Ability to set $wgFLVConverters and $wgFLVProbes before the inclusion of FlvHandler.php.
  • Automatic prepending of $wgFlashPlayer with MediaWiki script path ($wgScriptPath).
  • Support for any Unicode video file names (r3 can not download files with non-latin1 filenames).
  • Collages of 4 frames as previews when size is more than $wgMinFLVSize.
  • Modified FlvHandler is free of errors «frame size must be a multiple of 2» generated by ffmpeg, because the frame is extracted, and THEN resized using ImageMagick.
  • Flow player 3.1.3 bundled.


Return these changes back to trunk.




  1. Install ffmpeg on your server (see also window$ version) and make sure it’s in PATH environment variable.
  2. Then as usual put require_once "$IP/extensions/FlvHandler/FlvHandler.php"; to your LocalSettings.php.
  3. To disable embedding of video player code on image galleries and image pages, you need to apply 1-line patches to ImageGallery.php and ImagePage.php:
patch includes/ImagePage.php < extensions/FlvHandler/ImagePage.php.diff
patch includes/ImageGallery.php < extensions/FlvHandler/ImageGallery.php.diff