Closed pekkarr closed 2 years ago
Good catch! It seems that in some cases the highest quality stream is the first one and in other cases the last one. I changed the selection logic on the master branch to choose the program ID with highest bitrate and both video and audio streams. At least Tuntematon sotilas is now downloaded correctly.
Downloading https://areena.yle.fi/1-3554229 with ffmpeg backend fails with the following error and nothing is downloaded.
(
--backend ffmpeg
prevents falling back to wget backend)The ffmpeg command uses maps
-map '0:p:1:s?' -map 0:p:1:v -map 0:p:1:a
i.e. yle-dl chose to map streams from program_id 1. However, ffprobe with the stream URL tells that program_id 1 does not have a video stream but program_id 0 has, which is the reason why map0:p:1:v
fails.The program_id is chosen here by selecting the largest program_id available. In this case however selecting program_id 0 would allow the stream to be downloaded and this was the behavior before commit 327b0baf815c30e2da319f3ffcad4eaab421ef4c.