A Youtube video can be watched standalone or it could be a part of a playlist.
https://www.youtube.com/watch?v=vbsNiOkm0BU and

Notice the part vbsNiOkm0BU.

The question is to get this part for all the videos of the channel/playlist.

The motive is to download all the videos of this channel (approximately 3600). But I haven't got success with youtube-dl downloading all at once.
So I wish to download it in bunch of 100s, as an example.

If I could take this question further, can I write a bash script to download only particular indexes of a playlist?

If you see the above link:
Notice the part &index=141.

Now if do something like this:

for i in {100..200}
youtube-dl https://www.youtube.com/watch?v=vbsNiOkm0BU&index=${i}&list=UUmM7KPLEthAXiPVAgBF6rhA

Notice the part &index=${i}.

This is downloading the same video again and again, due to vbsNiOkm0BU.

Any help on this would be greatly appreciated. Thank you.

1 Answer 1



youtube-dl -f FORMAT -ciw --output '%(title)s.%(ext)s' --playlist-start NUMBER-START --playlist-end NUMBER-END <url-of-playlist>  

...where <url-of-playlist> is replaced by the URL of the playlist, replace FORMAT with any available video format, for example 18, NUMBER-START is the number of the video in the playlist to start downloading first, and NUMBER-END is the number of the video in the playlist to download last.


If a channel has more than one playlist, click on the first playlist and download all the videos in the selected playlist using the above command. Then repeat for each playlist in the channel.


-f, --format FORMAT
    video format code. The -F option (capital F) displays all available video  
    formats for a video link. Example: youtube-dl -F <url-of-video>

-c, --continue                   
    force resume of partially downloaded files

-i, --ignore-errors              
    continue on download errors, for example to skip unavailable videos  
    in a channel   

-w, --no-overwrites
    do not overwrite files 

Convert all the video titles to lowercase

youtube-dl -f FORMAT -ciw --output '%(title)s.%(ext)s' --playlist-start NUMBER-START --playlist-end NUMBER-END <url-of-playlist>     
find -type f -exec rename 'y/A-Z/a-z/' {} +


--output '%(title)s.%(ext)s'  
    output file name(s) as the name of the video, followed by a dot character and the video's extension  

find -type f 
    Find all files.

    Transliterate the characters in the pattern space which appear in source   
    to the corresponding character in destination.
  • Thank you! That worked! Just one more query, can I convert all the video titles to lower cases while downloading? I can specify the format like --output "%(title)s". Can I also convert it to lower case? Dec 7, 2016 at 10:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .