The Last Mile: Layers, Sound, and Extensions
The normalized base produced by video-use is not yet the finished communication. The last mile is where a technically correct cut can become unreadable: an overlay may begin on the wrong frame, captions may use source times after the sequence has been shortened, a grade may overpower the image, or the soundtrack may play at an uncomfortable level. This chapter follows the final composition and session boundary so readers can see how creative additions remain flexible while timing, visibility, sound, and persistence stay governed by explicit contracts.
The base is not the final image
An overlay is a separate rendered clip placed on top of the base video for a particular interval. That sounds like ordinary layering until timing enters the picture. A generated animation often begins at time zero in its own file, while the edit may need it to appear several seconds into the finished sequence. If the compositor uses the overlay's original timestamps without adjustment, the visible window can show the middle of the animation rather than its intended opening.
video-use handles this by shifting the overlay's presentation timestamps, or PTS, so the overlay's frame zero lands at its requested output start. PTS is the clock attached to media frames. Moving it does not change the animation's internal sequence; it changes where that sequence sits on the finished timeline. The renderer then enables the overlay only between its declared start and end, which keeps an animation from leaking into neighboring beats.
This is a boundary between creative authoring and final composition. The animation author decides what to draw and renders a file. The central renderer owns when that file becomes visible. That ownership lets a slot be built with a web composition, a React-based tool, a mathematical animation, or a simple image sequence without asking each engine to understand the entire edit.
Subtitles have a related but different timing problem. The words were spoken on a source timeline, but the finished video is a new timeline formed by placing selected ranges end to end. If a word begins 12 seconds into a source segment and that segment begins at 30 seconds in the original clip, its caption should begin 12 seconds into the segment—not 30 seconds into the finished output. The renderer calculates the local word time by subtracting the segment start, then adds the segment's accumulated output offset.
That translation is easy to describe and easy to get wrong. If captions retain source times, they drift after the first cut. Early subtitles may look correct because the first segment often begins near the start of its source, while later captions appear increasingly late or early. Output-timeline conversion makes each cue follow the sequence the viewer actually sees.
The order of composition is just as important as the time calculation. video-use applies subtitles after every overlay. If captions are burned in first, a later overlay can cover them without producing an obvious rendering error. The final file may contain the correct subtitle text and the correct overlay while still hiding the information the viewer needs.