yt-dlp_常用命令

print

yt-dlp --print filename -o "test video.%(ext)s" BaW_jenozKc

test video.webm # Literal name with correct extension

yt-dlp --print filename -o "%(title)s.%(ext)s" BaW_jenozKc

youtube-dl test video ‘’_ä↭𝕐.webm # All kinds of weird characters

yt-dlp --print filename -o "%(title)s.%(ext)s" BaW_jenozKc --restrict-filenames

youtube-dl_test_video_.webm # Restricted file name

playlist

  • Download YouTube playlist videos in separate directory indexed by video order in a playlist
yt-dlp -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" "https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re"
  • Download YouTube playlist videos in separate directories according to their uploaded year
yt-dlp -o "%(upload_date>%Y)s/%(title)s.%(ext)s" "https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re"
  • Prefix playlist index with " - " separator, but only if it is available
yt-dlp -o "%(playlist_index&{} - |)s%(title)s.%(ext)s" BaW_jenozKc "https://www.youtube.com/user/TheLinuxFoundation/playlists"

channel/user

  • Download all playlists of YouTube channel/user keeping each playlist in separate directory:
yt-dlp -o "%(uploader)s/%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" "https://www.youtube.com/user/TheLinuxFoundation/playlists"

Udemy course

  • Download Udemy course keeping each chapter in separate directory under MyVideos directory in your home
yt-dlp -u user -p password -P "~/MyVideos" -o "%(playlist)s/%(chapter_number)s - %(chapter)s/%(title)s.%(ext)s" "https://www.udemy.com/java-tutorial"

videomore

  • Download entire series season keeping each series and each season in separate directory under C:/MyVideos
yt-dlp -P "C:/MyVideos" -o "%(series)s/%(season_number)s - %(season)s/%(episode_number)s - %(episode)s.%(ext)s" "https://videomore.ru/kino_v_detalayah/5_sezon/367617"

subtitles

  • Download video as “C:\MyVideos\uploader\title.ext”, subtitles as “C:\MyVideos\subs\uploader\title.ext” and put all temporary files in “C:\MyVideos\tmp”
yt-dlp -P "C:/MyVideos" -P "temp:tmp" -P "subtitle:subs" -o "%(uploader)s/%(title)s.%(ext)s" BaW_jenoz --write-subs

video & subtitle

  • Download video as “C:\MyVideos\uploader\title.ext” and subtitles as “C:\MyVideos\uploader\subs\title.ext”
yt-dlp -P "C:/MyVideos" -o "%(uploader)s/%(title)s.%(ext)s" -o "subtitle:%(uploader)s/subs/%(title)s.%(ext)s" BaW_jenozKc --write-subs

Stream to

  • Stream the video being downloaded to stdout
yt-dlp -o - BaW_jenozKc
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值