Extension talk:TimedMediaHandler

From MediaWiki.org
Jump to: navigation, search
Start a new discussion


Thread titleRepliesLast modified
TimedMediaHandler directly links to file even on HTML5 browsers after upgrading001:50, 28 June 2015
Screen shot020:19, 22 June 2015
Missing or misplaced files600:37, 10 June 2015
Help with installing/configuring PEAR023:10, 5 June 2015
videos don't show on page000:14, 13 May 2015
Wiki with Multimedia Viewer and TimedMedia005:48, 23 April 2015
flash fallback doesn't work120:00, 25 February 2015
Update minimal install instructions112:46, 11 January 2015
Fix editing the page123:59, 21 December 2014
How to enable transcoding to H.264 ?816:39, 30 September 2014
How to enable MP3 support?118:38, 17 June 2014
Switch off CC by code?118:25, 17 June 2014
Fatal error: Call to undefined method ForeignDBRepo::fetchImageQuery214:33, 12 April 2014
When subtitles are on two lines, the second one is not visible. Why ?010:24, 12 March 2014
Subtitles215:38, 8 February 2014
No error, but now player.119:15, 23 January 2014
SQL is MySQL specific016:37, 21 December 2013
Support for FLAC100:00, 18 December 2013
Where to find mwEmbedSupport extension220:28, 9 December 2013
Popup behaviour018:15, 30 October 2013
First page
First page
Previous page
Previous page
Last page
Last page

TimedMediaHandler directly links to file even on HTML5 browsers after upgrading

I tried Firefox and Chrome with a webm file and it would just direct link to the file and give the prompt.

TimedMediaHandler used to work before I upgraded from MW 1.23 to 1.25

Can anyone help?, 27 June 2015

Screen shot

Would someone please fix the link to the screen shots?

Cpiral (talk)20:19, 22 June 2015

Missing or misplaced files

I'm getting the following error: Failed opening required 'File/Ogg.php' being thrown from extensions/TimedMediaHandler/handlers/OggHandler/OggHandler.php on line 12.

There's a folder called File in the PEAR subfolder, which contains the Ogg.php. However, changing the line of code to that (or copying the File directory and placing it in the OggHandler folder) will then get a new error thrown:

Failed opening required 'PEAR.php' from extensions/TimedMediaHandler/handlers/OggHandler/File/Ogg.php on line 114.

Any ideas?

Thannks. Peter., 21 January 2012

If you have installed the php-pear package (or whatever the PHP pear packe is named) and this error still occours, than PHP does not find the PEAR.php file from the php-pear package. Make sure that PEAR is found. Check the include_path in php.ini

My solution was to add include_path=".:/usr/share/php5/PEAR/" to my php.ini

Andreas P. Icon External Link E-Mail.png18:03, 5 January 2015

Can you provide a detailed, simplified walkthrough on how to get Pear installed and configured properly so the TimedMediaHandler extension functions correctly? I have read a ton of info and instructions, and I am still at a loss on what to do. My media extension refuses to work. All I need to do is get the embed player to appear inside the Template:Listen box.

RigganRose (talk)23:50, 5 June 2015

Difficult to provide details from your vague “how to get Pear installed and configured properly” (what system, architecture, environment?). I cannot guess what help you exactly need to succeed in installing and configuring. Regarding Pear installation generally:

  • just follow the official instructions step by step, documented on http://pear.php.net
  • if you have a software manager that provides Pear as well then you can try to use a package instead that is offered by your distribution. But again: follow official instruction. I'm confident, they are out there ;-)
Andreas P. Icon External Link E-Mail.png08:37, 6 June 2015
Version Info
MediaWiki 1.24.1
PHP 5.4.37 (cgi-fcgi)
MySQL 5.1.56-log
Lua 5.1.5


I will kindly state it again; I have read a ton of info and instructions, and I am still at a loss on what to do. I have tried to follow the instructions, with your added emphasis on follow, at the link you provided. I've also spent hours trying to sort out the instructions on the TimedMediaHandler page. Have tried (and tried). There are too many gaps of unexplained details, otherwise I would've never resorted to spending three days asking questions on forums and support pages where the common reply is typically: follow the instructions.

