Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support VTT in Matroska #9886

Open
moneytoo opened this issue Jan 23, 2022 · 3 comments
Open

Support VTT in Matroska #9886

moneytoo opened this issue Jan 23, 2022 · 3 comments

Comments

@moneytoo
Copy link
Contributor

I'm looking into adding support for WebVTT embedded in Matroska (MKV).

I managed to get basic support in this patch: moneytoo@09b07da and it seems to be working with the sample provided to me in here: moneytoo/Player#249

The patch still lacks support for styles as described in Matroska specs. I'm planning on looking into the styles as well, but I'm pretty busy lately so I'm wondering if I should send you PR with this basic support (is it worth an attempt?) or better wait and finish it all?

@icbaker
Copy link
Collaborator

icbaker commented Jan 24, 2022

I think sending a PR with what you've got so far makes sense.

Heads up: We have some work planned that will change how subtitle data flows from muxed formats like MKV to the TextRenderer - and that will likely affect this issue too.

Some background: Currently we put samples in the SampleQueue containing data in the 'original' subtitle format, and then parse/decode it inside the TextRenderer. We recently added support for parsing the subtitle data before we put samples into the SampleQueue, which brings various advantages and simplifications. This currently only works for sideloaded subtitle files (those specified in MediaItem.localConfiguration.subtitleConfigurations), and is opt-in (controlled by DefaultMediaSourceFactory#experimentalUseProgressiveMediaSourceForSubtitles). We are planning to standardise all subtitle-processing to follow this model, which (among other changes) will involve changing MatroskaExtractor to parse the subtitle data it reads from each sample as it goes along.

If you get the PR in before we start that work in MatroskaExtractor then it will help to ensure we don't somehow make this improvement completely impossible in the new architecture :)

@icbaker
Copy link
Collaborator

icbaker commented Jan 24, 2022

I'm going to mark this as low priority to indicate that we (exoplayer-team) have no immediate plans to directly work on implementing this - but we will of course prioritise reviewing and merging any PRs you send us!

@marek22k
Copy link

I would also like this feature. yt-dlp, for example, downloads all subtitles in vtt format. I have the following options for watching the videos with subtitles:

  1. convert subtitles to .srt with ffmpeg.
  2. use VLC Media Player.

Both options are not really nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants