Skip to content

Instantly share code, notes, and snippets.

@MartinEesmaa
Forked from AgentOak/youtube_formats.md
Last active July 28, 2025 03:09
Show Gist options
  • Save MartinEesmaa/2f4b261cb90a47e9c41ba115a011a4aa to your computer and use it in GitHub Desktop.
Save MartinEesmaa/2f4b261cb90a47e9c41ba115a011a4aa to your computer and use it in GitHub Desktop.
Youtube Format IDs

Note: This is all almost full YouTube ID informations. Original owner goes to AgentOak, modified version by Martin Eesmaa.

See the credits and also special thanks in below.

Last updated: 22 July 2025

Also known as itag or format codes and way back they could be specified with the fmt parameter (e.g. &fmt=22). Depending on the age and/or popularity of the video, not all formats will be available.

DASH video

Resolution AV1 HFR High AV1 HFR AV1 VP9.2 HDR HFR VP9 HFR VP9 H.264 HFR H.264 VP8
MP4 MP4 MP4 WebM WebM WebM MP4 MP4 WebM
4320p 702 402/571 272 138
2160p 701 401 337 315 (313) (305) (266)
1440p 700 400 336 308 (271) (304) (264)
1080p 699 399/721 335 303 248/356 299 137/216 170
720p 698 398 334 302/612 247 298 136/214 169
480p 697 397 333 244 135 168
360p 696 396 332 243 134 167
240p 695 395 331 242 133
144p 694 394 330 278/598 160/597
  • HFR stands for "High Framerate", which means up to 60 FPS, whereas non-HFR is limited to 30 FPS
  • Non-HFR 1080p+ H.264 and VP9 variants are not provided for HFR videos anymore
  • Same IDs are reused for 360° videos
  • 1440p+ H.264 variants are only provided for 360° videos anymore
  • At the moment, AV1 variants are only provided for popular videos
  • All AV1 variants can be HDR (no separate non-HDR AV1 variants are offered)
  • AV1 HFR High: High refers to the bitrate. These variants have ~3-4 times the bitrate of their normal counterparts. Additional side effect is providing AV1 HFR variants for low resolutions (<=480p). These variants are rare even among videos with AV1 variants. Found on this video.
  • AV1 HFR 4320p: Format 571 has roughly 50% higher bitrate than 402. Sometimes only one of them is offered, sometimes both. Can be seen on this video.
  • VP8 can be found this video.
  • At format 356 & 712, it is the only YouTube premium video format and requires your YouTube account subscribed with Premium subscription to pass cookies file. Format 356 is connected to format 616 (available on yt-dlp, not 356) of M3U8.
  • At format 214, some rare videos were encoded and it is linked from format 379 (available on yt-dlp, not 214) of M3U8 can be found this video

Rare videos of AV1

Some rarely videos may get AV1 video codec for low views or/and upload date less than 24 hours for average 10 minutes duration video.

It could be luck or/and conveniency for YouTube's quiet decision.

Here is sample videos:

https://www.youtube.com/watch?v=BizgNeskJ6o (20 hours ago and at least 50 views, reported on 26.06.2025)

https://www.youtube.com/watch?v=r-X4DJxT6gY (4 years ago and unlisted video, got couple months to get AV1)

Duplicate video IDs

Those duplicate video IDs of m3u8 as Apple Native HLS are linked to common numbers, not a rare numbers.

270 (m3u8) == 137 (https) are same video quality, but different protocol.

Thanks, dtlnor for explanation of equalation video IDs.

Also even special thanks, gamer191 to report linked M3U8 codes to common codes.

Graphic table about linked M3U8 codes to common numbers

Code (M3U8) Linked to common code from M3U8
229 133
230 134
231 135
232 136
233 139
234 140
269 160
270 137
311 298
312 299
379 214
602 598
603 278
604 242
605 243
606 244
609 247
612 302
614 248
617 303
620 271
625 313

Raw code:

