Document: WR-005 P. Webb
2024.11.08
youtube-dl tips & tricks
Body
Everyone knows youtube-dl doesn’t really work these days. What
does work is the successor, yt-dlp[1]. I install it
via brew[2]:
brew install yt-dlp
Here’s the contents of my ~/.config/yt-dlp/config (it automatically
titles videos I download):
--format-sort "ext"
-o ~/Movies/%(title)s.%(ext)s
Finally, here’s what’s in my ~/.zshrc (I use zsh[3]):
alias yt="yt-dlp"
ig() {
yt $1 -f mp4
}
Downloading YouTube videos is as easy as:
yt https://www.youtube.com/watch?v=_5zwYVh8i5w
And Instagram videos:
# this is an hour-long video and Instagram pauses playback if you dare multitask
ig https://www.instagram.com/p/DCDRaRoxJYW/