Extension talk:TimedMediaHandler

Jump to: navigation, search

About this board

By clicking "Add topic", you agree to our Terms of Use and agree to irrevocably release your text under the CC BY-SA 3.0 License and GFDL
Scarred Sun (talkcontribs)

I currently use a shared repository wiki a la Commons to host files that should be on multiple wikis. When I upload a mp4 file to this shared repository (http://retrocdn.net/File:FinalBlasterBurningForce_MD-PCE_JP_TVAdvert.mp4) and try to use it on another site (http://segaretro.org/Burning_Force) I receive the following PHP Fatal Error:

Fatal error: Call to undefined method FileRepo::fetchImageQuery() in extensions/TimedMediaHandler/WebVideoTranscode/WebVideoTranscode.php on line 686

Any help on why this may be happening? For the record, locally-uploaded video files to either wiki are fine.

Reply to "Interwiki breaking video display?" (talkcontribs)

I installed TimedMediaHandler with latest version. but when I upload a mp4 file, I received below error. There are no problem to upload a jpeg file. Could help me solve this problem?

[93b9cad69e1e225a65fe86a1] /Special:Upload Error from line 1091 of /var/www/mediawiki/includes/specials/SpecialUpload.php: Call to a member function getUrl() on boolean Backtrace:

  1. 0 /var/www/mediawiki/includes/specials/SpecialUpload.php(893): UploadForm->getDescriptionSection()
  2. 1 /var/www/mediawiki/includes/specials/SpecialUpload.php(267): UploadForm->__construct(array, DerivativeContext, MediaWiki\Linker\LinkRenderer)
  3. 2 /var/www/mediawiki/includes/specials/SpecialUpload.php(446): SpecialUpload->getUploadForm(string, string, boolean)
  4. 3 /var/www/mediawiki/includes/specials/SpecialUpload.php(519): SpecialUpload->showUploadWarning(array)
  5. 4 /var/www/mediawiki/includes/specials/SpecialUpload.php(209): SpecialUpload->processUpload()
  6. 5 /var/www/mediawiki/includes/specialpage/SpecialPage.php(522): SpecialUpload->execute(NULL)
  7. 6 /var/www/mediawiki/includes/specialpage/SpecialPageFactory.php(576): SpecialPage->run(NULL)
  8. 7 /var/www/mediawiki/includes/MediaWiki.php(283): SpecialPageFactory::executePath(Title, RequestContext)
  9. 8 /var/www/mediawiki/includes/MediaWiki.php(851): MediaWiki->performRequest()
  10. 9 /var/www/mediawiki/includes/MediaWiki.php(512): MediaWiki->main()
  11. 10 /var/www/mediawiki/index.php(43): MediaWiki->run()
  12. 11 {main}
TheDJ (talkcontribs)

This means that the server was unable to generate a thumbnail preview for this image for some reason.

Probably something is wrong with the ffmpeg or the likes. It shouldn't crash on it of course. I filed ticket phab:T155771 for the crash.

Reply to "Upload mp4 file failed"
Zoglun (talkcontribs)

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

Bawolff (talkcontribs)

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

Zoglun (talkcontribs)

Well, in fact setting wgMediaHandlers & wgFileExtensions like you wrote in reply generate lots of strange buggy problem. Such as existing mp3 file become not exist on both File: page and [[File: ]] link. (at least in MW 1.27.1)

It work awhile in test environment but generate numerous problem in production. So this work around is not recommend for mw users.

Here is the error message:

MediaHandler::getHandler: no handler found for audio/mp3.

Linker::makeImageLink: File:Aa5ba7ca70265445_0..mp3 does not allow inline display

LocalFile::upgradeRow: file does not exist, aborting

ForeignAPIRepo: HTTP GET: https://commons.wikimedia.org/w/api.php?titles=File%3AKancollebgmB12.mp3&iiprop=timestamp%7Cuser%7Ccomment%7Curl%7Csize%7Csha1%7Cmetadata%7Cmime%7Cmediatype%7Cextmetadata&prop=imageinfo&iimetadataversion=2&iiextmetadatamultilang=1&format=json&action=query&redirects=true&uselang=zh

File::transform transformation deferred.

File::transform transformation deferred.

File::transform transformation deferred.

Zoglun (talkcontribs)

I can confirm the mp3 file will not be load with both $wgForeignFileRepos ForeignDBRepo class and ForeignDBViaLBRepo class. Loading mp3 locally work in most of case as well as using ForeignAPIRepo class.

There is another bug which prevent ogg from loading if ForeignDBRepo class were used. Using ForeignDBViaLBRepo can by pass that ogg bug. Unfortunately, this is not the case for MP3. Moreover, due to the political reasons , this bug is not like to be fixed.

Reply to "How to enable MP3 support?" (talkcontribs)

Hello, I am evaluating this extension for use in my wiki. I still see this as part of the roadmap:

"Add support for mp3 uploads and audio transcoding to mp3 and ogg. ( Off by default until mp3 patents expire in 2012 )"

It's not crossed out. Does it mean that at the moment I will still be unable to use it for the mp3 files that I have uploaded in my wiki?


Reply to "Mp3 support?" (talkcontribs)

Hi there, thanks for this great extension! Is there a way to configure it so that the audio player shows a progress bar, which ideally the user would be able to grab and reset? Also all the usual buttons, like fast-fwd, rewind? Thanks! ~~~~

TheDJ (talkcontribs)

You can set the width of the player like you would for images, and that should make it wide enough to show the progress bar. This was broken until quite recently however, so you will need a recent version of the extension (possibly from git). I'm personally working on an update for the player to enable some more options, but that will still take some time. (talkcontribs)

Nice one, thanks. I added an example in the extension page, to show this.

Reply to "Progress bar for audio?"
Summary by TheDJ

Database error was resolved after restart of the VPS (talkcontribs)

file's page will show it. (talkcontribs)

if i stop use TimedMediaHandler, OGG file's page will regular.

TheDJ (talkcontribs)

What kind of error exactly ? And did you try running ./maintenance/update.php ? (talkcontribs)

I have been run it.

The page will show like this:

Database error

A database query error has occurred. This may indicate a bug in the software.

But I delete TimedMediaHandler, the page will normal. (talkcontribs)

thank for your help,TheDJ. It's normal after I restart my VPS.

Innosflew (talkcontribs)

How can I use this extension to embed YouTube and Vimeo videos and videos from other hosting services into my wiki?

Brion VIBBER (talkcontribs)

TimedMediaHandler supports only locally-uploaded video files. You can use Extension:Video I believe for externally-hosted videos.

TheDJ (talkcontribs)

Or Extension:Youtube or Extension:EmbedVideo.

Andreas Plank (talkcontribs)

Is there a way to view ogg audio files from a remote repo, eg. commons? I use MW 1.26.2, Extension:TimedMediaHandler 0.5.0 and $wgUseInstantCommons=true;. I can see Ogg video from commons but not ogg audio from commons repo. Extension:MultimediaViewer is disabled. Any hints to resolve this?

Brion VIBBER (talkcontribs)

Hmm, it should work as-is...

Andreas Plank (talkcontribs)

It works now, but the setup got a little complicated because I uses several foreign repos including commons. Another issue was that extension:TimedMediaHandler does not work presently with ForeignDBRepo (see Topic «Fatal error: Call to undefined method ForeignDBRepo::fetchImageQuery») so a setup with $wgLBFactoryConf and $wgForeignFileRepos[] was needed:

I guess, finally the mistake was the wrong repo order and its configuration

Reply to "View remote repo Ogg files?"

Player turns to the spinner

Summary by Cristal01

Apparently downloading a version dedicated for 1.26 worked even tho my wiki is on 1.25

Cristal01 (talkcontribs)


I just installed the TimedMediaHandler extension and even reuploaded the Example.ogg on my website but right after the player appears on the page it turns into the spinner.

If you are fast enough you can press the play button and it will work, for a second.

Weird thing, if I place two players on the same page, the 2nd one will work properly.

Any ideas what might be causing it? I turned off my twitter plugin, disqus and adsense but none of those were the problem.

Alex Mashin (talkcontribs)

I wrote an MP3 handler to work with TimedMediaHandler (as a MediaWiki extension), based on WAV handler and extending ID3Handler. Unfortunately, under Internet Explorer 10, the player is removed on page load by some JavaScript. How can I prevent this?

This comment was hidden by (history)
Alex Mashin (talkcontribs)

$wgEnabledAudioTranscodeSet [] = WebVideoTranscode::ENC_MP3; is not enough to make an MP3 player appear. It needs a handler and I didn't find it in handlers directory, so I wrote one. (talkcontribs)

Ok maybe you could upload the patch to gerrit where users can look at it and find errors. and tell you if you need to edit other files to get it working.

You could try this

$wgMediaHandlers['audio/mpeg'] = 'Mp4Handler';
$wgFileExtensions[] = 'mp3';
Alex Mashin (talkcontribs)

Thank you, Mp4Handler really can handle MP3, and even under IE 10.

Andreas Plank (talkcontribs)

There is also a problem when your Mp3Handler writes an <audio> tag then it gets automatically rewritten and the tag may vanish too. But there is a setting in TimedMediaHandler/MwEmbedModules/EmbedPlayer/EmbedPlayer.config.php this can then be modified to not rewrite <audio> tag:

$wgMwEmbedModuleConfig['EmbedPlayer.RewriteSelector' ] = 'video,playlist';

In my case Mp4Handler did not work

Reply to "MP3 player vanishes"