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.

TheDJ (talkcontribs)

This is phab:T63986. You can bypass this problem, by using ForeignDBViaLBRepo instead of ForeignDBRepo.

Nbrouard (talkcontribs)

Do you mean that we should use $wgForeignFileRepos with 'class' => 'ForeignDBViaLBRepo'?

But what if using old syntax with $wgSharedUploadPath, $wgSharedUploadDirectory etc?

T0lk (talkcontribs)

I was having this problem too. The easiest solution was switching to Extension:EmbedVideo, which met my needs.

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

I'm trying to get my first video file to play.

I've tried the following:

[[Video:Foxhat.ogv]|Video Test]]

[[File:Foxhat.ogv]|Video Test 2]]

But when clicking on either of the links, it opens the file upload page.

If I use: [[Media:Foxhat.ogv]] then it plays the video but in a full-screen player but I'd really like to be able to embed the video on the page.

I have no idea how to approach fixing this. Any help would be greatly appreciated.


Bawolff (talkcontribs)

You have an extra ]. Syntax is [[file:Foxhat.ogv]].

If its just rendering as a link, it means that the extension is not installed properly

Reply to "Syntax for embedding a .ogv file?"

This extension work with audio stream from external server?

Tartarugav (talkcontribs)

Does this extension allow you to listen to an audio stream from another external server?

You seem to me not to ...

Does anyone know if this is possible in MediaWiki?

My intention is to put this streaming: http://icecast.taina.net.br/radiosapo.mp3

with a small player to listen to in our Wiki.


Reply to "This extension work with audio stream from external server?"

Not Working - uploaded files not found

2 (talkcontribs)

Once I activate TimedMediaHandler (and MwEmbedSupport), "[[File:XXXX]]" links simply change to red as if the file wouldn't exist (previously they were ok).

Files have been uploaded correctly.

Tested on a vanilla MW 1.27.3 (LTS) with TMH 1.27 and 1.28. (talkcontribs)

Same with MW 1.29.0

Reply to "Not Working - uploaded files not found"

Unterminated string literal in file 'MediaWiki:Common.js' on line 8

Ponkabonk (talkcontribs)

OK. New question. I'm trying to play .ogg files on my site. Chrome works great but Firefox doesn't. When I press "play" nothing happens.

I see the error "Unterminated string literal in file 'MediaWiki:Common.js' on line 8" in the console for both FF and Chrome. Don't know if that's related to the problem

I've heard that Safari and IE aren't working either but I haven't verified that yet. Probably have some questions about ogv.js sometime in the future.

Ponkabonk (talkcontribs)

Here's a link to my test page. The first few seconds of the file are blank so be patient and someone will eventually start talking.


Kghbln (talkcontribs)

I wonder why it is not working. Since this is an extension used on WMF sites. I use the Html5mediaAudio widget via the Widgets extension instead of this one.

TheDJ (talkcontribs)

When I look at that site and use "debug=true" i see dozens of errors. It seems as if the html being served is generating incorrect links to load.php (which serves up much of the javascript and css), instead all referring to the non-existing "http://islapedia.com/?d41d8"

You'll have to figure out why it does that, because it's not normal.

Ponkabonk (talkcontribs)

I'm getting much closer. Chrome, Safari, Edge and IE all work. But, when I try to play the file in Firefox, I get the following message:

HTTP load failed with status 403. Load of media resource http://islapedia.com/images/1/10/Mike_Test_DH_1.ogg failed.

Any ideas why FF is having trouble with this file? I've tried dumping my cache and cookies and have tried a second machine. It didn't help. There may be other issues with the site but I'm only trying to get TMH working for now.


Ponkabonk (talkcontribs)

Got that one fixed. I modified .htaccess to redirect to www. when the www. is missing. No more 403 errors. But, I'm still getting the "Unterminated string literal in file 'MediaWiki:Common.js' on line 8" error and the file doesn't play. I believe it's caused by FF just stopping when it encounters that error but all the other browsers ignore the error.

Help is greatly appreciated.

Reply to "Unterminated string literal in file 'MediaWiki:Common.js' on line 8"
Summary by Kghbln

Make sure that the required database tables are being created.

Ponkabonk (talkcontribs)

Hello. I am really new to TMH to please forgive me if these questions are too basic. I've installed the extension and can play the uploaded file when looking at the recent files list. But, when I click on the file name, I am taken to a page with this message: "A database query error has occurred. This may indicate a bug in the software." I see others with a similar problem and the solution was to restart the server. But, I'm on a shared server so a restart isn't possible. Does anyone have a different suggestion or could possibly point me in the right direction?

I also get the error message when I go to Special Pages/TimedMediaHandler.

Kghbln (talkcontribs)

You need to run "update.php" after installing this extension. Otherwise the required database tables are not being created which in turn results in what you are currently experiencing.

Ponkabonk (talkcontribs)

OK. I turned on verbose SQL error reporting and found that I'm missing at least one DB table. Where can I find a DB schema for TMH? Is there a .sql file available I can run to manually create the necessary tables?

Ponkabonk (talkcontribs)

I did that. Didn't work. I found a file called TimedMediaHandler.sql which gave me the SQL required to manually create the table. Seems to be working now.

Kghbln (talkcontribs)

Usually running the script should indeed create the tables. Dunno why it was not working for you. However, glad that you managed to manually create the tables.

Scoutladen (talkcontribs)


On this article, I use the the following code.

Spirit of BP
[[Datei:spiritofbp.mp3|thumb|Spirit of Bipi]]
[[Datei:spiritofbp.mp3|thumb|Spirit of Bipi]]

The first player didn't work.

The second is fine... whats wrong for me?

Using Mediawiki 1.27.1 on Centos7

Scoutladen (talkcontribs)

Error seams to be only with .mp3

While using .ogg, everything is fine.

TheDJ (talkcontribs)

The extension doesn't really support MP3 yet. See also phab:T115170. That ticket has some patches that you might be able to use to add this functionality locally. Hopefully support will be added in the next version of the extension, since it seems the the patents for MP3 have lapsed.

Reply to "First Kaltura Player didn't work"
Anna Frodesiak (talkcontribs)

It is dark text on black and really hard to see. Can we do something about that? Could we get the text in a nice, bright yellow? ~~~~

Reply to "Options menu colours" (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?"