An Editor That Thinks in Time
The editor did not start as a canvas full of draggable rectangles. It started as a question: what is the smallest time model that can describe a screencast honestly? The answer was a source video, an output timeline, and a small set of operations that map one to the other.
The Timeline Is the Model
A freeze inserts output time at a source moment. A speed range changes how much source time fits into a second of output. A placeholder inserts a pure-background pause at a source moment: the video waits, the timeline grows, and the export shows only the frame background. The time map is built by sampling the source, inserting freezes and placeholders, and accumulating output time. Everything else — zooms, text, shapes, click rings, redactions, highlights — is positioned on that output timeline.
Speeds run from 0.1× to 10× with a ramp at both ends. A 0.1× section is ten times longer; a 10× section consumes source quickly. The output duration and the trim range update, and the same map is used by the preview, the player and the export.
Cut Outs Are Export Markers
The cut out is deliberately not part of the time map. It is a marker on the target timeline: a range that the export will remove. The editor timeline, the preview and the trim stay exactly as they are. A cut out inside a zoom does not shorten the zoom in the editor; it tells the export to remove that range from the final file. This keeps the editing model stable and makes the marker’s length and position meaningful.
That distinction matters because the target video and the exported video are not the same object. The target is what the user sees; the export is a decision about which parts of the target survive. Freezes and placeholders change the target. Cut outs change only the output file.
Annotations Have Layers
The editor’s overlays are not a flat list in paint order. Highlighter washes sit behind text and shapes so labels stay readable. Every annotation sits above a redaction: blur and pixelate areas are applied to the video first, then the highlighter, then text, shapes and rings. A redaction hides the screen, not the explanation.
The highlighter is its own small renderer. It does not draw a translucent rectangle; it draws two marker strokes per text row, with a thickness tied to the video height, uneven band edges, and a draw-on that reveals the strokes in sequence. The goal was a marker that looks like a marker, not a selection highlight.
One Renderer for Preview and Export
The same renderFrame call paints the editor canvas and the export canvas. The difference is the clock: the editor
draws at the playhead, the export draws in real time. That shared renderer is why a project that looks right in the
preview has a chance of looking right in the file, and why new overlays do not need a second implementation.
A timeline editor becomes complicated when it starts mixing “what the user sees” with “what the export does”. Roughcast keeps those separate: time operations shape the target, cut outs mark the export, and overlays are painted on top of both.
