Skip to content

Can not download audio stream if language appears multiple times #120

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

Open
DeveloperOl opened this issue Feb 25, 2025 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@DeveloperOl
Copy link

Having the following scenario, it is impossible for me to select the correct audio stream, as two streams have the same language.

12:03:02  INFO   audio mp4a.40.2         |    65 Kbps |   lang=fr role=main
12:03:02  INFO   audio mp4a.40.2         |    96 Kbps |   lang=fr role=main
12:03:02  INFO   audio mp4a.40.2         |   190 Kbps |   lang=fr role=main
12:03:02  INFO   audio mp4a.40.2         |    65 Kbps |   lang=en role=main
12:03:02  INFO   audio mp4a.40.2         |    96 Kbps |   lang=en role=main
12:03:02  INFO   audio mp4a.40.2         |   190 Kbps |   lang=en role=main
12:03:02  INFO   audio mp4a.40.2         |    96 Kbps |   lang=ru role=main
12:03:02  INFO   audio mp4a.40.2         |    65 Kbps |   lang=ru role=main
12:03:02  INFO   audio mp4a.40.2         |   190 Kbps |   lang=ru role=main
12:03:02  INFO   audio mp4a.40.2         |    96 Kbps |   lang=es role=main
12:03:02  INFO   audio mp4a.40.2         |    65 Kbps |   lang=es role=main
12:03:02  INFO   audio mp4a.40.2         |   190 Kbps |   lang=es role=main
12:03:02  INFO   audio mp4a.40.2         |    65 Kbps |   lang=it role=main
12:03:02  INFO   audio mp4a.40.2         |    96 Kbps |   lang=it role=main
12:03:02  INFO   audio mp4a.40.2         |   190 Kbps |   lang=it role=main
12:03:02  INFO   audio mp4a.40.2         |    65 Kbps |   lang=de
12:03:02  INFO   audio mp4a.40.2         |    96 Kbps |   lang=de
12:03:02  INFO   audio mp4a.40.2         |   190 Kbps |   lang=de
12:03:02  INFO   audio mp4a.40.2         |    65 Kbps |   lang=de role=main
12:03:02  INFO   audio mp4a.40.2         |    96 Kbps |   lang=de role=main
12:03:02  INFO   audio mp4a.40.2         |   190 Kbps |   lang=de role=main

One is German audio and the other is German, but with audio description.

using --prefer-language de or leave it out, result in the wrong stream being selected.
12:03:02 INFO Audio stream selected: bw=190 Kbps lang=de codec=mp4a.40.2

It would be great to be able to either download all audio streams, or chose the "correct" one.

@emarsden
Copy link
Owner

Indeed. I might add support for selecting streams by id, as well as for retrieving (and muxing together) all audio streams.

@emarsden emarsden added the enhancement New feature or request label Feb 26, 2025
@upamanyudas
Copy link

That would be great to have support for selecting specific streams.
Something like yt-dl : --quality <video-stream-id>+<audio-stream-id>

I'm in a similar situation, and would like to select the 2nd 1080p stream.

11:03:04  INFO   audio mp4a.40.2         |   125 Kbps |  lang=und
11:03:04  INFO   video vp9               |  2246 Kbps | 1920x1080
11:03:04  INFO   video vp9               |  1269 Kbps | 1920x1080
11:03:04  INFO   video vp9               |   732 Kbps |  1280x720
11:03:04  INFO   video vp9               |   439 Kbps |  1024x576
11:03:04  INFO   video vp9               |   253 Kbps |   640x360
11:03:04  INFO   video vp9               |   146 Kbps |   480x270

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants