Note: this cheatsheet is for yt-dlp
, a fork of youtube-dl
which fixes a number of issues I have with the orgional
Note: ffmpeg
must be installed for many commands to work to allow for combining separately downloaded video and audio streams.
Note: this is primarily for downloading from YouTube but it also works for plenty of other platforms.
yt-dlp <VIDEO-URL>
Note: default best quality on YouTube is almost always a webm which limits reuse
yt-dlp <CHANNEL-URL>
Note: default best quality on YouTube is almost always a webm which limits reuse
yt-dlp -F <VIDEO-URL>
yt-dlp -f 18 <VIDEO-URL>
yt-dlp -f 137+140 <VIDEO-URL>
yt-dlp --extract-audio --add-metadata --xattrs --embed-thumbnail --audio-quality 0 --audio-format mp3 <VIDEO-URL>
Note: this is useful for musical works not available for purchase/download due to either platform exclusivity, region blocking, DRM or the passing of the artist, however in those situations always seek an alternative way to support the creators.
yt-dlp --write-subs en <VIDEO-URL>
Note: default best quality on YouTube is almost always a webm which limits reuse
Note: subtitle language may not always be consistent eg. en
, en-us
, english