Ubuntu – How to download playalist except certain videos in youtube-dl

youtube-dl

I want to download a play list from youtube, where the first 6 videos in the playlist have been deleted by their channel. When I tried to download it using youtube-dl, it's getting interupted because the first video was not found. Then it is terminating, but not continuing to download the next video. How can I download the playlist from the 7nth video in the play list and onwards.

the command I used.

youtube-dl -f 22 https://www.youtube.com/playlist?list=PLO-hrPk0zuI18xlF_480s6UiaGD7hBqJa

Best Answer

You can use the following switch:

 --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.

So it would be:

youtube-dl -f 22 --playlist-items 7-X https://www.youtube.com/playlist?list=PLO-hrPk0zuI18xlF_480s6UiaGD7hBqJa

where X is the number of videos in the playlist.