-
Notifications
You must be signed in to change notification settings - Fork 10.6k
-f bestvideo+bestaudio tries mixing codecs that don't match #5298
Description
YouTube started adding support for 4K video at 60 FPS today, which youtube-dl actually downloads if you choose that format. Here's their testing playlist: https://www.youtube.com/playlist?list=PLyqf6gJt7KuHCoYaGNWPx8vkHlClmbO9u
Here's an example format list for one of the videos:
[youtube] fEAyDNWaCto: Downloading webpage
[youtube] fEAyDNWaCto: Extracting video information
[youtube] fEAyDNWaCto: Downloading DASH manifest
[info] Available formats for fEAyDNWaCto:
format code extension resolution note
171 webm audio only DASH audio 128k , audio@128k (44100Hz), 2.57MiB
140 m4a audio only DASH audio 129k , m4a_dash container, aac @128k (44100Hz), 3.12MiB
141 m4a audio only DASH audio 255k , m4a_dash container, aac @256k (44100Hz), 6.19MiB
160 mp4 256x144 DASH video 111k , 15fps, video only, 2.61MiB
278 webm 256x144 DASH video 204k , webm container, VP9, 15fps, video only, 2.36MiB
133 mp4 426x240 DASH video 246k , 30fps, video only, 5.87MiB
242 webm 426x240 DASH video 293k , 30fps, video only, 4.42MiB
243 webm 640x360 DASH video 541k , 30fps, video only, 8.19MiB
134 mp4 640x360 DASH video 607k , 30fps, video only, 9.19MiB
244 webm 854x480 DASH video 975k , 30fps, video only, 14.63MiB
135 mp4 854x480 DASH video 1112k , 30fps, video only, 17.96MiB
247 webm 1280x720 DASH video 1961k , 30fps, video only, 29.53MiB
136 mp4 1280x720 DASH video 2224k , 30fps, video only, 36.12MiB
302 webm 1280x720 DASH video 3123k , VP9, 60fps, video only, 47.73MiB
248 webm 1920x1080 DASH video 3212k , 30fps, video only, 51.73MiB
298 mp4 1280x720 DASH video 3332k , h264, 60fps, video only, 63.46MiB
137 mp4 1920x1080 DASH video 4168k , 30fps, video only, 75.08MiB
303 webm 1920x1080 DASH video 5200k , VP9, 60fps, video only, 81.94MiB
299 mp4 1920x1080 DASH video 5561k , h264, 60fps, video only, 113.71MiB
271 webm 2560x1440 DASH video 9199k , 30fps, video only, 146.26MiB
264 mp4 2560x1440 DASH video 9960k , 30fps, video only, 176.92MiB
308 webm 2560x1440 DASH video 13767k , VP9, 60fps, video only, 229.65MiB
313 webm 3840x2160 DASH video 17713k , VP9, 30fps, video only, 320.36MiB
266 mp4 3840x2160 DASH video 22296k , h264, 30fps, video only, 435.71MiB
315 webm 3840x2160 DASH video 26163k , VP9, 60fps, video only, 488.69MiB
17 3gp 176x144
36 3gp 320x240
5 flv 400x240
43 webm 640x360
18 mp4 640x360
22 mp4 1280x720 (best)
I run youtube-dl with the option -f bestvideo+bestaudio so that I don't end up with the old 720p format, since it works every single time (except in this case). So, bestvideo selects 315 (webm), and bestaudio selects 141 (m4a), and then it tries to mix those incompatible formats in ffmpeg and fails.
Technically the selection behavior itself is correct; it is choosing the best audio and video streams available. The issue is that it's trying to mix incompatible audio and video streams.