Subtitles¶
- class av.subtitles.stream.SubtitleStream¶
Bases:
Stream
A
SubtitleStream
can contain manySubtitleSet
objects accessible via decoding.- decode(Packet packet=None)¶
Decode a
Packet
and return a list ofSubtitleSet
.- Return type:
See also
This is a passthrough to
CodecContext.decode()
.
- class av.subtitles.subtitle.SubtitleSet¶
Bases:
object
A
SubtitleSet
can contain manySubtitle
objects.- end_display_time¶
- format¶
- pts¶
- rects¶
- start_display_time¶
- class av.subtitles.subtitle.Subtitle¶
Bases:
object
An abstract base class for each concrete type of subtitle. Wraps AVSubtitleRect
- type¶
- class av.subtitles.subtitle.AssSubtitle¶
Bases:
Subtitle
Represents an ASS/Text subtitle format, as opposed to a bitmap Subtitle format.
- ass¶
Returns the subtitle in the ASS/SSA format. Used by the vast majority of subtitle formats.
- dialogue¶
Extract the dialogue from the ass format. Strip comments.
- text¶
Rarely used attribute. You’re probably looking for dialogue.