Extension talk:TimedMediaHandler/Flow

About this board

Adding missing language codes

3
Psubhashish (talkcontribs)

The following language codes and corresponding should be added as they currently don't appear in many places, including TimedText language text such as this, despite having valid ISO codes:

'bfw' => 'Bonda/Remosam/ବଣ୍ଡା',

'gju' => 'गुज्जरी/Gujari/Gojri',

'hoc' => 'Ho/𑢹𑣉𑣉 𑣎𑣋𑣜',

'kgg' => 'Kusunda/Gemehaq gipan'

TheDJ (talkcontribs)

This is handled via MediaWiki core. If the language code is a known language code to MediaWiki, it will show up in the list of All languages that is presented.

Psubhashish (talkcontribs)

Thanks for clarifying, @TheDJ. Can you share the link to that, please?

Reply to "Adding missing language codes"
2.28.117.139 (talkcontribs)

Hiya, is is possible to change the soundfont this extension uses when transcoding MIDI files?

Tacsipacsi (talkcontribs)

Yes, you can set $wgTmhSoundfontLocation to the path of a soundfont file, which is then passed to FluidSynth as-is (apparently FluidSynth supports specifying multiple soundfont files, but this extension supports only one).

Reply to "MIDI Soundfont"

Documentation for auto-transcoding things on Commons

5
Jonathanischoice (talkcontribs)

Hi, I've uploaded File:3-4A set class on C.mid (a MIDI file) on Commons, and I'm wondering if I need to just wait (how long?) or perform any other magical incantations in order to generate Ogg/MP3 files for it (and several other MIDI files I'll need to upload for List of set classes). Is there some documentation somewhere I can look at, or does someone know? Thanks — Jonathanischoice (talk) 21:34, 24 June 2024 (UTC)

Brooke Vibber (WMF) (talkcontribs)

It looks like we had a batch upload of many large, high-resolution videos which clogged up the queue a bit. For the time being we've disabled 1440p and 2160p output (so 1080p will be the high-resolution video transcode made) until I have a chance to rework some queue stuff to more cleanly prioritize things. Even with that it took a few days to clear everything that was backed up out of the queue, but it should be more or less consistent again.

I definitely want to provide better visibility on the queue status in future, but might now it's just ugly to query. Needs some database table rearrangement and some different logic on the jobs. This'll be among my ongoing maintenance tasks, and I *really hope* to finish it this calendar year.

Jonathanischoice (talkcontribs)

Hi, thanks for investigating. If the codebase is visible to a mere muggle such as myself, I'd be happy to try and help and/or contribute a pull request on Gerrit.

TheDJ (talkcontribs)
TheDJ (talkcontribs)

It seems there is a bug at this moment. No audio-only files seem to be getting transcoded at all.

I have filed phab:T368364

Reply to "Documentation for auto-transcoding things on Commons"
Alex Mashin (talkcontribs)
Skierpage (talkcontribs)
Reply to "Shellbox"
128.183.226.220 (talkcontribs)

I've gotten this extension installed and working, but I am very confused with (local) MP4 video handling. Please give me a clue.

1) Is it possible to upload an MP4 (HTML5, right?) video that can be played without transcoding it to some other (OGV?) format?

2) Is it possible to have the video (auto)play inside the page without the "lightbox" player popping up?


Thanks in advance.

Ciencia Al Poder (talkcontribs)

Autoplay is currently being worked on phab:T116501, but non-autoplay videos will get the lightbox player regardless.

Maybe Extension:EmbedVideo (fork) will serve you better than TimedMediaHandler, though. It appears it allows autoplay and embed the inline player, without generating derivative transcodings.

TheDJ (talkcontribs)

And mp4 handling by TMH isn't really well tested/validated, because mp4 is not in use by Wikimedia.

Reply to "MP4 handling"
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"

Poster / hero / thumbnail image for a video?

4
Calvin27516 (talkcontribs)

I see from the extension page that

[[File:Video.ogv|File:Video.ogv]]

"Display a video at its nominal size. Displays a still image from the midpoint with a play button to start an embedded player."

My first question is, why does the file have to be specified twice? When I specify it just once, it seems to work just fine. So I'm not sure what I am missing.

But my real question is, "Is there ay way to override the the default behavior of displaying a still image from the midpoint of the video?" I have uploaded a hero / poster image from the video as an image file. But I can't see any syntax that let's me specify it as the image to use.

Is this possible?

Tacsipacsi (talkcontribs)

My first question is, why does the file have to be specified twice? When I specify it just once, it seems to work just fine. So I'm not sure what I am missing.

The second occurrence is actually the caption, I have no idea why the examples look like this.

Is there ay way to override the the default behavior of displaying a still image from the midpoint of the video?

