youtube-dl 使用简介

这个写的很好,我快写完了发现这篇,就把我的垃圾文删了一下

https://ylface.com/course/744

前提是先安装python

首先下载youtube-dl,百度一搜就有了,或者用这个

链接: https://pan.baidu.com/s/1NvPNS_jk8WH8qgfn74FjwQ

提取码: 65jb

 

下载完放到某个盘符根目录,比较好操作嘛

进入命令行工具,我用的win10,所以是cmd了

方式1

默认最优下载

youtube-dl https://www.youtube.com/watch?v=9NNiHZ8Yjzg

方式2

列出所有视频和音频尺寸列表

youtube-dl -F https://www.youtube.com/watch?v=9NNiHZ8Yjzg

返回例如以下内容

249          webm       audio only tiny   53k , opus @ 50k (48000Hz), 1.09MiB
250          webm       audio only tiny   66k , opus @ 70k (48000Hz), 1.37MiB
251          webm       audio only tiny  127k , opus @160k (48000Hz), 2.48MiB
140          m4a        audio only tiny  130k , m4a_dash container, mp4a.40.2@128k (44100Hz), 2.99MiB
278          webm       256x144    144p   97k , webm container, vp9, 30fps, video only, 2.17MiB
160          mp4        256x144    144p  110k , avc1.4d400c, 30fps, video only, 1.58MiB
133          mp4        426x240    240p  205k , avc1.4d4015, 30fps, video only, 2.56MiB
242          webm       426x240    240p  222k , vp9, 30fps, video only, 3.21MiB
243          webm       640x360    360p  409k , vp9, 30fps, video only, 5.54MiB
134          mp4        640x360    360p  427k , avc1.4d401e, 30fps, video only, 4.69MiB
244          webm       854x480    480p  757k , vp9, 30fps, video only, 8.39MiB
135          mp4        854x480    480p  769k , avc1.4d401f, 30fps, video only, 7.30MiB
136          mp4        1280x720   720p 1142k , avc1.4d401f, 30fps, video only, 12.33MiB
247          webm       1280x720   720p 1417k , vp9, 30fps, video only, 14.22MiB
18           mp4        640x360    360p  529k , avc1.42001E, mp4a.40.2@ 96k (44100Hz), 12.22MiB (best)

 

然后可以选择单独下载一个视频或音频,或者下载组合内容

# 组合下载 youtube-dl -f 136+140 https://www.youtube.com/watch?v=9NNiHZ8Yjzg # 单独下载 youtube-dl -f 136 https://www.youtube.com/watch?v=9NNiHZ8Yjzg

 

还是去看顶部链接吧,他写的好看

249 webm audio only tiny 53k , opus @ 50k (48000Hz), 1.09MiB 250 webm audio only tiny 66k , opus @ 70k (48000Hz), 1.37MiB 251 webm audio only tiny 127k , opus @160k (48000Hz), 2.48MiB 140 m4a audio only tiny 130k , m4a_dash container, mp4a.40.2@128k (44100Hz), 2.99MiB 278 webm 256x144 144p 97k , webm container, vp9, 30fps, video only, 2.17MiB 160 mp4 256x144 144p 110k , avc1.4d400c, 30fps, video only, 1.58MiB 133 mp4 426x240 240p 205k , avc1.4d4015, 30fps, video only, 2.56MiB 242 webm 426x240 240p 222k , vp9, 30fps, video only, 3.21MiB 243 webm 640x360 360p 409k , vp9, 30fps, video only, 5.54MiB 134 mp4 640x360 360p 427k , avc1.4d401e, 30fps, video only, 4.69MiB 244 webm 854x480 480p 757k , vp9, 30fps, video only, 8.39MiB 135 mp4 854x480 480p 769k , avc1.4d401f, 30fps, video only, 7.30MiB 136 mp4 1280x720 720p 1142k , avc1.4d401f, 30fps, video only, 12.33MiB 247 webm 1280x720 720p 1417k , vp9, 30fps, video only, 14.22MiB 18 mp4 640x360 360p 529k , avc1.42001E, mp4a.40.2@ 96k (44100Hz), 12.22MiB (best)

上一篇:MySQL创建只读用户


下一篇:剑桥雅思写作高分范文ESSAY60