如何使用 youtube-dl
指定起始位置和上限下载播放列表呢?
我尝试在代码中使用以下命令:
youtube-dl -o '~/Documents/%(playlist)s/%(chapter_number)s - %(chapter)s/%(playlist_index)s - %(title)s.%(ext)s' URL
它停在中间。我想从索引为i
的视频重新启动进程,而不是从头开始。
如何使用 youtube-dl
指定起始位置和上限下载播放列表呢?
我尝试在代码中使用以下命令:
youtube-dl -o '~/Documents/%(playlist)s/%(chapter_number)s - %(chapter)s/%(playlist_index)s - %(title)s.%(ext)s' URL
它停在中间。我想从索引为i
的视频重新启动进程,而不是从头开始。
youtube-dl --help
, 包含:
Video Selection:
--playlist-start NUMBER Playlist video to start at (default is 1)
--playlist-end NUMBER Playlist video to end at (default is last)
--playlist-items ITEM_SPEC Playlist video items to download. Specify
indices of the videos in the playlist
separated by commas like: "--playlist-items
1,2,5,8" if you want to download videos
indexed 1, 2, 5, 8 in the playlist. You can
specify range: "--playlist-items
1-3,7,10-13", it will download the videos
at index 1, 2, 3, 7, 10, 11, 12 and 13.
因此,选项--playlist-start NUMBER
可以帮助您从指定的NUMBER
开始播放中间的播放列表。我播放列表中共有135个视频。其中已成功下载了38个,于是我手动使用了这个命令。
youtube-dl --playlist-start 39 -u uname@gmail.com -p mypassword https://www.udemy.com/learn-ethical-hacking-from-scratch/learn/v4/content
正在下载我剩下的97个视频。
ERROR: Unable to download webpage: <urlopen error [Errno 1] _ssl.c:504: error:14 07742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version> (caused by URLError(SSLError(1, '_ssl.c:504: error:1407742E:SSL routines:SSL23_GET_SERV ER_HELLO:tlsv1 alert protocol version'),))
请问你能帮我下载这些视频吗? - HunterrD:\tutorials>youtube-dl -u email -p password https://www.udemy.com/data-analysis-with-pandas/learn/v4/
。 - Hunterryoutube-dl -f best <playlist link> --playlist-start 15
-f best 选择最佳的视频格式。使用 youtube-dl --help 了解更多选项。
youtube-dl -i -f mp4 --yes-playlist --playlist-start 'start_index' 'https://www.youtube.com/watch?v=7Vy8970q0Xc&list=PLwJ2VKmefmxpUJEGB1ff6yUZ5Zd7Gegn2'
在使用ffmpeg之前使用内置的音频格式可以减少享受音乐或视频所需的时间。在后台,您可以获得更好的格式