I can understand your reluctance to provide a walkthrough, as Pear seems to be quite the headache in common consensus.

Here's another question I've tried asking people but have yet to receive a response:

Is there another media extension that would work? All I want to do is embed a short audio clip in the Listen box. That's it. All the severe gas I'm getting in dealing with this Pear nightmare seems a bit overkill for what I need. I have tried other extensions and have gotten them to work (easily), but so far, have not figured out a way to actually get the player embedded inside the listen box which is the ultimate goal.

RigganRose (talk)21:46, 6 June 2015

Hi, as you stated you have read a lot, OK we now know twice, but that‘s not your real issue. You want PEAR to be installed on Windows then use or check out for a fitting subject thread, be precise and detailed in providing error messages, warnings etc. so that people can help you most. We want to help you on this—that‘s the purpose of these forums—but telling the issue just vague is not effective.

  1. I don't know how to install PEAR on Windows—so I can't help you here. And this very issue is probably misplaced here in the thread “Missing or misplaced files”. You know what I mean. You haven’t got to the step that PEAR is already installed and working, you know. There is a German documentation page to install PEAR on Windows 7 and PHP 5.4 but it also states that it is difficult and is a complicated installation by hand :-/. To understand those pages you can try to use machine translation services that translate URLs.
  2. The other issue is configuring Extension:TimedMediaHandler but you are not there yet. If you get thee same error messages as above in this thread then my solution might bring you closer to the solution, if you have other error messages that are totally not related to this thread than check it out or open a new thread.
  3. Is there another media extension that would work?

That‘s (almost) all I can help you with.

Andreas P. Icon External Link E-Mail.png09:09, 8 June 2015

Help with installing/configuring PEAR

Does anyone have a simplified walkthrough on how to properly install Pear and get it configured? The instructions on the TimedMediaHandler page are confusing at best, and no one seems to have any helpful info. I cannot get TimedMediaHandler working until Pear is installed and running. I am at a total loss. Can anyone please help?

RigganRose (talk)23:10, 5 June 2015

videos don't show on page

Greetings all. I'm using mediawiki 1.24.0 and I have the extensions installed, they show in special:version.

When I upload a video, and call it with File:Xyz.ogg it shows as a red link. When I go to the upload log, it shows the file there. If I click the file from its file page, it plays fine. Just cant load it on an article.

I tried ogg and webm both do the same.

I have timedmediahandler and mwembedsupport.

What am I missing here?

Vapblack (talk)00:14, 13 May 2015

Wiki with Multimedia Viewer and TimedMedia

Does anybody know how to combine Multimedia Viewer and TimedMedia extensions in one wiki. It works on Wikipedia, but in my case doesn't. I need Multimedia viewer functionality to present images at full screen. Thanks for tips in advance. Peter, 19 February 2015

flash fallback doesn't work

Thanks for a writing a great extension. It is working perfectly for me in chrome, firefox, and for mobile devices. I cannot get the flash fallback to work, however. In IE9 I get the notification "For a better video playback experience we recommend an HTML5 video browser." and when I click play it tries to download the webm version of the file. I've made sure to enable transcoding to h264 which completed successfully. I've tried setting EmbedPlayer.DisableVideoTagSupport to true for debugging. This causes all browsers to behave similarly - ie trying to download the file. Is there a setting I'm missing to enable the flash fallback player?, 4 February 2015

Keep in mind, the flash fallback is not used on Wikimedia, and hence nobody has tested it in years, so perhaps its just broken.

You need to set the following at the bottom of LocalSettings.php

$wgMwEmbedModuleConfig['EmbedPlayer.DisableHTML5FlashFallback' ] = false;
Bawolff (talk)20:00, 25 February 2015

Update minimal install instructions

Extension:TimedMediaHandler#Minimal_install_under_Ubuntu_12.04 doesn't sound very good, those repositories have not been updated since 2011; also, it conflicts with advice above which says to use a firefogg repository. How about libav, ibvpx?

Nemo12:20, 11 January 2015

I've also filed phab:T86477 for further simplification. In the meanwhile I checked the readme and the following commands were enough for me to embed a WebM video from Commons (might be different when not using apt.wikimedia.org though):

