VideoFormat
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.
Extends
Section titled “Extends”Properties
Section titled “Properties”| Property | Type | Description | Inherited from |
|---|---|---|---|
appliedDrcTargetCenterForBackgroundDb? |
number |
- | FormatMetadata.appliedDrcTargetCenterForBackgroundDb |
appliedVocalsGainFactor? |
number |
- | FormatMetadata.appliedVocalsGainFactor |
approxDurationMs? |
number |
- | FormatMetadata.approxDurationMs |
audioBitrate |
number | undefined |
Kbps, for formats with audio. | FormatMetadata.audioBitrate |
audioChannels? |
number |
- | FormatMetadata.audioChannels |
audioCodec |
string | undefined |
- | FormatMetadata.audioCodec |
audioQuality? |
string |
- | FormatMetadata.audioQuality |
audioSampleRate? |
number |
- | FormatMetadata.audioSampleRate |
audioTrack? |
AudioTrack |
- | FormatMetadata.audioTrack |
averageBitrate? |
number |
- | FormatMetadata.averageBitrate |
bitrate? |
number |
- | FormatMetadata.bitrate |
captionTrack? |
FormatCaptionTrack |
- | FormatMetadata.captionTrack |
client |
Client |
The client that served this format; resume asks it first. | FormatMetadata.client |
codecs |
string |
- | FormatMetadata.codecs |
colorInfo? |
ColorInfo |
- | FormatMetadata.colorInfo |
container |
string |
mp4, webm, ts and so on. |
FormatMetadata.container |
contentLength? |
number |
- | FormatMetadata.contentLength |
drmFamilies? |
readonly string[] |
- | FormatMetadata.drmFamilies |
fps? |
number |
- | FormatMetadata.fps |
hasAudio |
boolean |
- | FormatMetadata.hasAudio |
hasVideo |
boolean |
- | FormatMetadata.hasVideo |
height? |
number |
- | FormatMetadata.height |
highReplication? |
boolean |
- | FormatMetadata.highReplication |
indexRange? |
ByteRange |
Bytes of the container’s seek index. | FormatMetadata.indexRange |
initRange? |
ByteRange |
Bytes of the container header. | FormatMetadata.initRange |
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. |
FormatMetadata.isDrc |
isDrm |
boolean |
Encrypted; listed, but never chosen or opened. | FormatMetadata.isDrm |
isHLS |
boolean |
- | FormatMetadata.isHLS |
isLive |
boolean |
- | FormatMetadata.isLive |
isOtf |
boolean |
Served as OTF segments, which ytdl-core cannot read; listed, but never chosen or opened. | FormatMetadata.isOtf |
isVb? |
boolean |
- | FormatMetadata.isVb |
itag |
number |
- | FormatMetadata.itag |
lastModified? |
number |
Microseconds since the epoch. | FormatMetadata.lastModified |
loudnessDb? |
number |
- | FormatMetadata.loudnessDb |
maxDvrDurationSec? |
number |
How far behind the live edge the stream can be read. | FormatMetadata.maxDvrDurationSec |
mimeType |
string |
- | FormatMetadata.mimeType |
projectionType? |
string |
- | FormatMetadata.projectionType |
quality? |
string |
- | FormatMetadata.quality |
qualityLabel? |
string |
- | FormatMetadata.qualityLabel |
qualityOrdinal? |
string |
- | FormatMetadata.qualityOrdinal |
targetDurationSec? |
number |
Live segment length. | FormatMetadata.targetDurationSec |
trackAbsoluteLoudnessLkfs? |
number |
- | FormatMetadata.trackAbsoluteLoudnessLkfs |
type? |
string |
FORMAT_STREAM_TYPE_OTF for an OTF format. |
FormatMetadata.type |
url |
string | undefined |
Ready to request: solved, with any PO token attached. undefined for a format YouTube serves only through SABR; download streams it. |
- |
videoCodec |
string | undefined |
- | FormatMetadata.videoCodec |
vocalsBackgroundLoudnessDifferenceDb? |
number |
- | FormatMetadata.vocalsBackgroundLoudnessDifferenceDb |
width? |
number |
- | FormatMetadata.width |
xtags? |
string |
- | FormatMetadata.xtags |