Hiya, is is possible to change the soundfont this extension uses when transcoding MIDI files?
Extension talk:TimedMediaHandler
Appearance
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).
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)
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.
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.
The repository of each extension is linked from the Extension pages in the infobox. In this case it is is: https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/TimedMediaHandler/+/refs/heads/master
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
Is integration with Shellbox expected?
WebVideoTranscodeJob does since January 2024, but task T356241 remains open.
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.
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.
And mp4 handling by TMH isn't really well tested/validated, because mp4 is not in use by Wikimedia.
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
- It either links to the video file rather then embedding it
- It shows a gray bar with play button, but no video (audio works) (this only works if the file was previously embedded with EmbedVideo)
- 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.
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.
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
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
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.
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?
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.)
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.
I've corrected the examples (will take some time to update due to the translations)
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.
It is/was incompatible with ForeignDBRepo phab:T63986 until MediaWiki 1.41.
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
it's also not super well tested with mp4 honestly.
Well, I'll try to use other format then as well
[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() {
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.
Apologies for the delay. The host is running on a Synology NAS Web Station, which I believe is using a Linux kernel.
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.
I would like to change the resolution settings for all videos in my mediawiki page - has anyone an idea how to do it?
I am creating a wiki for people to learn how to pronounce some difficult names in my language. I have recorded audio in OGG files and uploaded to the wiki, and they play fine in desktop browsers like Chrome and Microsoft Edge. Here is an example: https://chinesenamesinenglish.com/wiki/A
However, in mobile devices (both Safari and Chrome in iphone X), if I use MobileFrontend (I tried different skins), the audio is not played after I click the play button but the player is displayed. If I use desktop view in mobile devices, the player is not even displayed. In contrast, Wikipedia's audio plays fine in mobile devices. For example, https://en.wikipedia.org/wiki/The_Star-Spangled_Banner
Can anyone help? Thank you! I am using MediaWiki v1.33.1 and the extensions and skins are latest compatible versions.
For now, I bypassed this issue by replacing OGG files with mp3 files. However, I still hope to know how to solve this problem. Your help will be greatly appreciated!
I’m noticing the same issue with the ogg media on the Audio Samples provided on Fandom’s Soundeffects Wiki. I would really like to use this resource on Apple mobile devices. Is there a workaround?