Skip to content

FormatMetadata

One format as YouTube lists it, under YouTube’s field names, plus fields ytdl-core derives. A field YouTube omits is absent; numeric strings are numbers.

Property Type Description
appliedDrcTargetCenterForBackgroundDb? number -
appliedVocalsGainFactor? number -
approxDurationMs? number -
audioBitrate number | undefined Kbps, for formats with audio.
audioChannels? number -
audioCodec string | undefined -
audioQuality? string -
audioSampleRate? number -
audioTrack? AudioTrack -
averageBitrate? number -
bitrate? number -
captionTrack? FormatCaptionTrack -
client Client The client that served this format; resume asks it first.
codecs string -
colorInfo? ColorInfo -
container string mp4, webm, ts and so on.
contentLength? number -
drmFamilies? readonly string[] -
fps? number -
hasAudio boolean -
hasVideo boolean -
height? number -
highReplication? boolean -
indexRange? ByteRange Bytes of the container’s seek index.
initRange? ByteRange Bytes of the container header.
isDrc boolean Stable-volume (DRC) audio. It shares its itag with the original, so match formats with all three of itag, isDrc and audioTrack.id.
isDrm boolean Encrypted; listed, but never chosen or opened.
isHLS boolean -
isLive boolean -
isOtf boolean Served as OTF segments, which ytdl-core cannot read; listed, but never chosen or opened.
isVb? boolean -
itag number -
lastModified? number Microseconds since the epoch.
loudnessDb? number -
maxDvrDurationSec? number How far behind the live edge the stream can be read.
mimeType string -
projectionType? string -
quality? string -
qualityLabel? string -
qualityOrdinal? string -
targetDurationSec? number Live segment length.
trackAbsoluteLoudnessLkfs? number -
type? string FORMAT_STREAM_TYPE_OTF for an OTF format.
videoCodec string | undefined -
vocalsBackgroundLoudnessDifferenceDb? number -
width? number -
xtags? string -