602 mp4   256x144     12    │ ~  9.28MiB    87k m3u8  │ vp09.00.10.08    87k video only
269 mp4   256x144     24    │ ~ 18.55MiB   175k m3u8  │ avc1.4D400C     175k video only
603 mp4   256x144     24    │ ~ 16.62MiB   156k m3u8  │ vp09.00.11.08   156k video only
229 mp4   426x240     24    │ ~ 34.72MiB   327k m3u8  │ avc1.4D4015     327k video only
604 mp4   426x240     24    │ ~ 30.72MiB   289k m3u8  │ vp09.00.20.08   289k video only
230 mp4   640x360     24    │ ~ 86.22MiB   812k m3u8  │ avc1.4D401E     812k video only
605 mp4   640x360     24    │ ~ 60.27MiB   567k m3u8  │ vp09.00.21.08   567k video only
231 mp4   854x480     24    │ ~144.25MiB  1358k m3u8  │ avc1.4D401E    1358k video only
606 mp4   854x480     24    │ ~ 98.31MiB   926k m3u8  │ vp09.00.30.08   926k video only
232 mp4   1280x720    24    │ ~280.39MiB  2640k m3u8  │ avc1.4D401F    2640k video only
609 mp4   1280x720    24    │ ~181.03MiB  1705k m3u8  │ vp09.00.31.08  1705k video only
311 mp4   1280x720    60    │ ~  1.14GiB  4842k m3u8  │ avc1.4D4020    4842k video only
270 mp4   1920x1080   24    │ ~498.55MiB  4694k m3u8  │ avc1.640028    4694k video only
614 mp4   1920x1080   24    │ ~312.21MiB  2940k m3u8  │ vp09.00.40.08  2940k video only
617 mp4   1920x1080   60    │ ~  1.52GiB  6443k m3u8  │ vp09.00.41.08  6443k video only
312 mp4   1920x1080   60    │ ~  1.89GiB  7987k m3u8  │ avc1.64002A    7987k video only
620 mp4   2560x1440   24    │ ~928.71MiB  8745k m3u8  │ vp09.00.50.08  8745k video only
623 mp4   2560x1440   60    │ ~  3.85GiB 16287k m3u8  │ vp09.00.50.08 16287k video only
625 mp4   3840x2160   24    │ ~  1.94GiB 18661k m3u8  │ vp09.00.50.08 18661k video only
628 mp4   3840x2160   60    │ ~  8.27GiB 35007k m3u8  │ vp09.00.51.08 35007k video only

Examples of two videos:

30 fps video

60 fps video

Extra video formats of 72p & 608p

Formats of 228, 779, 780 and 788 were rarely encoded to some YouTube videos, the video resolution is 1080x608 and always under 30 FPS:

But for format 228 is 72p quality and only 6 FPS.

Code Container Video Codec Explanations
228 MP4 AVC Like thumbnail quality with slow FPS
779 WebM VP9 Efficiency possible saving data for mobiles
780 WebM VP9 Best quality possible of VP9 than format 779
788 MP4 AV1 Saves sizes and quality little than VP9, but some videos only

Sample video link here.

Another sample video link of format 228 here

Thanks to @GammaBoost for finding three formats! Thanks to @aokin1999 for finding a format 228!

DASH audio

Code Container Audio Codec Audio Bitrate Channels Still offered?
139 MP4 AAC (HE v1) 48 Kbps Stereo (2) Yes, YT Music, DRC optional*
140 MP4 AAC (LC) 128 Kbps Stereo (2) Yes, YT Music, DRC optional
(141) MP4 AAC (LC) 256 Kbps Stereo (2) No, YT Music*
249 WebM Opus (VBR) ~50 Kbps Stereo (2) Some, DRC optional
250 WebM Opus (VBR) ~70 Kbps Stereo (2) Some, DRC optional
251 WebM Opus (VBR) ~128 Kbps Stereo (2) Yes, DRC optional
256 MP4 AAC (HE v1) 192 Kbps Surround (5.1) Rarely
258 MP4 AAC (LC) 384 Kbps Surround (5.1) Rarely
325 MP4 DTSE (DTS Express) 384 Kbps Surround (5.1) Rarely*
327 MP4 AAC (LC) 256 Kbps Surround (5.1) ?*
328 MP4 EAC3 384 Kbps Surround (5.1) Rarely
338 WebM Opus (VBR) ~480 Kbps (?) Ambisonic (4) ?*
380 MP4 AC3 384 Kbps Surround (5.1) Rarely
599 MP4 AAC (HE v1) 30 Kbps Stereo (2) No, DRC optional
600 WebM Opus (VBR) ~35 Kbps Stereo (2) No, DRC optional
773 MP4 IAMF (Opus) (VBR) ~900 Kbps Binaural (7.1.4) Rarely*
774 WebM Opus (VBR) ~256 Kbps Stereo (2) Some, YT Music*
  • Surround audio can be found on some demo videos
  • YT Music: These formats are offered on Youtube Music. Format 141 is only available to Premium users with High Quality option
  • Format 327, 338: These have been found on this Stereo 3D video
  • Format 325: You can find out one video link here
  • Format 773: IAMF uncompressed audio track is compressed into Opus audio codec and can play with three groups of Stereo, Surround (5.1) and Binaural for up to 18 channels (7.1.4). You can find out video link here
  • Format 774 at YT Music: Some music have available high quality of Opus up to 256 kbps to Premium users, music link here and also bypassing is no longer possible to download for non premium users unless you're subscribed to YouTube Premium and can download format available by extra arguments of cookies from browser or the authentication.
  • DRC Optional: Only formats of 139, 140, 249, 250, 251, 599 and 600 were using DRC normalization sound for some videos.
  • Since February 2025, YouTube discontinued formats of 599 and 600 due for every video uploaded.
  • Format 139, 338: Default yt-dlp without argument when using -F or --list-formats does not show up, so please add this argument to show available formats: --extractor-args "youtube:player_client=all".

