Search code examples
youtubeyoutube-dl

YouTube Playlist Download


I have a Youtube playlist, I want to download it but I want youtube-dl to name the files like 1-{video name}, 2-{video name}, ... n-{video name} in order to be able to watch them in the same sequence as original Youtube playlist. In other words I need my downloaded videos to be prefixed with numbers. How to do it?


Solution

  • Use an output template:

    youtube-dl -o "%(playlist_index)s.%(title)s-%(id)s.%(ext)s" PLAYLIST_URL
    

    Replace PLAYLIST_URL with the URL of your playlist.