How to use youtube-dl script to download starting from some index in a playlist?


How to download playlist using youtube-dl from start certain number to an upper limit?

I tried to use in the code:

youtube-dl -o '~/Documents/%(playlist)s/%(chapter_number)s - %(chapter)s/%(playlist_index)s - %(title)s.%(ext)s' URL

and it stopped in the middle. I want to restart the process from the index ith numbered video, and not have it start over from the beginning.

Asked By: hadar



youtube-dl --help, contains:

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.

Thus, the option --playlist-start NUMBER should help you to start the playlist in the middle, specified by NUMBER.

Answered By: Heiko Oberdiek

I have total 135 videos in my playlist. I have successfully downloaded 38 of them. So I manually used this command.

youtube-dl --playlist-start 39 -u [email protected] -p mypassword

Its downloading my remaining 97 videos.

Answered By: Ravi Yadav

This helped:

youtube-dl -f best <playlist link> --playlist-start 15

-f best selects the best video formats. use youtube-dl –help for more options

Answered By: redolF
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.