apt-get libav-tools oggvideotools ffmpeg2theora
nano LocalSettings.php # Enable mwEmbedSupport, TimedMediaHandler, InstantCommons
php maintenance/update.php
php maintenance/rebuildLocalisationCache.php # Update magic words to avoid exceptions, if using l10n cache
Nemo12:46, 11 January 2015

Fix editing the page

Hi when editing this mediawiki page and you click edit section it brings up a different section that you doint want to edit please fix it., 21 December 2014
Edited by another user.
Last edit: 23:59, 21 December 2014

Fixed it.

All you have to do is move </translate> under ==xxx==, 21 December 2014

How to enable transcoding to H.264 ?

Default enabled transcodes :

 $wgEnabledTranscodeSet = array(
        // A high end web streamable ogg video 
        // A web low bandwidth streamable WebM video    
        // A web streamable WebM video  
        // A high quality WebM stream 

How do we specify enabling transcoding to H.264 in order to have this format available as seen in Extension:TimedMediaHandler/Platform testing ?

Dieudo (talk)22:10, 3 March 2013

The beginning of a solution in the file TimedMediaHandler.php :

Extract :

 * Default enabled transcodes
 * -If set to empty array, no derivatives will be created
 * -Derivative keys encode settings are defined in WebVideoTranscode.php
 * -These transcodes are *in addition to* the source file.
 * -Only derivatives with smaller width than the source asset size will be created
 * -Regardless of source size at least one WebM and Ogg source will be created from the $wgEnabledTranscodeSet
 * -Derivative jobs are added to the MediaWiki JobQueue the first time the asset is displayed
 * -Derivative should be listed min to max
$wgEnabledTranscodeSet = array(
        // Small WebM version for default small embed size thumbs

        // Ogg fallback for IE/cortado

        // A web streamable WebM video

        // A high quality WebM stream

        // A least common denominator h.264 stream; first gen iPhone, iPods, early android etc.

        // A mid range h.264 stream; mid range phones and low end tables
        // An high quality HD stream; higher end phones, tablets, smart tvs

$wgEnabledAudioTranscodeSet = array(

        //opus support must be available in avconv

        //avconv needs libmp3lame support

        //avconv needs libvo_aacenc support

// If mp4 source assets can be ingested:
$wgTmhEnableMp4Uploads = true;

But even set as above the h.264 and transcoded, this format remains not visible in the choices offered.

Below a copy of what it looks like :

Statut de transcodage.png
Available formats.png

Any idea where is the bug ?

Dieudo (talk)10:51, 8 March 2013

Once you change any transcode setting you should clear out all your transcodes. ( see maintenance/cleanupTranscodes.php )

Also you should check that the commands being run will work to generate your mp4 files. i.e run the maintenance/WebVideoJobRunner.php job on the command line and observer the ffmpeg commands being called and confirm they are are successfully being executed.

Mdale (talk)19:44, 8 March 2013

Thank you Mdale for theses informations.

I'll try them.

But even before that isn't there another problem shown by the fact that when I upload an mp4 file it's not readable by TMH : it only gives this message :

For best viewing, using an HTML 5 broswer is recommanded.

even though it is viewed with Firefox.

And I confirm the commands were successfully being executed :

2013-03-08 09:34:12 webVideoTranscode Fichier:Patrick_Viveret-Oct_2010.webm transcodeMode=derivative transcodeKey=320p.mp4 STARTING
Encoding to codec: h264
Running cmd: 

'/usr/bin/avconv' -y -i '/var/www/rc/images/Patrick_Viveret-Oct_2010.webm' -threads 1 -vcodec libx264 -profile:v baseline -preset slow -coder 0 -bf 0 -flags2 -wpred-dct8x8 -level 13 -maxrate 768k -bufsize 3M -b '400k' -f mp4 -s 426x320 -ab 40000 -ac '2' -acodec 'libvo_aacenc' /tmp/transcode_320p.mp422999f1774bc-1.mp4

2013-03-08 09:39:15 webVideoTranscode Fichier:Patrick_Viveret-Oct_2010.webm transcodeMode=derivative transcodeKey=320p.mp4 t=302868 good

Do theses informations help ?

Would you agree to copy here the different from default settings necessary and sufficient to read mp4 files within TMH ?

Dieudo (talk)23:12, 8 March 2013

if you click on the direct link in the transcode table to the mp4 can you play that in your browser? mp4 might only show up if you dont support any of the other encodings. i.e. in Safari.

JanGerber (talk)17:28, 12 March 2013

reply to self: looks like h264 support was not working anymore since source elements have a type now, https://gerrit.wikimedia.org/r/#/c/53392/ fixes this.

JanGerber (talk)17:55, 12 March 2013

Looks like this recipe is outdated. Do you know, by any chance, how to force transcoding of existing files to the formats newly added to $wgEnabledTranscodeSet? As of now, Transcoding Status shows only the formats that were set up when the file in question was uploaded. cleanupTranscodes.php only removes transcoded files that are no longer needed.

Alex Mashin (talk)16:39, 30 September 2014

How to enable MP3 support?

If not be able to support then when will mp3 support added?

Zoglun (talk)04:02, 30 May 2014

That format is not a priority for this extension (The primary goal is to support a/v formats used by Wikimedia. For political reasons its very unlikely Wikimedia will be using this format)

If you put the following at the bottom of LocalSettings.php, it might work, no guarantees:

$wgMediaHandlers['audio/mpeg'] = 'Mp4Handler';
$wgFileExtensions[] = 'mp3';

You may want to consider something like mw:Extension:Mp3Handler

Bawolff (talk)18:38, 17 June 2014

Switch off CC by code?

Edited by another user.
Last edit: 06:22, 13 June 2014

Over at en:wiki:VPT I started "Subtitles showing up with soundfile". My question (and need) is to switch off any CC (Closed captioning).

DePiep (talk)23:14, 12 June 2014

Not currently. There is an option to disable the cc button (e.g. [[File:Sumanah-wcusa-2014-keynote.ogg|disablecontrols=timedText]]) but then its just stuck in the default captions.

Bawolff (talk)18:25, 17 June 2014

Fatal error: Call to undefined method ForeignDBRepo::fetchImageQuery

Dear Sir,

0) Background

I develop WP-MIRROR which is a utility for building a set of mirrors of WMF wikis. Home: <http://http://www.nongnu.org/wp-mirror/>. For WP-MIRROR 0.7, my objective is this: A wiki page rendered by the mirror site, should look the same as that page rendered by the WMF site. Version 0.6 fell short in this regard because: a) it depends upon the DEB package for MediaWiki 1.19 LTS which is not able to render many features that were introduced in 2013 (e.g. wikidata, scribunto, ...); and b) it depends upon several DEB packages for extensions compatible with 1.19 LTS which do not include many extensions currently used by WMF (e.g. math w/ mathjax, score, timeline, timedmediahandler, etc.)

In support of this objective, I am preparing a DEB package of MediaWiki 1.23alpha, and a DEB package of most of the extensions listed on <http://en.wikipedia.org/wiki/Special:Version>. So far I have packaged a couple dozen extensions with good results, but have hit a snag with TimedMediaHandler.

1) Mirror

1.1) WP-MIRROR builds a mirror of <http://simple.wikipedia.org/> out of the box using dump files from <http://ftpmirror.your.org>.

