YouTube Format IDs

title
YouTube Format IDs
type
summary
summary
YouTube's numeric format codes (itags) — which carry which codec and resolution, which are gone, and what that means when choosing a yt-dlp -f
tags
youtube, yt-dlp, video, reference
created
2026-09-14
updated
2026-09-14

Every stream YouTube serves has a numeric id, called an itag or format code. It is the number yt-dlp -F prints in its first column and what -f accepts. The most complete public list is a gist started by AgentOak in 2019 and maintained by Martin Eesmaa since 2022, last updated 20 August 2026 at the time of clipping. This page keeps what matters when picking a format; the gist has the full tables and the example videos where rare formats were spotted.

Which ids a given video offers depends on its age and popularity, so a list like this says what can exist, not what -F will show.

Video and audio arrive separately

Almost everything above 360p is DASH: video-only and audio-only streams that the client combines. That is why yt-dlp format strings are written as video+audio, and why a merge step (ffmpeg) is needed to get one file. The streaming template in the gist is simply:

bestvideo+bestaudio/best

Muxed formats, with picture and sound in one file, are nearly gone. Format 18 (360p H.264 with AAC in MP4) is still offered. Format 22, the 720p muxed MP4 that old scripts relied on, stopped being produced for new uploads on 21 June 2024, and format 17, the 144p 3GP for old phones, went in May 2024. Any script whose fallback chain ends in 22 now falls through to something else.

Video ids by codec

Each resolution comes in a family of codecs, and the id says which. At 1080p, for example, 137 is H.264 in MP4, 248 is VP9 in WebM, 303 is VP9 at high frame rate, and 399 is AV1. The pattern runs from 144p (160 H.264, 278 VP9, 394 AV1) up to 4320p (138 H.264, 272 VP9, 402 and 571 AV1), though the higher rungs are offered for far fewer videos.

The gist's notes carry most of the practical detail:

  • AV1 variants are only produced for popular videos, and every AV1 variant can be HDR — there is no separate non-HDR AV1 ladder.
  • High-frame-rate videos no longer get non-HFR H.264 or VP9 variants at 1080p and above, and H.264 above 1080p survives only for 360° videos.
  • A few ids (356, 712) are YouTube Premium formats that need an account's cookies.
  • Since late 2025 YouTube upscales some low-resolution videos with AI super resolution; those formats carry an -sr suffix.
  • HLS (m3u8) streams duplicate the DASH ones under different ids: 270 over HLS is the same stream quality as 137 over HTTPS. The gist has the full mapping, which is what explains two rows that look identical in -F output.

Audio ids

The two that matter for nearly every video are 140 (AAC-LC, 128 kbps, MP4) and 251 (Opus, about 128 kbps, WebM). Below them sit 139 (HE-AAC, 48 kbps) and 249/250 (Opus, about 50 and 70 kbps). Surround formats such as 256, 258 and 328 appear only on some demo videos, 773 is an IAMF binaural track, and 141 (AAC, 256 kbps) and 774 (Opus, about 256 kbps) are higher-bitrate YouTube Music streams limited to Premium accounts.

Two quirks come with workarounds. 599 and 600, the lowest-bitrate AAC and Opus, are restricted to the mobile web client since February 2025 and need --extractor-args "youtube:player_client=mweb;formats=missing_pot". And 139 does not show up in a default -F at all; --extractor-args "youtube:player_client=all" lists it.

For ytfetch

The vault's tools/ytfetch mostly reads captions and never needs a media format. Its whisper fallback does: it downloads with -f bestaudio, which on an ordinary video usually means 251 or 140, and converts the result to 16 kHz mono WAV for whisper.cpp. The fixed output name audio.m4a need not match the container that arrives, which is harmless because ffmpeg detects the format from the file contents rather than the name.

Since whisper resamples to 16 kHz mono anyway, a 128 kbps stereo stream is more than it can use, and a chain like 249/139/bestaudio would cut the download to well under half. Whether the lower bitrate costs transcription accuracy has not been measured here.

Downloads can also stall before starting: the gist reports that since late 2025 YouTube adds a delay before downloads begin, and recommends keeping yt-dlp current (pip install -U yt-dlp) as the first fix for any extraction failure.

gallery-dl is the same extractor-per-site idea applied to image galleries, and can hand video off to yt-dlp. The talk pages written through ytfetch, such as kelley-dont-take-the-black-pill, show what the captions path produces.