emarsden / dash-mpd-cli

Download media content from a DASH-MPEG or DASH-WebM MPD manifest
https://emarsden.github.io/dash-mpd-cli/
MIT License
302 stars 33 forks source link

Should prefer 'main' track over alternate if same quality #69

Closed Jean-Daniel closed 3 months ago

Jean-Daniel commented 4 months ago

I'm trying to download a file with 2 audio tracks with the same quality, but one is used for audio description. dash-mpd-cli is choosing the second one with role alternate, instead of favoring the track with role main.

When choosing the track, it should favor track with main role instead.

19:32:40  INFO   audio mp4a.40.2         |    62 Kbps |   lang=fr role=main label=Français
19:32:40  INFO   audio mp4a.40.2         |   125 Kbps |   lang=fr role=main label=Français
19:32:40  INFO   audio mp4a.40.2         |    62 Kbps |   lang=fr role=alternate label=Audiodescription
19:32:40  INFO   audio mp4a.40.2         |   125 Kbps |   lang=fr role=alternate label=Audiodescription
19:32:40  INFO   video avc1.4D400D       |   195 Kbps |   416x234 role=main
19:32:40  INFO   video avc1.4D4015       |   390 Kbps |   480x270 role=main
19:32:40  INFO   video avc1.4D401E       |   586 Kbps |   640x360 role=main
19:32:40  INFO   video avc1.4D401F       |  1172 Kbps |  1024x576 role=main
19:32:40  INFO   video avc1.4D401F       |  1660 Kbps |  1024x576 role=main
19:32:40  INFO   video avc1.4D401F       |  2442 Kbps |  1280x720 role=main
emarsden commented 3 months ago

Thanks for the suggestion. This should be implemented (with a commandline option allowing you to modify the preference ordering for role specifications) in the latest release.