Extension talk:TimedMediaHandler

About this board

Question about a placeholder

4
Pacha Tchernof (talkcontribs)
Bawolff (talkcontribs)
Pacha Tchernof (talkcontribs)

I'm not sure that I completely understood what you wrote, but thanks a lot for a try!

Just in case: in Russian language, words could have different forms - cases. And I would like to know if I add a GRAMMAR with prepositional case before mysterious "$1", would the language name change depending on the provided case?

For example, in Russian, the word "English" have seven forms (even if two forms are equal, they are used in the different places): английский, английского, английскому, английский, английским, английском.

You see? Most of them have different endings and to make smooth and good translation (instead of weird construction I build there) I just need to know, may I use GRAMMAR: to use cases, proper word order and syntax to contribute better translations. Dixi.

Bawolff (talkcontribs)

So the thing is, GRAMMAR is implemented differently in different languages. Some languages have a complete implementation, where it works with any word. In Other languages it doesn't work very well and only works for select words. I am not sure what the case is for russian (which is why i suggested asking at translatewiki support as they are more familiar). You could test GRAMMAR at ru:Special:expandTemplates .

If i had to guess though, i would guess the answer is yes, but i'm not 100% sure.

Reply to "Question about a placeholder"
Carloposo (talkcontribs)

Hello,

I am trying to disable all the transcoding jobs as I don't need to provide different versions of the video.

I have included $wgEnableTranscode = false; in my Localsettings.php. Unfotunately it keeps on converting every time I upload an mp4.

I have also added $wgEnabledTranscodeSet = [] but didn't change much.

Thank you.

Misdre (talkcontribs)

Just edit extension.json in the extension files. This is not ideal, a bit hackish and thus not recommended but TimedMediaHandler never handled variables from LocalSettings properly - at least not this one anyway.


You may want to try setting $wgEnabledTranscodeSet = []; which might work for you - it didn't for me.

Reply to "Disable transcoding"

HOWTO LOOP video. +Opus 44.1k failure & Same-size re-encodes

6
2001:2002:51ED:CEE0:DC5D:AE01:E6DE:3306 (talkcontribs)

1) Most importantly I would like TimedMediaHandler to have a "loop" video option for making short video clips (say it's just 15-20 seconds) loop automatically when they are played.

2) It would be nice to be able to set a video size of 100% instead of pixels and have it resize to whatever size the screen/browser is using. Should of course also work if the browser is resized after playbacks begun.

3) Unrelated, uploading a MP3 with 44.1k audio makes TimedMediaHandler specify 44.1k when converting to Opus which fails since it's a 48k format. That's a bug.

4) I also find it very annoying that if I upload a 1080p VP9/Opus webm TimedMediaHandler will convert the file to that same format in addition the other formats. A check to see if the file's already in the target format would be preferable and reduce server load.

78.54.53.70 (talkcontribs)

Hi,

for 1) as a dirty hack, to get a button below the player to replay the video sequence, one may edit the extension as shown below. This solution is just a first approach an need to be further improved regarding stability, readability etc. but its a starting point.

This adds an individual javascript function under each videoplayer tag in the document, using the specific id of the video tag. the javascript function is started by clicking the button and will restart and play the video sequence.

edit the file [PathToYourMediawiki]/extensions/TimedMediaHandler/includes/TimesMediaTransformOutput.php

search for function 'getHtmlMediaTagOutput(...'

specifically search for the following code lines:

// Build the video tag output:

$s = Html::rawElement( $this->getTagName(), $this->getMediaAttr( $sizeOverride, $autoPlay ),

        // The set of media sources:

        self::htmlTagSet( 'source', $mediaSources ) .

        // Timed text:

        self::htmlTagSet( 'track', $mediaTracks )

);


add the following lines below:

$s .= '<script type="text/javascript">';

$s .= 'function replayVideo'.self::$serial.'() {';

$s .= "var el = document.getElementById('";

$s .= "mwe_player_";

$s .= self::$serial-1;

$s .= "'); ";

$s .= "el.muted = 'true'; el.load(); el.play(); }</script>";

$s .= '<form><input type="button" onclick="replayVideo';

$s .= self::$serial.'()" value="(re)play"</form>';


Note: i'm sure this can be written in a nicer way, it's decades since i used php ;)

77.11.15.116 (talkcontribs)

some additional notes:

1) correct filename is TimedMediaTransformOutput.php (not TimesMedia...)

2) dont use the <form> and </form> tag from the source above, it will result in errors with input button afterwards (like formlink etc.)

3) el.muted = 'true' has no effect for most browsers and is not wanted for most users (mute video)


Sm8ps (talkcontribs)

I would like to chime in on issue nr. 4. I use SimpleScreenRecorder to produce a VP8-720p video file. When uploaded, it is unnecessarily transcoded to another VP8-720p video file.

For instance, I have Video.webm of 51.3 MB with VP8-720p-15fps-398kbps and Vorbis-48kHz-112kbps. The transcoding produces Video.720p.webm with almost exactly the same specs, the only difference lying in the bitrate (581kbps) and thus an increased file size of 74.9 MB. This does not make sense as the video quality of the transcoded copy cannot get any better with an increased bitrate.

I think the extension should only mark the WEBM-video file for transcoding if any of the basic settings (frame size, fps, video/audio bit rate) of the original are (strictly) greater than the standard settings. Does that make sens? I am no expert at all with video encoding.

TheDJ (talkcontribs)

So the problem is that there can be a LOT of settings and knowing which combination works in all browsers is actually pretty hard. This is why it will always transcode, to ensure that it has a known usable version to present to browsers. (FYI: Youtube does this as well, you never see your original again after uploading it there).

