Skip to content

Installing yt-dlp

Two things go on the machine: yt-dlp itself, and ffmpeg, which does the merging and audio work (chapter 2). Get both before the first download, or the first download is where you will meet the missing-ffmpeg error instead.

The way the lab did it: pip in a venv

yt-dlp is a Python program. Installing it into a virtual environment (a private folder of Python packages, a venv) keeps it clear of the system Python:

python3 -m venv ~/yt-dlp-venv
~/yt-dlp-venv/bin/pip install -U yt-dlp
~/yt-dlp-venv/bin/yt-dlp --version

Check: the lab's prints 2026.10.21. The version is a date — year, month, day — because the program is rebuilt constantly as sites change. Either use the full path to the venv's yt-dlp, or activate the venv first (source ~/yt-dlp-venv/bin/activate) so plain yt-dlp works. From here on the guide writes plain yt-dlp.

Updating later is the same pip install -U yt-dlp again. An out-of-date yt-dlp is the single most common cause of "it stopped working" — chapter 14 starts there for a reason.

Other honest routes

  • pipx (pipx install yt-dlp) — the same idea as the venv, automated; the tidy choice on a machine you use daily.
  • The standalone file from the project's releases page — one file, no Python needed; it can update itself with yt-dlp -U. On Windows this is the simplest route.
  • Your distro's package (apt, dnf, Homebrew on a Mac) — easy, and often old. Check yt-dlp --version after installing; a version from last year is a shelf of extractors that sites have already moved past. Prefer the routes above when you can.

Windows and macOS notes: the commands in this guide are the same; use the standalone file or pipx, and note that paths in output templates use the same %(field)s syntax everywhere (chapter 6).

ffmpeg

sudo apt install ffmpeg        # Debian / Ubuntu
brew install ffmpeg            # macOS with Homebrew
winget install Gyan.FFmpeg     # Windows
ffmpeg -version | head -1

Check: any recent version is fine; the lab verified against 8.1.2. If yt-dlp cannot find ffmpeg where it expects, say where it is with --ffmpeg-location /path/to/ffmpeg.

First smoke test

yt-dlp -F https://video.blender.org/videos/watch/bf1f3fb5-b119-4f9f-9930-8e20e892b898

Check: a short table of formats for a Blender Foundation film — four rows of MP4 at 240p to 720p (transcript t02 has the lab's). Nothing downloads; -F only lists. Chapter 4 turns that list into a file.