Subtitles¶
- class av.subtitles.stream.SubtitleStream[source]¶
Bases:
Stream- decode(packet: Packet | None = None) list[AssSubtitle] | list[BitmapSubtitle][source]¶
- decode2(packet: Packet) SubtitleSet | None[source]¶
- class av.subtitles.subtitle.SubtitleSet¶
Bases:
objectA
SubtitleSetcan contain manySubtitleobjects.Wraps AVSubtitle.
- end_display_time¶
- format¶
- pts¶
Same as packet pts, in av.time_base.
- rects¶
- start_display_time¶
- class av.subtitles.subtitle.Subtitle¶
Bases:
objectAn abstract base class for each concrete type of subtitle. Wraps AVSubtitleRect
- type¶
- class av.subtitles.subtitle.AssSubtitle¶
Bases:
SubtitleRepresents 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.