Legacy (non-DASH)

Code Container Video Codec Video Res. Audio Codec Audio Bitrate Channels Still offered?
5 FLV H.263 (Sorenson Spark) 240p (4:3) MP3 64 Kbps Mono (1) No
6 FLV H.263 (Sorenson Spark) 270p (4:3) MP3 64 Kbps Mono (1) No
13 3GP MPEG-4 (Simple, L0) 144p AAC (LC) Unknown Mono (1) No
17 3GP MPEG-4 (Simple, L0) 144p AAC (LC) 24 Kbps Mono (1) No*, old mobile phones
18 MP4 H.264 (Main, L3.0) 360p AAC (LC) 96 (most) / 128 Kbps (some) Stereo (2) Yes, GDrive
22 MP4 H.264 (High, L3.1) 720p AAC (LC) 128 Kbps Stereo (2) No*, GDrive
34 FLV H.264 (Main, L3.0) 360p AAC 128 Kbps Stereo (2) No
35 FLV H.264 (Main, L3.0) 480p AAC 128 Kbps Stereo (2) No
36 3GP MPEG-4 (Simple, L0) 144p AAC (LC) 24 Kbps Mono (1) Rarely, old mobile phones
(37) MP4 H.264 (High, L4.0) 1080p AAC (LC) 128 Kbps Stereo (2) No, GDrive
38 MP4 H.264 3072p AAC 192 Kbps Stereo (2) No
43 WebM VP8 360p Vorbis 128 Kbps Stereo (2) No
44 WebM VP8 480p Vorbis 128 Kbps Stereo (2) No
45 WebM VP8 720p Vorbis 192 Kbps Stereo (2) No
46 WebM VP8 1080p Vorbis 192 Kbps Stereo (2) No
(59) MP4 H.264 (Main, L3.1) 480p AAC (LC) 128 Kbps Stereo (2) No, GDrive
78 MP4 H.264 480p AAC 128 Kbps Stereo (2) No
  • Format 17: Allows for old mobile phones (eg. cell phones) to watch all videos. The video can have 7.5 & 12 fps only.
  • Format 18: Some videos are encoded with audio bitrate of 128 kbps for shorter lengths, most of them are with 96 kbps if most lengths or less views.
  • Always limited to 30 FPS
  • GDrive: These formats are offered for Google Drive video previews. Note that the video player on GDrive displays incorrect codecs on rightclick -> stats
  • Format 22: Available for most videos, except music and music videos (not limited to official music channels!)
  • Starting since May 2024, the Format 17 and Format 22 is removed for every YouTube videos uploaded.

Livestreams (non-DASH)

Code Container Video Codec Video Res. Audio Codec Audio Bitrate Still offered?
91 MPEG-TS (HLS) H.264 (Baseline, L1.1) 144p AAC (HE v1) 48 Kbps Yes
92 MPEG-TS (HLS) H.264 (Main, L2.1) 240p AAC (HE v1) 48 Kbps Yes
93 MPEG-TS (HLS) H.264 (Main, L3.0) 360p AAC (LC) 128 Kbps Yes
94 MPEG-TS (HLS) H.264 (Main, L3.1) 480p AAC (LC) 128 Kbps Yes
95 MPEG-TS (HLS) H.264 (Main, L3.1) 720p AAC (LC) 128 Kbps Yes
96 MPEG-TS (HLS) H.264 (High, L4.0) 1080p AAC (LC) 128 Kbps Yes
300 MPEG-TS (HLS) H.264 (Main, L3.2) HFR 720p AAC (LC) 128 Kbps Yes
301 MPEG-TS (HLS) H.264 (High, L4.2) HFR 1080p AAC (LC) 128 Kbps Yes
  • Non-HFR variants are limited to 30 FPS, HFR to 60 FPS
  • Non-HFR variants for 720p and 1080p may not be offered if HFR is available
  • Livestreams are also offered through DASH video (H.264, VP9) and DASH audio (AAC) streams
  • Both audio codecs of MPEG-TS are limited sample rate to 44.1 Khz for streaming a live broadcast.
  • Also videos without live broadcasting can play formats for acting user agent Safari Web.

