youtube-dl Commands

Update April 12th, 2022: I am now using yt-dlp exclusively. Lately, the download speed for youtube-dl has been decreasing to about 60KiB/s for me, which was way too slow. I found this thread and noticed that I do not have these issues with yt-dlp. yt-dlp is a fork youtube-dl with some improvements and new features. It is important to know, that it seems to alter the default file name format, at least for YouTube downloads. Use the flag ‘-o “%(title)s-%(id)s.%(ext)s”‘ to make it use the same file name format as youtube-dl.

Some useful commands for youtube-dl:

Download an entire YouTube playlist to the current directory, limiting the download to 7M, ignoring errors and saving all files as mp4:

youtube-dl --ignore-errors -r 7M -i -f mp4 --yes-playlist 'PLAYLIST_ID_HERE'

Some useful commands for yt-dlp (a generally better fork of youtube-dl):

Download an entire YouTube playlist to the current directory, using the same file name format as youtube-dl does by default, adding SponsorBlock segments, if available:

yt-dlp --sponsorblock-mark all -o "%(title)s-%(id)s.%(ext)s" -f b --ignore-errors https://www.youtube.com/playlist?list=PLAYLIST_ID_HERE