Skip to content

Latest commit

 

History

History
40 lines (24 loc) · 1.66 KB

youtube-dl.md

File metadata and controls

40 lines (24 loc) · 1.66 KB

Back to Cheatsheets Index

youtube-dl Cheatsheet

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.

Download best quality format of a video

yt-dlp <VIDEO-URL>

Note: default best quality on YouTube is almost always a webm which limits reuse

Download all videos from a channel in best quality format

yt-dlp <CHANNEL-URL>

Note: default best quality on YouTube is almost always a webm which limits reuse

List available quality formats

yt-dlp -F <VIDEO-URL>

Download specific quality format

yt-dlp -f 18 <VIDEO-URL>

Download and combine two specific quality formats

yt-dlp -f 137+140 <VIDEO-URL>

Download highest quality mp3 audio from video and use thumbnail as album art and embed metadata

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.

Download best quality format of video and embed en subtitles

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