Jump to content

Topic on Extension talk:TimedMediaHandler/Flow

Kimmywingz (talkcontribs)

Hello,

I am trying to get TimedMediaHandler enabled and the TimedText feature working. The client ask is to have a video transcript available for uploaded videos - I am assuming this is the purpose of the TimedText? The TMH is an extension bundled in our MW image and I cannot edit the files directly.

Here are the versions:

MediaWiki 1.39.1
PHP 7.4.33
TimedMediaHandler 0.6.0

Here is what's in LS.p:

wfLoadExtension('TimedMediaHandler');

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

$wgTimedTextNS = 710;

$wgTmhEnableMp4Uploads = true;

The TMH is showing up under Special:Version. Videos can be successfully uploaded and embedded with EmbedVideo.

However, with embedVideo disabled, the following happens with TMH videos

  1. It either links to the video file rather then embedding it
  2. It shows a gray bar with play button, but no video (audio works) (this only works if the file was previously embedded with EmbedVideo)
  3. It shows a message "Error creating thumbnail:"

When trying to create a new TimedText page, it has me select the language and takes me to the edit screen. When attempting to save the timedText page the following error displays:

[6d77ab5662cf7a241109a524] /wiki/TimedText:ExampleVideoAudio.mp4.en.srt Error: Call to a member function toHtml() on bool

Backtrace:

from /var/www/mediawiki/w/canasta-extensions/TimedMediaHandler/includes/TimedTextPage.php(243)

#0 /var/www/mediawiki/w/canasta-extensions/TimedMediaHandler/includes/TimedTextPage.php(142): MediaWiki\TimedMediaHandler\TimedTextPage->getVideoHTML(Title)

#1 /var/www/mediawiki/w/canasta-extensions/TimedMediaHandler/includes/TimedTextPage.php(69): MediaWiki\TimedMediaHandler\TimedTextPage->renderOutput(OutputPage)

#2 /var/www/mediawiki/w/includes/actions/ViewAction.php(78): MediaWiki\TimedMediaHandler\TimedTextPage->view()

#3 /var/www/mediawiki/w/includes/MediaWiki.php(542): ViewAction->show()

#4 /var/www/mediawiki/w/includes/MediaWiki.php(322): MediaWiki->performAction(MediaWiki\TimedMediaHandler\TimedTextPage, Title)

#5 /var/www/mediawiki/w/includes/MediaWiki.php(904): MediaWiki->performRequest()

#6 /var/www/mediawiki/w/includes/MediaWiki.php(562): MediaWiki->main()

#7 /var/www/mediawiki/w/index.php(50): MediaWiki->run()

#8 /var/www/mediawiki/w/index.php(46): wfIndexMain()

#9 {main}


Any help is greatly appreciated, thank you for your time and expertise.

TheDJ (talkcontribs)

EmbedVideo and TimedMediahandler are not really compatible and probably shouldn't both be installed at the same time.

wrt to the error. I think that happens when timedmediahandler is unable to generate a thumbnail. Which likely means that timedmediahandler wasn't told about the path of the ffmpeg command.

Kimmywingz (talkcontribs)

Thank you for your response. EmbedVideo is disabled.

For the ffmpeg command, this is the line in the LS.p - $wgFFmpegLocation = '/usr/bin/ffmpeg';

I've tried it with and without this line with no change (same error). I don't know if it should point to a different location, and if so how would I determine that location. Would I need ImageMagick enabled/disabled to work with TMH? Does it make a difference?

Thank you

Kimmywingz (talkcontribs)

How might I determine what the correct path for wgFFmpegLocation should be if not the default /usr/bin/ffmpeg?

Are there any other thoughts on resolving this error, it is still persisting and I am unsure how to proceed?

Thank you

TheDJ (talkcontribs)

Best is looking at the logs. See also Manual:How to debug. and see if you can find more details about the error context.

> How might I determine what the correct path for wgFFmpegLocation should be if not the default /usr/bin/ffmpeg?

I'm assuming you are on linux, but which ffmpeg will generally give you the right path of the binary.

Reply to "TimedText"