[vlc-devel] VLC youtube stream player does not provide subtitles

ian_bruce at mail.ru ian_bruce at mail.ru
Wed Jul 7 11:04:40 UTC 2021


I tried to file a bug report on <code.videolan.org>, but it kept
presenting me with some two-factor-authentication page, which I did not
understand, so instead I'm sending it here.

https://code.videolan.org/-/profile/two_factor_auth


The Youtube stream player in VLC seems to work well, particularly on
Android. However, it does not seem to have any ability to access the
subtitle files which are provided for many Youtube videos, which greatly
limits its usefulness, if the viewer does not understand the audio
language.

It does not seem like this would be a particularly difficult feature to
provide, because the subtitle files are obtained from Youtube in exactly
the same way as the video and audio tracks. The "youtube-dl" program
knows how to do this:


    $ youtube-dl --list-subs https://www.youtube.com/watch?v=MTPMJGzakgY
    [youtube] MTPMJGzakgY: Downloading webpage
    Available subtitles for MTPMJGzakgY:
    Language formats
    en       vtt, ttml, srv3, srv2, srv1
    ru       vtt, ttml, srv3, srv2, srv1
    vi       vtt, ttml, srv3, srv2, srv1

    $ youtube-dl --skip-download --write-sub --sub-lang en --sub-format vtt https://www.youtube.com/watch?v=MTPMJGzakgY
    [youtube] MTPMJGzakgY: Downloading webpage
    [info] Writing video subtitles to: 'Attackers. The Last Fight. Episode 1. StarMedia. 2015-MTPMJGzakgY.en.vtt'


https://github.com/ytdl-org/youtube-dl

It appears that VLC already understands the VTT subtitle format, which
is a small enhancement of the standard SRT format.

Can this feature be added to the VLC stream player, using the public
domain "youtube-dl" code as an example, or even copying it directly?


More information about the vlc-devel mailing list