youtube-dl is a command line utility to download videos from Youtube and in this tutorial you will learn how to use it.

Table of Contents


There are several ways to install youtube-dl:

sudo curl -L -o /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl
sudo wget -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl
sudo pip install --upgrade youtube_dl




  • -o <filename>: set a name for the output file.
  • -f FORMAT: specify a quality format. FORMAT is an expression that describes format or formats you would like to download:
    -f "bestvideo[height<=1080,ext=webm]+bestaudio[ext=webm]"
    • best: Best quality format.
    • worst: Worst quality format.
    • bestvideo: Best quality video-only format (e.g. DASH video).
    • worstvideo: Worst quality video-only format.
    • bestaudio: Best quality audio only-format.
    • worstaudio: Worst quality audio only-format.
    • height: Height of the video, if known.
    • ext: File extension.
    • More options.


A GUI frontend for youtube-dl.


Other programs


yt-dlp is a youtube-dl fork you can install in a similar way than youtube-dl (choose one of the methods):

sudo curl -L -o /usr/local/bin/yt-dlp
sudo chmod a+rx /usr/local/bin/yt-dlp
sudo wget -O /usr/local/bin/yt-dlp
sudo chmod a+rx /usr/local/bin/yt-dlp
sudo aria2c --dir /usr/local/bin -o yt-dlp
sudo chmod a+rx /usr/local/bin/yt-dlp
python3 -m pip install -U yt-dlp

Usage is similar to youtube-dl (run yt-dlp -h for more info).


A graphical video and audio downloader, compatible with several websites.


If you have any suggestion, feel free to contact me via social media or email.