SubtitleTrackMetadata
Additional metadata for subtitle tracks.
type SubtitleTrackMetadata = BaseTrackMetadata & {};See BaseTrackMetadata.
Used by
Properties
languageCode
languageCode?: string;The three-letter, ISO 639-2/T language code specifying the language of this track.
name
name?: string;A user-defined name for this track, like "English" or "Director Commentary".
disposition
disposition?: Partial<TrackDisposition>;The track's disposition, i.e. information about its intended usage.
See TrackDisposition.
maximumPacketCount
maximumPacketCount?: number;The maximum amount of encoded packets that will be added to this track. Setting this field provides the muxer with an additional signal that it can use to preallocate space in the file.
When this field is set, it is an error to provide more packets than whatever this field specifies.
Predicting the maximum packet count requires considering both the maximum duration as well as the codec.
- For video codecs, you can assume one packet per frame.
- For audio codecs, there is one packet for each "audio chunk", the duration of which depends on the codec. For simplicity, you can assume each packet is roughly 10 ms or 512 samples long, whichever is shorter.
- For subtitles, assume each cue and each gap in the subtitles adds a packet.
If you're not fully sure, make sure to add a buffer of around 33% to make sure you stay below the maximum.
isRelativeToUnixEpoch
isRelativeToUnixEpoch?: boolean;Whether the timestamps of this track are relative to the Unix epoch (January 1, 1970, 00:00:00 UTC). When true, each timestamp maps to a definitive point in time.
group
group?: OutputTrackGroup | OutputTrackGroup[];Defines the group(s) this track is a part of. Group assignment determines track pairability, determining which tracks can be presented together with other tracks. This is needed for configuring things like HLS master playlists.
Two groups are considered pairable if they are in the same group but are of different TrackType, or if they are in two separate groups that have been paired with each other.
If left blank, a track is automatically assigned to Output.defaultTrackGroup.
See OutputTrackGroup.