Subtitle

data class Subtitle(val startMicros: Long?, val endMicros: Long?, val canvasWidth: Int, val canvasHeight: Int, val images: List<SubtitleImage>, val texts: List<String>)

One decoded subtitle: what to show, where, and when.

Image formats, such as Blu-ray (PGS), DVB and DVD subtitles, decode to images. Text formats decode to texts. A subtitle with neither clears what the one before it showed, which is how a Blu-ray stream takes a line off the screen.

Constructors

Link copied to clipboard
constructor(startMicros: Long?, endMicros: Long?, canvasWidth: Int, canvasHeight: Int, images: List<SubtitleImage>, texts: List<String>)

Properties

Link copied to clipboard
Link copied to clipboard

The size of the canvas images are placed on, which is the picture the subtitle was authored for. 0 when the stream does not say, and then the video's own size is meant.

Link copied to clipboard

When it ends, on the same timeline, or null when the stream does not say. A Blu-ray subtitle stays on screen until the next one replaces or clears it.

Link copied to clipboard

The images, in canvas pixels.

Link copied to clipboard

When it starts, in microseconds on the stream's own timeline; null when the packet had no timestamp.

Link copied to clipboard

The text of a text format, one entry per rectangle, as FFmpeg's text decoders write it: an ASS event whose fields are ReadOrder, Layer, Style, Name, MarginL, MarginR, MarginV, Effect and Text.