Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
youtube-dl not selecting best format #5769
Comments
webm has higher bitrate. |
|
@dstftw thanks for the reply. I understand that the non-DASH videos don't have as much metadata, which can make quality comparisons (without actually downloading the files) impractical. I was looking at the file sizes as a proxy for bitrate, so I missed that the webm (247) supposedly has a slightly higher bitrate than the similar mp4 (136). What I am missing (especially in this case), is a comprehension of how the mp4 can be almost a third larger and yet have a lower bitrate. My understanding is that bitrate is simply file size (in bytes) divided by duration (in seconds) times eight, so the larger file must have a higher bitrate. I don't know what data youtube-dl gets from youtube, and what it computes, but something seems wrong to me somewhere. |
https://www.youtube.com/watch?v=pyUCR-Sfenc is no longer a live video (5754), but....
youtube-dl -F 'https://www.youtube.com/watch?v=pyUCR-Sfenc'
[youtube] pyUCR-Sfenc: Downloading webpage
[youtube] pyUCR-Sfenc: Extracting video information
[youtube] pyUCR-Sfenc: Downloading DASH manifest
[info] Available formats for pyUCR-Sfenc:
format code extension resolution note
171 webm audio only DASH audio 139k , audio@128k (44100Hz), 159.52MiB
140 m4a audio only DASH audio 139k , m4a_dash container, aac @128k (44100Hz), 185.59MiB
141 m4a audio only DASH audio 267k , m4a_dash container, aac @256k (44100Hz), 372.56MiB
160 mp4 256x144 DASH video 154k , 13fps, video only, 157.25MiB
278 webm 256x144 DASH video 178k , webm container, VP9, 13fps, video only, 145.32MiB
133 mp4 426x240 DASH video 288k , 25fps, video only, 352.05MiB
242 webm 426x240 DASH video 374k , 25fps, video only, 311.60MiB
134 mp4 640x360 DASH video 629k , 25fps, video only, 776.31MiB
243 webm 640x360 DASH video 641k , 25fps, video only, 591.01MiB
244 webm 854x480 DASH video 1115k , 25fps, video only, 1.05GiB
135 mp4 854x480 DASH video 1146k , 25fps, video only, 1.42GiB
136 mp4 1280x720 DASH video 2268k , 25fps, video only, 2.80GiB
247 webm 1280x720 DASH video 2309k , 25fps, video only, 2.16GiB
17 3gp 176x144
36 3gp 320x240
5 flv 400x240
43 webm 640x360
18 mp4 640x360
22 mp4 1280x720 (best)
$ youtube-dl 'https://www.youtube.com/watch?v=pyUCR-Sfenc'
[youtube] pyUCR-Sfenc: Downloading webpage
[youtube] pyUCR-Sfenc: Extracting video information
[youtube] pyUCR-Sfenc: Downloading DASH manifest
WARNING: You have requested formats incompatible for merge. The formats will be merged into mkv
[download] Destination: title_altered_by_me.f247.webm
[download] 100% of 2.16GiB in 32:07
[download] Destination: title_altered_by_me.f141.m4a
[download] 100% of 372.56MiB in 05:24
[ffmpeg] Merging formats into "title_altered_by_me.mkv"
Deleting original file title_altered_by_me.f247.webm (pass -k to keep)
Deleting original file title_altered_by_me.f141.m4a (pass -k to keep)
Not sure if I am a fan of (what seems of be the strategy now) getting the best audio and best video and merging them (although that does work for a large percentage of videos), but choosing webm video over an equal resolution mp4 can never be right. The "old" best format, is still quite a bit better than either of them, though:
$ youtube-dl -f 22 'https://www.youtube.com/watch?v=pyUCR-Sfenc'
[youtube] pyUCR-Sfenc: Downloading webpage
[youtube] pyUCR-Sfenc: Extracting video information
[youtube] pyUCR-Sfenc: Downloading DASH manifest
[download] Destination: title_altered_by_me.mp4
[download] 100% of 3.92GiB in 56:48