Template youtube-dl formats

For archiving videos: Only choose combinations that fit WebM (VP9+Opus) or MP4 (H.264+AAC)

bestvideo[ext=webm]+251/bestvideo[ext=mp4]+(258/256/140)/bestvideo[ext=webm]+(250/249)/best

For archiving audio: Choose any format that's best

AAC Surround 384 / Opus 160 / AAC 192 / AAC Surround 192 / AAC 128 / Opus 70 / AAC 96 / Opus 50 / AAC 48

258/251/22/256/140/250/18/249/139

For streaming videos: Allow any combination

bestvideo+bestaudio/best

yt-dlp usage example

Archive videos

yt-dlp --download-archive yt-dlp.list --ignore-errors --write-info-json --add-metadata --write-sub --sub-lang en,de,ja --write-thumbnail --embed-subs -f "<format>" "<URL>"

Archive audio

yt-dlp --download-archive yt-dlp.list --ignore-errors --write-info-json --add-metadata --write-sub --sub-lang en,de,ja --write-thumbnail --embed-thumbnail --extract-audio -f "<format>" "<URL>"

Complete archive video with audio, comments, subtitles, thumbnail and everything about YouTube ID:

yt-dlp --write-description --write-comments --write-link --write-auto-subs --embed-subs --embed-thumbnail --embed-chapters --sponsorblock-mark all https://www.youtube.com/watch?v=WhWc3b3KhnY

Credits and special thanks

AgentOak (original owner) made YouTube list formats of video and audio ID especially with tips.

MartinEesmaa (forked owner) updated YouTube list formats for up to date.

Special thanks for finding/fixing by:

qzmtch for finding missing 616 format

dtlnor for little interesting explanation of duplicate formats same

r8420 for finding missing 612 format

Ciancy28 for finding high quality of Opus 256 kbps (format 774) in YT Music

joaquinito2070 for renaming youtube-dl to yt-dlp and fixing incorrect bitrates. Some commits were on it.

mscalindt for finding format 379 that was undocumented before I updated it now. It was linked to format 214 of DASH video.

Manwithpants812 for finding missing format 356 due to undocumented which is related to format 616.

@MartinEesmaa
Copy link
Author

Fixed it, moving 214 format from VP9 to H.264, @aokin1999. Thanks! :)

  • Martin Eesmaa

@TEOL85
Copy link

TEOL85 commented Jul 22, 2025

I think I found something rare on Grover Washington Jr. - Just The Two Of Us a couple of itag codes which has 256kbs audio but for free not pay per listen in m4a format but the picture is totally black screen in my media player and that black picture has an AV1 codec according to YouTube the stats for nerds itself so maybe AV1 doesn't mix well with 256 m4a or maybe my video l=playing sofeware is too out of date to get a picture.

I checked the itags out because I was curious why did my software which uses m3u8 give me a black screen with m4a 256 for free as well on that itag and these are the 2 itags that 256 free had.

616 1080 m3u8 Rare 256 m4a Free Audio Broken Picture Black Screen
290 1080 m3u8 Rare 256 m4a Free Audio Broken Picture Black Screen

And this is what the non formats code scanning gave me on the same video for interesting comparing

251 1080 Sound Code which is normally VBR 128-160 vorbis
399 1080 Picture Code
398 720 Picture Code
397 480 Picture Code
396 360 Picture Code
395 240 Picture Code
394 144 Picture Code

So all the picture codes were all in a row but the sound code lesser bitrate than the in free mode so 256 free m4a is still on m3u8 but not on http.

Very fun that. The video with the black screen was 128 bitrate and the m4a was 256 on the itag but it also had problems even downloading in my software becasue it was so exotic the side panel download wouldn't even trigger but if you clicked hard download from the menu it got that verson out of it's m3u8 itag not like it needs the artwork on the file to listen to the track anyway.

File also had special enhanced audio on YouTube which I can't access but maybe those itags was it but if you have those itags you can get it for free it's one thats not blocked on my test download either way from those 616 and 290 itags.

The weird things you do to find out why you got a 256 file when you shouldn't be getting it for free.

