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

Introduce multi audio tracks with same language support #492

Conversation

bvc3at
Copy link
Contributor

@bvc3at bvc3at commented Apr 26, 2020

close #202

@@ -494,6 +495,9 @@ def OutputDash(options, set_attributes, audio_sets, video_sets, subtitles_sets,
language = audio_tracks[0].language
if (language != 'und') or options.always_output_lang:
kwargs['lang'] = language
language_name = audio_tracks[0].language_name
if (language_name != 'Unknown'):
kwargs['lang'] = language_name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't going to work. The @lang attribute of an element is the language code, not the language name (see ISO/IEC 23009-1, section 5.3.3.2): "@lang: Declares the language code for this Adaptation Set. The syntax and semantics according to IETF RFC 5646 shall be used."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, the @lang value shall be RFC 5646 language code, my mistake.

What do you think about using the "label" attribute? Although it is non-standard (as far as i know, i don't have access to ISO/IEC 23009, so i can't say for sure), support for "label" was implemented in some major dash players (google/ExoPlayer#4391, shaka-project/shaka-player#811)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have just pushed an update that allows setting track labels (use the +label=xxx track option. This way you pass an explicit label (setting the label to be equal to the language name doesn't help with dash, since a player would normally already do that mapping from the language code, so the explicit labelling is only interesting when you want a label that's not the language name, or at least a different language name than the standard name for a language code)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, i close the pr

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible to use same way for the subtitles ?

@bvc3at bvc3at closed this May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multi audio tracks with same language
3 participants