Notes on...

yt-dlp

Commonly used command line arguments

13. July, 2023
>> Links >> Notes on... yt-dlp

My commonly used command line arguments

Extract only the audio (-x). Additionally define the format with --audio-format=mp3.
-x --audio-format=mp3
Download certain playlist items
--playlist-items 2,3,4,5,6,7
Search for a video using a string. Can be used instead of an URL.
"ytsearch:Pikmin 2 OST - Glutton's Kitchen (Olimar) [Complete]"

My go-to command line calls

Download the audio of a video as an mp3
yt-dlp -x --audio-format=mp3
Only download the thumbnail and convert it to the given image format
yt-dlp --skip-download --write-thumbnail --convert-thumbnails=jpg

My configs

Set the output of every operation to be a folder in the Downloads folder
-o "~/Downloads/youtube-dl/%(title)s.%(ext)s"

Misc

To download a video whose video ID starts with an '-', write '--' inbetween the arguments and the URL. Example:
yt-dlp -o "~/Downloads/youtube-dl/%(title)s.%(ext)s" -x --audio-format=mp3 -- -jEgDO5n71c

Things to figure out