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

Add saving subtitle track name for MatroskaExtractor #7247

Merged

Conversation

vadimdolgachev
Copy link
Contributor

Some files have several subtitles in the same language, such as forced and regular subtitles. In this case, a name is added for the subtitle track.
This code allows to save the name of the subtitle track. DefaultTrackNameProvider consider the name for TRACK_TYPE_TEXT track type.
The subtitle name and language name in the pair can also be seen in VLC player.
Sample video with subtitle track name: https://drive.google.com/file/d/1WoWcL9B4cVd1fsDEAtYpXDmG0cMF0F_3/view?usp=sharing

@icbaker icbaker self-assigned this Apr 17, 2020
@icbaker
Copy link
Collaborator

icbaker commented Apr 17, 2020

Thanks for the contribution! Using the name/title from Matroska files to populate Format.label looks good.

But the changes to DefaultTrackNameProvider cause us to surface an un-localisable string (directly from the media file) in an otherwise localised context. It's also not clear the concatenating language & track name always makes sense - especially as in some cases the track name might contain the language so it would be duplicated.

So I'm going to merge only the changes to MatroskaExtractor - it should be possible for you to keep the track name behaviour in your own app by providing a custom TrackNameProvider. Hope that's OK!

@vadimdolgachev
Copy link
Contributor Author

Good. Thanks!

ojw28 pushed a commit that referenced this pull request Apr 20, 2020
Needed to test issue:#7247

PiperOrigin-RevId: 307016276
@ojw28 ojw28 merged commit ad3fb3d into google:dev-v2 Apr 20, 2020
@vadimdolgachev vadimdolgachev deleted the subtitle_track_name_for_matroska branch April 23, 2020 05:24
@google google locked and limited conversation to collaborators Jun 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants