Yt-dlp Notes
Aus Matts Wiki
This article contains my notes on yt-dlp and how to achieve various things.
Source: https://github.com/yt-dlp/yt-dlp
Examples
Listing available formats
yt-dlp -F yt-dlp --list-formats
This might result in output similar to this:
ID EXT RESOLUTION FPS │ FILESIZE TBR PROTO │ VCODEC VBR ACODEC MORE INFO ─────────────────────────────────────────────────────────────────────────────────────────────────────────────── 233 mp4 audio only │ m3u8 │ audio only unknown [en] Untested, Default, low 234 mp4 audio only │ m3u8 │ audio only unknown [en] Untested, Default, high 230 mp4 640x360 24 │ ~ 40.00MiB 300k m3u8 │ avc1.4D401E 300k video only Untested 605 mp4 640x360 24 │ ~ 70.00MiB 500k m3u8 │ vp09.00.21.08 500k video only Untested 231 mp4 854x480 24 │ ~ 50.00MiB 400k m3u8 │ avc1.4D401E 400k video only Untested 606 mp4 854x480 24 │ ~ 80.00MiB 600k m3u8 │ vp09.00.30.08 600k video only Untested 232 mp4 1280x720 24 │ ~ 90.00MiB 700k m3u8 │ avc1.4D401F 700k video only Untested 609 mp4 1280x720 24 │ ~140.00MiB 1000k m3u8 │ vp09.00.31.08 1000k video only Untested
Download specific formats
Download the best video available with the largest height but no better than 480p or 720p, or the best video with the smallest resolution if there is no video under 480p or 720p
yt-dlp -S "height:480" yt-dlp -S "height:720"
Download specific format for audio and video and merge with ffmpeg:
yt-dlp -f 232+233
