Home · About · Notes · Links · Login

yt-dlp

CodeTool • 2025-05-12

List all formats:

yt-dlp -F https://www.youtube.com/watch?v=XXX

Download a specific format from the list by ID (first column of above output), for example for ID == 401:

yt-dlp -f 401 https://www.youtube.com/watch?v=XXX

Downloading partial videos (e.g. first 03m11s):

yt-dlp --download-sections "*0:00:00-0:03:11" --force-keyframes-at-cuts "https://www.youtube.com/watch?v=XXX"

To download in mp4 format, instead of webm:

yt-dlp -f 137+140 ...

Sometimes a download may fail because a page title is too long. The fix:

yt-dlp -o '%(title).200B.%(ext)s' ...

Download (auto-) subtitles (the command below skips the download of the actual video):

yt-dlp --write-auto-sub --convert-subs=srt --skip-download "https://www.youtube.com/watch?v=XXX"

How to use --cookies-from-browser when it tells you it is required:

yt-dlp --cookies-from-browser firefox "https://www.reddit.com/r/Awww/comments/1h332f6/"

© 2025 by Indro De · Imprint

Limited Mobile Edition