I would like to download a youtube video with the best video quality and audio quality.
Based on this answer, I would like to pick the best video and best audio, then merge them together.
However, I'm unsure which one will be the best choice.
The -F
command gave me the following information
249 webm audio only DASH audio 54k , opus @ 50k, 8.60MiB
250 webm audio only DASH audio 68k , opus @ 70k, 10.98MiB
171 webm audio only DASH audio 123k , vorbis@128k, 19.82MiB
140 m4a audio only DASH audio 131k , m4a_dash container, mp4a.40.2@128k, 23.65MiB
251 webm audio only DASH audio 132k , opus @160k, 21.46MiB
160 mp4 256x144 144p 110k , avc1.4d400c, 30fps, video only, 6.48MiB
278 webm 256x144 144p 119k , webm container, vp9, 30fps, video only, 15.64MiB
242 webm 426x240 240p 219k , vp9, 30fps, video only, 16.57MiB
133 mp4 426x240 240p 275k , avc1.4d4015, 30fps, video only, 14.96MiB
243 webm 640x360 360p 409k , vp9, 30fps, video only, 25.87MiB
134 mp4 640x360 360p 520k , avc1.4d401e, 30fps, video only, 26.78MiB
244 webm 854x480 480p 749k , vp9, 30fps, video only, 37.32MiB
135 mp4 854x480 480p 975k , avc1.4d401f, 30fps, video only, 38.80MiB
136 mp4 1280x720 720p 1343k , avc1.4d401f, 30fps, video only, 52.98MiB
247 webm 1280x720 720p 1509k , vp9, 30fps, video only, 65.66MiB
17 3gp 176x144 small , mp4v.20.3, mp4a.40.2@ 24k, 13.90MiB
36 3gp 320x180 small , mp4v.20.3, mp4a.40.2, 41.49MiB
18 mp4 640x360 medium , avc1.42001E, mp4a.40.2@ 96k, 68.85MiB
43 webm 640x360 medium , vp8.0, vorbis@128k, 96.53MiB
22 mp4 1280x720 hd720 , avc1.64001F, mp4a.40.2@192k (best)
I assume
247 = best video available. However, I'm not sure what 1509k mean?
After selecting this, Mediainfo told me that the video has 477kb/s. Was I doing something wrong?
Best Answer
Please read the
youtube-dl
documentation:Note that if you have a specific requirement regarding video and audio codecs or formats used, you should set the format:
YouTube will offer VP9-encoded video and Opus-encoded audio when querying a WebM format; these are the itags starting with a "2". As these are way more efficient (i.e., offer better quality at the same size) than the H.264- and AAC-encoded video and audio streams starting with "1", you could choose
-f webm
for any download.Also, there are more options for querying the format.