Finishing the File Without a Cloud
The recording tab can produce a file that plays but does not know how long it is. That is not a browser bug; a streamed WebM has no reason to carry a final duration. The export pipeline exists to turn that stream into something a player and another person can use.
The Missing Duration
Append-only WebM from the encoder has no Duration element. Chrome’s MediaRecorder writes one header and then appends
clusters, so it usually has none either. Roughcast patches the header in Go: the append-only muxer’s optional DateUTC
element is exactly the same eleven bytes as a Duration element, so it can be replaced in place without moving a single
cluster. For a file without that element, the patcher inserts one and updates the Info size. The take metadata remains
the authority; the header is repaired so VLC and other players show the length.
When ffmpeg is present, a WebM export is remuxed with -c copy and gains a cue index as well. Without ffmpeg, the
native patch still writes the duration. The file is local either way.
Cuts Belong to the Export
The cut out markers are applied after the target video has been rendered, not during the browser recording. The browser
records the full trimmed target. The local export endpoint receives the WebM, the trim duration and the marked ranges,
and uses ffmpeg’s trim plus concat filters to keep the ranges around the cuts. MP4 is encoded with H.264 and
+faststart; WebM is re-encoded with VP9. The timeline and preview never change.
That is why ffmpeg is optional for the editor but required for cut outs and MP4. A WebM without cuts still gets a native duration patch. A file with cuts needs a real edit, and ffmpeg is the honest tool for it. The export button shows the shorter final length before the file exists.
An Installable Local App
The UI is a PWA. A manifest names the app, four PNG icons cover 192 and 512 pixels in normal and maskable variants, and a small service worker caches the shell. Chrome and Edge can install it from the address bar, and the footer offers an install button when the browser announces that it is possible. Loopback is a secure context, so no certificate is involved.
The default port is 47801, five digits, chosen to stay out of the way of the common development ports. The service
worker never caches /api/; takes and projects remain the server’s business. The app opens in its own window and still
talks to the same local process.
What Is Still Missing
Audio, camera, automatic cursor styling, click detection and multi-track editing remain out of scope. The system cursor is in the captured pixels and cannot be removed by a web page. Wayland window capture can freeze for occluded windows, so a monitor is the safer source when the window will not stay visible. These are not roadmap gaps hidden behind a spinner; they are boundaries of a browser-only, local-first recorder.
A local export pipeline is mostly about refusing to move the problem to a server farm. The browser renders the target, the local process repairs the container, and ffmpeg performs the one operation that genuinely needs a video tool. The result is a file that is finished on the machine that recorded it.