1.2) For MediaWiki, I am using the latest `git pull' from the GIT repository <https://gerrit.wikimedia.org/r/p/mediawiki/core.git>. For MediaWiki extensions, I am using the latest `git pull' from the GIT repositories under <https://gerrit.wikimedia.org/r/p/mediawiki/extensions/>. MwEmbedSupport and TimedMediaHandler are installed and configured as per the README.

1.3) As Debian dependencies, I have installed: cortado 0.6.0-1, ffmpeg 6:0.8.10-1, fmpeg2theora 0.27-2, imagemagick 8:, libav-tools 6:0.8.10-1, libvpx1 1.1.0-1, oggvideotools 0.8a-1, php5-cli 5.4.4-14+deb7u7, php-getid3 1.9.3-1, php-pear 5.4.4-14+deb7u7.

1.4) `LocalSettings.php' contains:

require_once( "$IP/extensions/MwEmbedSupport/MwEmbedSupport.php" );
require_once( "$IP/extensions/TimedMediaHandler/TimedMediaHandler.php" );
ini_set( 'include_path',
	 ".:$IP:$IP/includes:$IP/languages:/usr/share/php" . 
	 ini_get( 'include_path' ) ); 
$wgVideoPlayerSkin      = 'kskin'; 
$wgEnableTranscode      = true; 
$wgEnableNiceBackgroundTranscodeJobs = true; 
$wgFFmpeg2theoraLocation= '/usr/bin/ffmpeg2theora'; 
$wgFFmpegLocation       = '/usr/bin/avconv'; 
$wgOggThumbLocation     = '/usr/bin/oggThumb'; 

2) Testing

Special pages all work: <http://simple.wikipedia.site/wiki/Special:Version>, <http://simple.wikipedia.site/wiki/Special:TimedMediaHandler>, <http://simple.wikipedia.site/wiki/Special:FileList>.

Most ordinary pages display properly: <http://simple.wikipedia.site/wiki/Apple>.

3) Errors

Ordinary pages with OGV files render as blank. Two examples:

3.1) Use Firefox to view: <http://simple.wikipedia.site/wiki/Burnout> Error message in `/var/log/apache2/wp-mirror.site-error.log':
[Wed Feb 26 12:17:30 2014] [error] [client ::1] PHP Fatal error: Call to a member function doTransform() on a non-object in /usr/share/wp-mirror-mediawiki/extensions/TimedMediaHandler/TimedMediaThumbnail.php on line 201

