SubtitleOverlay
data class SubtitleOverlay(val images: List<OverlayImage>, val viewportWidth: Int, val viewportHeight: Int, val contentHash: Long)
What to draw above the video, in output pixels.
Subtitles are laid out for the output size, not scaled with the video, so this changes when the viewport changes rather than on every frame. contentHash lets a renderer skip re-uploading an unchanged overlay, which is the usual case: subtitles change about once a second and frames arrive sixty times a second.
A renderer maps the rectangle of viewportWidth by viewportHeight onto its whole output, each axis on its own, and draws it unturned above the picture and its bars: rule 1 of docs/subtitle-placement.md.