yt-dlp Guide Beginner

A complete beginner-friendly guide to downloading and managing media using yt-dlp.

Step 1: Install yt-dlp

Before we can download anything, we need to install yt-dlp on your system. yt-dlp is a command-line tool, meaning it runs inside your terminal instead of a graphical app.

On Linux systems, installation is usually very simple because yt-dlp is available through package managers. This is the recommended method because it automatically handles updates and dependencies for you.

One important dependency is FFmpeg. FFmpeg is a powerful media tool that yt-dlp uses to combine audio and video streams, as well as convert formats like MP4 and MP3.

sudo pacman -S yt-dlp ffmpeg
  • pacman -S installs packages on Arch Linux
  • yt-dlp is the media downloading tool
  • ffmpeg handles media conversion and merging

Once installed, you can verify everything is working by running a version check in your terminal.

Step 2: MP3 Download

Extract audio from videos and convert it into MP3 format.

yt-dlp -x --audio-format mp3 "URL"
  • -x extracts audio only
  • --audio-format mp3 converts output into MP3
  • "URL" is the video link you want to download

Step 3: MP4 Download

Download video + audio and merge into MP4 format.

yt-dlp -f "bv*[height<=720]+ba/b" --merge-output-format mp4 "URL"
  • -f selects a custom video/audio format
  • height<=720 limits resolution to 720p
  • --merge-output-format mp4 outputs final file as MP4

Step 4: Aliases

Create shortcuts for faster command usage.

alias ytmp3='yt-dlp --no-playlist -x --audio-format mp3'
alias ytmp4='yt-dlp --no-playlist -f "bv*[height<=720]+ba/b" --merge-output-format mp4'
  • alias creates a terminal shortcut
  • ytmp3 becomes a quick MP3 download command
  • ytmp4 becomes a quick MP4 download command

Subscribe

Get Linux & terminal tutorials straight to your inbox.