Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 739
hadar Avatar asked Jun 17 '17 23:06

hadar


People also ask

Can youtube-dl download a playlist?

By default, Youtube-dl will download the best available quality video. However, it is also possible to download a video or playlist at a specific quality or format.

How do I download a youtube playlist using terminal?

For Windows users: Exctract all zip files and move youtube-dl.exe, ffmpeg.exe and ffprobe.exe files to the folder that where you want the downloaded MP3 files. Open cmd (Windows terminal) in same folder. Replace the script {your-youtube-playlist-id} parameter with your YouTube playlist id. Run the script.


1 Answers

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.

like image 118
Heiko Oberdiek Avatar answered Sep 30 '22 21:09

Heiko Oberdiek