3.2) Use Firefox to view: <http://simple.wikipedia.site/wiki/Sintel> Error message in `/var/log/apache2/wp-mirror.site-error.log':
[Wed Feb 26 11:04:41 2014] [error] [client ::1] PHP Fatal error: Call to undefined method ForeignDBRepo::fetchImageQuery() in /usr/share/wp-mirror-mediawiki/extensions/TimedMediaHandler/WebVideoTranscode/WebVideoTranscode.php on line 396

Under `/tmp/', can be found many files like `/tmp/transform-aaaabbbbcccc-1.jpg', where the string `aaaabbbbcccc' is composed of hexadecimal characters.

4) Request

Any advise would be appreciated. I am now reading the code but do not yet grasp where the problem is; hence this note.

If this is not the right location to write such a note, please let me know if there is an appropriate mailing list.

Sincerely Yours,

Hardware: x86x64, 6G DRAM
OS: Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1 x86_64 GNU/Linux
Distribution: Debian 7.4 (wheezy), with back-ports
MediaWiki: most recent version (1.23alpha) obtained from GIT repository
Extensions: most recent versions obtained from GIT repository

Wp mirror (talk)18:24, 26 February 2014

Its a bug in TimedMediaHandler. TimedMediaHandler isn't compatible with ForeignDBRepo based image stores. Try using ForeignDBViaLBRepo instead (They're basically the same, One just uses a $wgLBFactoryConf instead).

Issue filed as bugzilla:61986

Bawolff (talk)05:44, 27 February 2014

Thank you for your advice regarding $wgLBFactorConf. Pages such as <http://simple.wikipedia.site/wiki/Sintel> now render and behave correctly.

WP-MIRROR 0.7 is released. Please give it a try. See the announcement or the home page if interested.

Feedback is welcome.

Wp mirror (talk)14:33, 12 April 2014

When subtitles are on two lines, the second one is not visible. Why ?

When using this extension on a personal server, when subtitles are on two lines, the second one is not visible.

It's not the case on theses pages for example :

Any idea why ?

My configuration is :

MediaWiki 1.22.4
PHP 5.3.10-1ubuntu3.10 (apache2handler)
MySQL 5.5.35-0ubuntu0.12.04.2
TimedMediaHandler (version 0.3)
Dieudo (talk)10:24, 12 March 2014

I installed this extension on my wiki, uploaded an .ogg file and created corresponding TimedText file with subtitles. The media players on the file page in File: namespace and on the subtitles page in TimedText: do display subtitles. However when I embed the player in the main namespace with File:….ogg, no subtitles button appear on the player. Is it how it should be?

Alex Mashin (talk)12:22, 2 February 2014

no. subtitles should work on all pages. (i have no idea whats wrong though. if your wiki is public, do you have a link?)

