Common Commands

Published 2026-06-01Updated 2026-07-16

Common yt-dlp Commands

Quick commands for listing formats, downloading video, extracting audio, and naming output files with yt-dlp.

yt-dlp Cheatsheet

List Formats

List downloadable formats
yt-dlp -F https://www.youtube.com/watch?v=VIDEO_ID

Look for:

  • format code: the value to pass to -f.
  • resolution: video resolution.
  • ext: container format.

Download Best Quality

yt-dlp -f "bv*+ba/b" https://www.youtube.com/watch?v=VIDEO_ID

Meaning:

  • bv*: best video stream.
  • ba: best audio stream.
  • /b: fallback to the best single-file format if merging is not possible.

Extract Audio

Scenario

Save as mp3

This requires ffmpeg to be available locally. yt-dlp delegates conversion to it.

yt-dlp -x --audio-format mp3 https://www.youtube.com/watch?v=VIDEO_ID

Output Template

yt-dlp -o "%(title)s.%(ext)s" https://www.youtube.com/watch?v=VIDEO_ID

Common template fields:

  • %(title)s
  • %(id)s
  • %(upload_date)s
  • %(ext)s