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

feat(FormatUtils): Support multiple audio tracks in the DASH manifest #308

Merged
merged 1 commit into from
Feb 11, 2023

Conversation

absidue
Copy link
Collaborator

@absidue absidue commented Feb 11, 2023

Description

Currently the DASH manifest doesn't include any language or default track information, which is fine for videos that only have a single audio track/language, as the player will just pick the first audio format that it can play, however for videos with multiple different audio track in different languages, that means that the player still picks the first one it can play, which is likely to be in a different language than the original video audio. For Mr. Beast videos that means listening to the video in Arabic, with no way to change it.

If the video has multiple languages, this pull request adds the language and default track information to the DASH manifest. I also added the audioSamplingRate, as the DASH specification says that it should be included in the manifest, that will now be included for all audio formats regardless of whether the video has multiple languages or not.

So far I've only tested these changes with FreeTube and video.js correctly selected the default track and also picked up on the different languages (as we don't have a language picker yet you have to dig around in video.js at runtime to notice that it knows about the different languages). So testing this with other players might be a good idea.

https://dashif-documents.azurewebsites.net/DASH-IF-IOP/master/DASH-IF-IOP.html#audio-constraints

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have checked my code and corrected any misspellings

@LuanRT LuanRT merged commit a69e43b into LuanRT:main Feb 11, 2023
@absidue absidue deleted the dash-multi-language-support branch February 11, 2023 23:35
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.

2 participants