我知道如何选择单个视频的格式。但是,如果我想下载一个包含所有 360P 格式的视频的播放列表,我该怎么做?谢谢!
答案1
首先检查您想要的视频质量的格式代码:
$ youtube-dl -F https://www.youtube.com/playlist?list=PLSXu8_7Y8pIb7BraT3mpyCBDk7RQ2QZlb
此命令为您提供:
format code extension resolution note
139 m4a audio only DASH audio 48k , m4a_dash container, mp4a.40.5@ 48k (22050Hz)
249 webm audio only DASH audio 50k , opus @ 50k, 762.50KiB
250 webm audio only DASH audio 59k , opus @ 70k, 866.37KiB
171 webm audio only DASH audio 90k , vorbis@128k, 1.28MiB
251 webm audio only DASH audio 108k , opus @160k, 1.53MiB
140 m4a audio only DASH audio 127k , m4a_dash container, mp4a.40.2@128k (44100Hz)
160 mp4 256x144 DASH video 77k , avc1.4d400c, 30fps, video only
278 webm 256x144 144p 99k , webm container, vp9, 30fps, video only, 968.10KiB
242 webm 426x240 240p 172k , vp9, 30fps, video only, 1.44MiB
133 mp4 426x240 DASH video 192k , avc1.4d4015, 30fps, video only
134 mp4 640x360 DASH video 306k , avc1.4d401e, 30fps, video only
243 webm 640x360 360p 361k , vp9, 30fps, video only, 2.78MiB
244 webm 854x480 480p 618k , vp9, 30fps, video only, 4.66MiB
135 mp4 854x480 DASH video 720k , avc1.4d401f, 30fps, video only
247 webm 1280x720 720p 1362k , vp9, 30fps, video only, 9.98MiB
136 mp4 1280x720 DASH video 1446k , avc1.4d401f, 30fps, video only
17 3gp 176x144 small , mp4v.20.3, mp4a.40.2@ 24k
36 3gp 320x180 small , mp4v.20.3, mp4a.40.2
43 webm 640x360 medium , vp8.0, vorbis@128k
18 mp4 640x360 medium , avc1.42001E, mp4a.40.2@ 96k
22 mp4 1280x720 hd720 , avc1.64001F, mp4a.40.2@192k (best)
因此,从这里我们知道 360p 格式代码是 18
现在,要以这种格式下载整个播放列表,只需启动:
$ youtube-dl -citf 18 https://www.youtube.com/playlist?list=PLSXu8_7Y8pIb7BraT3mpyCBDk7RQ2QZlb