VideoSubtitleTrack
Represents a subtitle track for a video.
Properties
-
album_art(bool | None) –Whether the track represents album art rather than timed media.
-
audio_channels(int | None) –Explicit audio channel count override.
-
bitrate(int | None) –Overall media bitrate in bits per second.
-
channels(str | None) –Channel layout string describing the spatial arrangement of channels.
-
channels_count(int | None) –The number of audio channels detected in the media.
-
codec(str | None) –Codec identifier for the media stream.
-
decoder(str | None) –Decoder name used to process the media stream.
-
fps(Number | None) –Video frames per second.
-
language(str | None) –The language of the subtitle track, e.g. 'en'.
-
par(Number | None) –Pixel aspect ratio value.
-
rotate(int | None) –Rotation metadata in degrees to apply when rendering the video.
-
sample_rate(int | None) –Audio sampling rate in hertz.
-
src(str) –The subtitle source.
-
title(str | None) –The title of the subtitle track, e.g. 'English'.
Methods
-
auto–Default subtitle track. Selects the first subtitle track.
-
none–No subtitle track. Disables subtitle output.
Properties#
album_art
#
album_art: bool | None = None
Whether the track represents album art rather than timed media.
channels
#
channels: str | None = None
Channel layout string describing the spatial arrangement of channels.
channels_count
#
channels_count: int | None = None
The number of audio channels detected in the media.
src
#
src: str
The subtitle source.
Supported values
- A URL (e.g. "https://example.com/subs.srt" or "www.example.com/sub.vtt")
- An absolute local file path (not supported on the web platform)
- A raw subtitle text string (e.g. the full contents of an SRT/VTT file)