I will tech and share you, using the “youtube-dl or yt-dlp” software properly on your Linux based machines.

This tutorial is just for educational purpose only!

The youtube-dl or yt-dlp software is available publicly for free of cost, you can download the content from YouTube, Dailymotion, Twitch and many more (full list here). I’ll be sharing you the guide to install it to your Linux machine + important and all commands to use.

yt-dlp and youtube-dl are separate software but yt-dlp is like a forked version of youtube-dl and is recommended to use that instead to get good performance.

Their commands are same, just replace name in first from youtube-dl to yt-dlp and rest remains same.

Make sure to subscribe to my YouTube channel already ==> https://www.youtube.com/c/LoferTechOfficial

Install yt-dlp on Linux (Ubuntu etc)

Method 1:

Install using “wget” (run both commands)

sudo wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -O /usr/local/bin/yt-dlp
sudo chmod a+rx /usr/local/bin/yt-dlp

Method 2:

Install using “curl” (run all commands)

apt install curl -y or apt-get install curl
sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp
sudo chmod a+rx /usr/local/bin/yt-dlp

Method 3:

Install using “pip”

python3 -m pip install -U yt-dlp

Your installation should be completed, if got no errors. If you’re still unable to install it, you can always right down in comments with error & i can help you fix or get my paid services on telegram @lofertech

Common commands for yt-dlp

Get, list of available formats:

yt-dlp- F https://www.youtube.com/watch?v=aqz-KE-bpKQ

Download auto quality audio and video:

yt-dlp https://www.youtube.com/watch?v=aqz-KE-bpKQ

Download best quality video and audio:

yt-dlp -f bestvideo+bestaudio https://www.youtube.com/watch?v=aqz-KE-bpKQ

Download specific quality audio and video:

yt-dlp -F https://www.youtube.com/watch?v=aqz-KE-bpKQ

Get video and audio file’s IDs and first use video and then audio ID like following

yt-dlp -f 134+140 https://www.youtube.com/watch?v=aqz-KE-bpKQ

Make output to be specific format (If you download mkv, after downloading it will be saved as mp4):

yt-dlp -f '134+140' --merge-output-format mp4 https://www.youtube.com/watch?v=aqz-KE-bpKQ

Download best quality in specific resolution like height 1080px (if same resolution video isn’t available, it will choose next available less than 1080p:

yt-dlp -f 'bestvideo[height<=1080]+bestaudio/best[height<=1080]' https://www.youtube.com/watch?v=aqz-KE-bpKQ

Download a playlist in mp4 format:

yt-dlp -i -f mp4 --yes-playlist 'https://www.youtube.com/watch?v=7Vy8970q0Xc&list=PLwJ2VKmefmxpUJEGB1ff6yUZ5Zd7Gegn2'

Checkout all commands at their official page => https://github.com/ytdl-org/youtube-dl/blob/master/README.md#options