Edit: Interesting 616 and 290 are not in your list of m3u8 formats so there you go it is legitlly exotic this free 256kbs with a blank picture itag but what is the code for free 256 when you convert that from m3u8 to http itag codes as it's probably an itag google never wanted us to learn about and more snaggers use http than m3u8 only the one I use for radio probably even uses it?

We really need the full list of these http to m3u8 conversions as well as m3u8 to http for those 2 codes as you can really analyse it for fun the weirdness of exotic video formats.

I think you guys should rethink making yt-dlp command line only as MSDOS is really out of date now and not everyone knows how to use it anymore we need you to make a GUI 32/64-Bit for your software as well Martin so we can have a play without having to be bothered about using the command line which is out of date and shouldn't really be used for software anymore.

YouTube Video and Audio Downloader (WebEx) by [feller] used to be a GUI available for yt-dlp with FFMPEG features available but available for your Firefox but feller hasn't updated it in years and the codes as well as URL's database is so out of date his GUI doesn't work for us anymore but it shows you how much better if yt-dlp stepped away from command line coding into a safe to use browser GUI yet along Windows GUI, Linux and Mac non browser and the experience is so much better than having to use out of date command lines and dare I say it better than Windows GUI's becasue that type of GUI is in your browser.

Command line mode within the extension as well would be good though for those things you actaully need it for but yeah we need a better experience for those who can't code or too lazy to type it in.

616-96=520
290-96=194

So the other formats flipped to +96 m3u8 might be this

251+96=347
399+96=495
398+96=494
397+96=493
396+96=492
395+96=491
394+96=490

Thats if it's +96 -96 like the rest of the conversions in the smaller m3u8 codes list we have to begin with it really needs to be updated to full though if +96 -96 is all there is to all the conversion like it looks to be if m3u8 was fully updated there wouldn't be so much issue in m3u8 relying software for the speed of the protocol software detecting stuff at the moment.

If going by the rest of the list might be the m3u8 to http conversion so if they are the conversions they are not even on the list neither so it really is new and exotic and so far only encountered on a YouTube Music 80s file becasue of having to mess around for radio and found out that it was exotic.

Edit: Maybe thats not so simple as +96 there are some +300 conversiosn as well in the existing lists. lol

Sorry about that I do yak a lot when nerding out.

https://youtu.be/gelwwYuYGn0?si=3WGyDJflAopbANw8
https://music.youtube.com/watch?v=gelwwYuYGn0&si=0lU_oQgayTItxUPh

General
Complete name : C:\Users\User\Desktop\Just the Two of Us.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/iso2/avc1/mp41)
File size : 20.5 MiB
Duration : 7 min 23 s
Overall bit rate mode : Variable
Overall bit rate : 388 kb/s
Frame rate : 25.000 FPS
Writing application : Lavf60.16.100

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : [email protected]
Format settings : CABAC / 3 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference : 3 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 7 min 23 s
Bit rate : 126 kb/s
Width : 1 080 pixels
Height : 1 080 pixels
Display aspect ratio : 1.000
Frame rate mode : Constant
Frame rate : 25.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.004
Stream size : 6.65 MiB (32%)
Writing library : x264 core 155 r2901 7d0ff22
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
Codec configuration box : avcC

Audio
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 7 min 23 s
Bit rate mode : Variable
Bit rate : 256 kb/s
Maximum bit rate : 259 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 44.1 kHz
Frame rate : 43.066 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 13.5 MiB (66%)
Default : Yes
Alternate group : 1

@aokin1999
Copy link

aokin1999 commented Jul 22, 2025

@TEOL85 🙄
251 is Opus ~128kbps (vorbis used other ids muxed with vp8, and those are deprecated, tho there are still a few standalone vp8 encodes)
616 is m3u8 id for 1080p Premium VP9 (356 https id) thats usually listed on popular 1080p videos (higher resolutions wont have premium formats)

270 (137) and 290 are both H.264/AVC 1080p, m3u8 rates are always artifically higher than https but consistent in a same video so probaly 290 is an higher bitrate variant of 137, so maybe it is 216. All these are video only, including 616(356). Only current format with both audio and video is 18 if i'm not wrong.

All the rest you say I just don't understand it. YT-DLP is commandline, and python, though there are .exe builds for windows. For some reason I can't download the 290 stream (but 270 doesn't give any problem). Maybe I would need to use some specific options but I don't have patience or time now, so, anyone else try to get it (and get the equivalent ID if possible).

Last edit (yeah I did a lot): I realized there are more avc formats, so I dunno, maybe a lot of different encodes (higher quality? tho it's still image so i doesnt make much sense) or just duplications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment