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#
class-attribute
      instance-attribute
  
#
album_art: bool | None = None
Whether the track represents album art rather than timed media.
class-attribute
      instance-attribute
  
#
audio_channels: int | None = None
Explicit audio channel count override.
class-attribute
      instance-attribute
  
#
bitrate: int | None = None
Overall media bitrate in bits per second.
class-attribute
      instance-attribute
  
#
channels: str | None = None
Channel layout string describing the spatial arrangement of channels.
class-attribute
      instance-attribute
  
#
channels_count: int | None = None
The number of audio channels detected in the media.
class-attribute
      instance-attribute
  
#
codec: str | None = None
Codec identifier for the media stream.
class-attribute
      instance-attribute
  
#
decoder: str | None = None
Decoder name used to process the media stream.
class-attribute
      instance-attribute
  
#
language: str | None = None
The language of the subtitle track, e.g. 'en'.
class-attribute
      instance-attribute
  
#
rotate: int | None = None
Rotation metadata in degrees to apply when rendering the video.
class-attribute
      instance-attribute
  
#
sample_rate: int | None = None
Audio sampling rate in hertz.
instance-attribute
  
#
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)
class-attribute
      instance-attribute
  
#
title: str | None = None
The title of the subtitle track, e.g. 'English'.
Methods#
classmethod
  
#
auto() -> VideoSubtitleTrack
Default subtitle track. Selects the first subtitle track.