Sm8ps (talkcontribs)

Thanks for your response, @TheDJ (and sorry for my late reaction)! Your explanations do make perfect sense to me.

Reply to "HOWTO LOOP video. +Opus 44.1k failure & Same-size re-encodes"

TimeMediaHandler and EmbedVideo comparison

3
Summary by Omotecho

mp4 included as type of video to upload via any method for uploading files (Special:Upload, UploadWizard etc) : details are referred at Extension:TimedMediaHandler#Client support.

Carloposo (talkcontribs)

Hello,

I am using EmbedVideo at the moment. It fits my needs 80%. I think it's an amazing extension. I am not interested in embedding videos from external sources but to upload and stream my own on a local server.

I have few questions for those of you using TMH:

- is it possible to use mp4?

- is the process of uploading and embedding the video in a page flawless?

- can I upload a video as I would upload a picture, using the VisualEditor?

- does TMH perform an encoding for every uploaded video?

- is TMH stable/future proof? (sorry for this question, I know it might sound a bit silly but I am working on a corporate wiki and need to comply to a long-term strategy)

Thank you.

Tacsipacsi (talkcontribs)

- is it possible to use mp4?

According to § Client support, yes. Support for formats not used on Wikimedia wikis can be a bit more spotty (e.g. thumbnails may not be supported), though.

- is the process of uploading and embedding the video in a page flawless?

- can I upload a video as I would upload a picture, using the VisualEditor?

TimedMediaHandler plays videos and sound files uploaded in the File namespace, so any method for uploading files (Special:Upload, UploadWizard…) should work. I don’t have experience with VisualEditor, but I don’t see any reason for it not to work.

- does TMH perform an encoding for every uploaded video?

Yes, as far as I know, for every video. See c:File:Videoonwikipedia.ogv#transcodestatus for an example.

- is TMH stable/future proof?

It’s used on public Wikimedia wikis, so probably yes. Unless something catastrophic happens, it should be supported “forever” (or if goes unsupported, there will be a proper replacement).

Carloposo (talkcontribs)

Thank you @Tacsipacsi I am testing it as we speak.

Carloposo (talkcontribs)

Hi,

I am using $wgMinimumVideoPlayerSize to no success. I am using the VisualEditor to place an mp4 inside my page, and I am setting its width to be bigger than the value I put for the variable. I expect no modal window wo appear on click. Unfortunately, that does not happen.

Thank you.

Reply to "In-page video player"

Forcing use of Kaltura HTML5 Player instead of VideoJS

4
KevTYD (talkcontribs)

I'm struggling to get Kaltura HTML5 player working on a wiki, since it is consistently attempting to force VideoJS. This is undesirable for me, since my primary use of TimedMediaHandler is to handle OGG files, which work much better with Kaltura (it's not fullscreen!). Is it possible to force Kaltura HTML5, or otherwise just allow VideoJS to work without going fullscreen on audio files? ~~~~

Jdforrester (WMF) (talkcontribs)

Yes, add the line $wgTmhWebPlayer = "mwembed"; to your LocalSettings.php file. Note, however, that we're expecting to delete the legacy Kaltura player entirely quite soon.

Uvas magicas (talkcontribs)

exist the probably of use fullscreen in the files of video with the player kaltura html?

Lwangaman (talkcontribs)

There is currently an incompatibility between the Score extension and the VideoJS player (see phabricator:T245377), whereas the Kaltura player seems to play nicely with the Score extension. Please don't remove the Kaltura player until this compatibility issue is ironed out :)

Reply to "Forcing use of Kaltura HTML5 Player instead of VideoJS"

Is there some equivalent of $wgMinimumVideoPlayerSize?

1
Spas.Z.Spasov (talkcontribs)

Hello, I wonder is it possible to play video files inline without using the popup feature?

Reply to "Is there some equivalent of $wgMinimumVideoPlayerSize?"

Use a different content model?

3
Elli (talkcontribs)

I've noticed that pages in the TimedText namespace actually use the Wikitext content model. This is far from ideal and causes confusion and some problems with editing.


The extension should probably extend the "plain text" model instead. This would probably be a decently-hard change to make... but I think it should be considered.

Ciencia Al Poder (talkcontribs)

The intention is to get rid of the namespace altogether. See phab:T135221. I don't know when this goal will be achieved, though. May be worth a bugreport, since this can be done by config on WMF wikis.

Elli (talkcontribs)

Oh, interesting.


That is probably a good idea, because of how painful this namespace is to work with.

Reply to "Use a different content model?"
Xuanthucit (talkcontribs)

Dear all,

My wiki when install TimedMediaHandler but webm file not working, please help me. Link: https://wikigiaitri.com/wiki/T%E1%BA%ADp_tin:H%C6%B0%E1%BB%9Bng_d%E1%BA%ABn_t%E1%BA%A1o_v%C3%A0_s%E1%BB%ADa_b%C3%A0i_tr%C3%AAn_Wiki_Gi%E1%BA%A3i_Tr%C3%AD.webm

My LocalSetting.php: wfLoadExtension( 'TimedMediaHandler' ); $wgFFmpegLocation = '/usr/bin/ffmpeg'; $wgMaxShellMemory = 907200; $wgEnableTranscode = false; $wgMinimumVideoPlayerSize = 10; $wgEnabledTranscodeSet = []; $wgTmhWebPlayer = "mwembed";

Reply to "Webm file not working"
41.254.66.25 (talkcontribs)

Is it possible to open images with this extension?

Tacsipacsi (talkcontribs)
Reply to "Open photos"
Return to "TimedMediaHandler" page.