It is possible to override which frame of the video to display (using |thumbtime=). It is not possible to display a completely different image. (I’m not the developer who made this decision, but to be honest, I like that it’s this way: I always find it annoying when I click on a YouTube video, and the scene visible on the thumbnail – because of which I clicked on it – doesn’t come up at all in the video. With TimedMediaHandler’s restrictions, this couldn’t happen.)

Calvin27516 (talkcontribs)

Thank you for the response. I was so hung up on specifying an alternate image file the way YouTube lets do that I completely skipped over the thumbtime parameter. I can live with that.

TheDJ (talkcontribs)

I've corrected the examples (will take some time to update due to the translations)

Reply to "Poster / hero / thumbnail image for a video?"

Problems with the player at WikiFarm

5
Fokebox (talkcontribs)

Hello!

I have wiki farm with language subdomains and subdomain with keeping all files.

  • en.mywiki.org - My English wiki
  • de.mywiki.org - German one
  • files.mywiki.org - Keep all images, video etc.

I have following settings at LocalSettings.php for storing files:

# One storage and uploads
$wgUseSharedUploads             = true;
$wgHashedSharedUploadDirectory  = true;
$wgUploadNavigationUrl   = 'https://files.wikijournal.org/wiki/Special:Upload';
$wgUploadPath            = '/w-wiki/images';
$wgSharedUploadPath      = $wgUploadPath;
$wgUploadDirectory       = "/var/www/admin/www/w/images";
$wgSharedUploadDirectory = $wgUploadDirectory;

# Shared files
$wgFetchCommonsDescriptions = true;
$wgSharedUploadDBname = 'mywiki_org';
$wgSharedUploadDBprefix = 'files__'; # Table name prefix
$wgRepositoryBaseUrl = "https://files.mywiki.org/wiki/File:";

When installed the extension and uploaded my video, I can view the video with the player on the page of uploaded file https://files.mywiki.org/wiki/File:MyVideo.mp4.

But when I insert the file to the page at en.mywiki.org I see the warning "Error missing media source". Can you please help to setup the extension so that I can use player at my all wiki farm subdomains.

Ciencia Al Poder (talkcontribs)

It is/was incompatible with ForeignDBRepo phab:T63986 until MediaWiki 1.41.

Fokebox (talkcontribs)

Does it mean that the issue is resolved at MW 1.41 and all be fixed as soon as I upgrade? Now I use MW 1.40

TheDJ (talkcontribs)

it's also not super well tested with mp4 honestly.

Fokebox (talkcontribs)

Well, I'll try to use other format then as well

Reply to "Problems with the player at WikiFarm"

Error running /bin/bash - syntax error near unexpected token

4
195.80.103.225 (talkcontribs)

[exec] Error running /bin/bash '/volume2/www/test2.example.com/w/vendor/wikimedia/shellbox/src/Command/limit.sh' ''\''/volume2/www/bin/ffmpeg-6.0-amd64-static/ffmpeg'\'' -nostdin -threads 1  -y -i '\''/volume2/www/test2.example.com/w/images/6/6b/Test.ogv'\'' -ss 1  -s 1920x1080 -f mjpeg -an -vframes 1 '\''/tmp/transform_7eb9fb4c6892.jpg'\'' 2>&1' 'SB_INCLUDE_STDERR=;SB_CPU_LIMIT=180; SB_CGROUP='\'''\''; SB_MEM_LIMIT=629145600; SB_FILE_SIZE_LIMIT=104857600; SB_WALL_CLOCK_LIMIT=180; SB_USE_LOG_PIPE=yes': /volume2/www/test2.example.com/w/vendor/wikimedia/shellbox/src/Command/limit.sh: line 4: $'\r': command not found

/volume2/www/test2.example.com/w/vendor/wikimedia/shellbox/src/Command/limit.sh: line 6: syntax error near unexpected token `$'{\r''

/volume2/www/test2.example.com/w/vendor/wikimedia/shellbox/src/Command/limit.sh: line 6: `cleanup() {

Tacsipacsi (talkcontribs)

Does by any chance your host computer run Windows? The error messages complain about excess carriage return characters, which are used by Windows, but not by Linux.

195.80.103.225 (talkcontribs)

Apologies for the delay. The host is running on a Synology NAS Web Station, which I believe is using a Linux kernel.

Tacsipacsi (talkcontribs)

Then maybe you copied from a Windows computer? I have no experience administering Linux servers from Windows, but I can imagine line endings could be problematic. If not, then I have no idea what’s going wrong.

Reply to "Error running /bin/bash - syntax error near unexpected token"

How to change resolution permanatly?

1
80.153.140.71 (talkcontribs)

I would like to change the resolution settings for all videos in my mediawiki page - has anyone an idea how to do it?

Reply to "How to change resolution permanatly?"
Return to "TimedMediaHandler/Flow" page.