youtube-dl, yt-dlp¶
youtube-dl is a nice little tool to download videos and audio from youtube and millions of other sites.
download playlist with correct numbering¶
like 01, 02, 03 and so on.
download mp4 format¶
download best video format with mp4 extension¶
download embedded videos¶
e.G. vimeo videos embedded as an iframe, send a referer with the request:
youtube-dl "https://player.vimeo.com/video/1234" --referer "https://example.com/where-you-found-that-page/"
extract audio¶
... and remove ads
extract mp3 from soundcloud¶
requires the -x
flag
download podcasts¶
yt-dlp can also be used as a podcatcher for regular RSS feeds. I'm using this to archive a few podcasts, using the -o
formatting options they'll be saved into a folder with the podcast name and title + file extension as the filename
yt-dlp -o "/backup/podcasts/%(playlist)s/%(title)s.%(ext)s" --restrict-filenames --download-archive archive.txt --no-post-overwrites -i https://example.com/feed/podcast/
use cookies from browser¶
should also work with chrome
and safari
instead of firefox
. there's more in the docs
use a config file for yt-dlp¶
you can put the command line arguments in a file and let yt-dlp always use the config file so you don't need to pass the arguments to it. it can then still be combined with other flags such as the --cookies-from-browser
thing
or use --ignore-config
to not use the config file, otherwise:
create the folder and file ~/.config/yt-dlp/config
and put your arguments in there, here's my example: