Skip to content

feat: Add support for descriptive audio tracks#338

Merged
LuanRT merged 1 commit intoLuanRT:mainfrom
absidue:descriptive-audio-tracks
Mar 8, 2023
Merged

feat: Add support for descriptive audio tracks#338
LuanRT merged 1 commit intoLuanRT:mainfrom
absidue:descriptive-audio-tracks

Conversation

@absidue
Copy link
Collaborator

@absidue absidue commented Mar 5, 2023

Description

Turns out that YouTube also supports descriptive audio tracks not just dubs (courtesy of TeamNewPipe/NewPipeExtractor#1026)

This pull request adds a new field to the Format class is_descriptive and also refactors the DASH manifest code to support descriptive audio tracks. Previously in #308 I did the grouping based on the language, now that we know that it's not the only differentiating factor between audio tracks, I decided to group them based on the audio track id that YouTube provides. That also makes it easier to add support for additonal audio track types in the future, if we find out there are more.

Example video: https://www.youtube.com/watch?v=TjxC-evzxdk

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
Copy link
Owner

LuanRT commented Mar 7, 2023

Nice, I had no idea YouTube supported these. Very interesting.

Will test & review this PR today. Thanks!

Edit:
Done. Tested with shaka player and both audio tracks from the example video were detected.

@LuanRT LuanRT merged commit 574b67a into LuanRT:main Mar 8, 2023
@absidue absidue deleted the descriptive-audio-tracks branch March 8, 2023 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants