youtube-dl下载youtube视频时查看分辨率以及选择分辨率下载

1、查看分辨率:

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

2、根据分辨率下载,比如下载1280*720的mp4,前面的数字是136

则可以:youtube-dl -f 136 https://www.youtube.com/watch?v=_NMf1TpiFwY

 

另:youtube-dl -f best https://www.youtube.com/watch?v=_NMf1TpiFwY,这个命令一般也可以下载分辨率最好的视频,而是下载的有声音的视频中分辨率最好的。

3、其他一些命令行:

Download best mp4 format available or any other best if no mp4 available

$ youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best'

Download best format available but not better that 480p

$ youtube-dl -f 'bestvideo[height<=480]+bestaudio/best[height<=480]'

Download best video only format but no bigger than 50 MB

$ youtube-dl -f 'best[filesize<50M]'

Download best format available via direct link over HTTP/HTTPS protocol

$ youtube-dl -f '(bestvideo+bestaudio/best)[protocol^=http]'
posted @ 2019-01-18 10:27  向萧  阅读(5184)  评论(0编辑  收藏  举报