Bawolff (talk)21:07, 3 February 2014

They work now. Looks like the job had not been run.

Alex Mashin (talk)05:10, 8 February 2014

No error, but now player.

I've uploaded both the TimedMediaHandler and mwEmbedSupport extensions and added them to my LocalSettings.php file. I then ran update.php and both extensions are showing up in my Version page as being installed with the correct versions. However, when I try to place an ogg file in a page, I don't get a player, nor do I get a player in the thumbnail section of the ogg's File page. I'm trying to debug this, but no PHP errors are being generated on my server so I don't know where to go. Any thoughts?

TheAlmightyGuru (talk)19:12, 23 January 2014

Oh yes, I'm running MediaWiki version 1.22.1, TimedMediaHandler version 0.3, and MwEmbedSupport version 0.2.

TheAlmightyGuru (talk)19:15, 23 January 2014

SQL is MySQL specific

transcode_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT in the file TimedMediaHandler.sql is not standard SQL. I use postgres and had to change it to transcode_id SERIAL PRIMARY KEY.

Further, transcode_error longtext NOT NULL must be changed to transcode_error TEXT NOT NULL for postgres.

It would be nice if this extension could be made to also support postgres, as this only needs the above changes. Thanks., 21 December 2013

Support for FLAC

I have this extension enabled and working for Ogg files but I can't get it to work for FLAC files. As per the documentation, I added $wgMediaAudioTypes = array( 'Vorbis', 'Speex', 'FLAC' ); to my LocalSettings.php file and ran update.php. Still, no FLAC. To double check that what I'm trying to accomplish is possible, I embedded a FLAC file in a sandbox article on WP and it worked as expected. I'm running the same version of the extension as WP and version 1.21.3 of MW. So, I realized that I must not have something enabled/configured correctly but now I'm at a loss for what to do next. Here's an example of an attempt to embed a FLAC file on my wiki: http://preservapedia.org/Bruce_Sharky_discusses_the_use_of_wikis_in_graduate_level_coursework

Any advice would be appreciated.

Fitzed (talk)22:25, 17 December 2013

Problem solved. I noticed I was missing the FLAC handler in ..extensions/TimedMediaHandler/handlers/ After updating to the TMH release for MW 1.22, everything is working properly.

Fitzed (talk)00:00, 18 December 2013

Where to find mwEmbedSupport extension

Edited by another user.
Last edit: 15:52, 13 October 2011

I'm trying to install your extension but i'm stuck at first step. How/where cna i find the mwembedsupport extension that needs to be installed. Furthermore, the firefogg files are available for all major platforms. So once i download the one from the source, where do i place it in relation to my server, within the extensions or anywhere in my server. Similarly it also says I need a copy of ffmpeg2theor in my server and I'm not clear for that too. I'm guessing the suggested configuration lines is for comman line instructions for the settings and do we run that from root or from specific folder. Obviously I'm a bit of a starter so my question may sound very simple or studid but I apologize if it comes off like that. I've always had a difficulty of how we can install programs made for linux, windows, mac being 'installed' on my server. Thanks MW1.17, apache server, php 5.3, shared host.

User:Wikimanz15:48, 13 October 2011

You can get mwEmbedSupport from the same parent directory as TimedMediaHandler: http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/MwEmbedSupport/

You need to setup the paths in the local settings for your encoder binaries see the README for more info

You may have some challenges running this off of a shared host because it includes transcoding support dependent on shell scripts / cron jobs.

Mdale09:45, 17 October 2011

Is there any way to get an easier download of MwEmbedSupport rather than downloading all those files and creating the folders manually?

Alternately, is MwEmbedSupport necessary if I'm not using the transcoding features of TimeMediaHandler? I run a audio-themed Wiki, and I'm looking into updating from the old OggHandler extension to this one, but I don't need any video features.

TheAlmightyGuru (talk)20:20, 9 December 2013

Popup behaviour

When playing a video, it causes it to pop up and cover up the entire screen. Unless you're actually wanting to watch something in fullscreen mode, this is incredibly jarring, especially with small videos. What is the reason for this behaviour?

-— Isarra 18:15, 30 October 2013
First page
First page
Previous page
Previous page
Last page
Last page