Page MenuHomePhabricator

Support showing WebVTT (embed in media file) subtitles on Wikimedia Commons
Open, Needs TriagePublicFeature

Description

Steps to replicate the issue (include links if applicable):

  • Go to for example this video on WMC which was uploaded using video2commons with "subtitles" checked
  • Try to find / turn on subtitles

What happens?:
There are no subtitles: https://commons.wikimedia.org/w/index.php?search=Dirty+Subsidies%EF%BC%9AHow+Europe+sabotages+its+climate+goals&title=Special:Search&profile=advanced&fulltext=1&ns6=1&ns102=1

  • When you download the file from Youtube and watch it with your local media player you can see that the file has subtitles, WMC just doesn't show them
  • When running yt-dlp --list-subs https://www.youtube.com/watch?v=2BVnFyuYClY it shows that the file has these subtitles:
en-GB    English (United Kingdom) vtt, ttml, srv3, srv2, srv1, json3
fr-FR    French (France)          vtt, ttml, srv3, srv2, srv1, json3
it       Italian                  vtt, ttml, srv3, srv2, srv1, json3
no       Norwegian                vtt, ttml, srv3, srv2, srv1, json3
pt       Portuguese               vtt, ttml, srv3, srv2, srv1, json3

What should have happened instead?:
It should show the subtitles. Maybe there is an issue with VTT subtitles in specific, I have included VTT in the title for now but one should check if this issue also exists for other subtitle filetypes.

There also is an issue that for some files the subtitles are not imported with video2commons (example example) but that could be a separate problem and I'll first ask about it here.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):
Firefox

Related Objects

Event Timeline

I can imagine that the special U+FF1A colon might be an issue here...
This is not about subtitles not showing. There are simply none.
Is this supposed to be reporting an issue with video2commons, or something that the Wikimedia Commons community itself should look into?

Aklapper renamed this task from Subtitles aren't showing on Wikimedia Commons (videos with vtt subtitles) to No subtitles imported into Wikimedia Commons for specific video from Youtube.Jun 24 2024, 6:01 PM
Aklapper updated the task description. (Show Details)

@Aklapper Have you read the description: this is not about a "specific video" and there are not "simply none" subtitles as when you download the video from WMC and play it with your local media-player it does have subtitles!

As for the videos affected by this: the special colon is unrelated to it because it's also affects videos without such in the title. Moreover, it's not only the four videos imported from this channel but also other videos, some of which I could list if that would be useful.

Prototyperspective renamed this task from No subtitles imported into Wikimedia Commons for specific video from Youtube to Subtitles aren't showing on Wikimedia Commons (videos with vtt subtitles; subtitles show when downloading the video).Jun 25 2024, 10:39 AM

when you download the video from WMC and play it with your local media-player it does have subtitles!

No, it does not here. If you think it does, please provide clear steps to reproduce which leave no room for any interpretation. Thanks.
Edit: Looks like my two local media players do not support this.

Aklapper renamed this task from Subtitles aren't showing on Wikimedia Commons (videos with vtt subtitles; subtitles show when downloading the video) to WebVTT (embed in media file) subtitles aren't showing on Wikimedia Commons.Jun 25 2024, 10:48 AM
Aklapper renamed this task from WebVTT (embed in media file) subtitles aren't showing on Wikimedia Commons to Support showing WebVTT (embed in media file) subtitles on Wikimedia Commons.
Aklapper changed the subtype of this task from "Bug Report" to "Feature Request".

Clear steps: 1. Go to the link on "this video" (don't know why you linked it a second time) 2. Right click "Original file" and select "Save link as..." 3. Once it finished downloading open the file with MPV file player (probably also works with other media players but I haven't tested many)

The subtitles are there, WMC just doesn't show them.

  • The source file shows 5 subtitle tracks (WebVTT). VLC media player can show them.
  • The VP9 derivatives only have 1 subtitle track. Not entirely sure why that is just 1.. we should probably fix that.
  • The streaming derivatives have 0 subtitles (requires support in the manifest generation, which we currently do not have).
  • VideoJS doesn't find the embedded subtitle tracks for some reason, even if I select the source version of the player.
  • Our VideoJS has native text tracks disabled. This is to avoid confusion with the TimedText namespace. I might test if we can enable that. (this is native rendering, not native embedding, so it doesn't help us here)

Of note is that the file also doesn't show subtitles in Chrome with native controls.. So something is non-standard about how the subtitles were written.. Possibly a webm vs matroska standard compliance thing ?

Edit: I'm a dummy. subtitles embedded in webm was not originally part of the webm specification. Therefor it is not supported (by any of the browsers as far as I know). It is now part of the specification, but support in the browsers is still required to surface these tracks to the player and it simply isn't there.

Safari, Firefox don't even have tickets for this.
Chrome has the functionality behind a flag, but in 2018 was considering removing it:
https://issues.chromium.org/issues/40568976
https://issues.chromium.org/issues/40312773
https://issues.chromium.org/issues/41006417

So in order to support it, we now have to extract them serverside from the original file, then put them in some sort of cache/textstore and serve them up as <track> elements with the content provided through the API. (that is a lot of extra work for something the browsers could just provide for us)