Cinematic UI film
The look: dark studio bay, the real app on a tilted slab with thickness, a camera that glides between subjects, the subject sharp and everything else falling off in depth of field, fine grain and vignette, short dissolves, every cut on a downbeat of the score, the voice line landing on the action it names. Everything is a pure function of time, so any frame renders identically.
Quick start
- Copy template/ into
<project>/film/(skipnode_modules), thennpm installandnpm run studio. TheFilmcomposition plays a 12.6 s demo with a built-in fake app (no assets needed): a title, a device shot that types a plan and pushes in from the list to the calendar, a world of floating windows, a second title. - Replace the fake UI with real recordings (
public/footage/*.mp4, setsrcon device shots) and write the edit list insrc/edl.json; sound goes insrc/sound.json. - Render:
npm run render(=npx remotion render src/index.ts Film out/film.mp4 --crf=17).
Shot kind in edl.json | Fields |
|---|---|
device | t0, t1, src? (footage name) or still?, m0, rate, views: [[t, left, top, right, bottom]], tilt: [rx, ry, rz], studio? |
world | t0, t1, preset: reveal / calm / drift / finale, windows?: [{id, x, y, z, w, ry, still?, size?}], studio? |
title | t0, t1, words: [...], studio, accent?, behind? |
Workflow (follow in order, show the user at every gate)
- 1. Story. Write 3 storylines (hook, the old pain, the turn, 3-4 chapters, end card). The user picks one. Write the narration lines.
- 2. Look-dev gate. Build 3-5 test shots from the template, render stills at full size (QA.md), show them. No full build before the user approves the look.
- 3. Footage. Record each shot from the running app with the deterministic recorder (FOOTAGE.md): fake clock, one screenshot per frame, 2880x1620, a drawn cursor, markers for every action. Scan every clip for flash frames right away and repair them.
- 4. Score and voice. Generate the music with a timed structure, 3-4 takes, keep the one with the steadiest beat. Generate each voice line with word timestamps. Extract beats, downbeats and sections (AUDIO.md).
- 5. Timeline. Place the voice lines on downbeats, anchor the big moments (title drop, logo) to section changes, and write
timeline.json: the film's clock. - 6. Edit list. One entry per shot; cuts on (half-)bar downbeats; align footage so the action happens on the word that names it:
m0 = marker - (wordTime - t0) * rate. - 7. Build scenes with the lens (LENS.md): device shots, worlds of planes, titles, end card. Sound effects come from the footage markers.
- 8. QA stills. Start, middle and end of every shot plus every cut, on contact sheets with a 90 % safe box. Check against the list in QA.md. Fix, re-check.
- 9. Render, then verify the file: flash-frame scan of the output, ffprobe (length, size, fps, audio), loudness -14 LUFS / -1 dBTP, a frame strip at every flagged time.
- 10. Deliver. Upload text: title, description, chapters (each at least 10 s, the first at 0:00), tags, plus an Instagram caption (AUDIO.md has the template).
Hard rules
- Deterministic. No
Math.random(),Date.now()or CSS animations/transitions. Userand(seed)and the frame. Load fonts with@remotion/fontsbehinddelayRender. - Frame the subject, not the screen. A device shot names the rectangle the action happens in (fractions of the screen); the camera fits it to 86 % x 82 % of the frame. Nothing important is cut by the frame edge.
- Depth of field on every 3D shot, focused on the action. Blur 0 at focus, at most ~14-16 px far away; wide shots get less.
- Motion: camera eases (sine / inOut), 1-2 % of the width per second drift, arrivals expo-out 0.3-0.5 s, dissolves 0.4 s. Text at least 26 px at 1080p, one line at a time.
- Cut on the music. Every cut on a beat, chapter titles on a downbeat, the hero moment on the drop, the logo on the final hit.
- Footage must be clean. One bad frame (the app half-drawn) reads as a flash. Scan every recording and every render with
scripts/detect-flashes.mjs, fix withscripts/repair-flashes.mjs. - Real UI only, with a composed demo board (real-looking data, a fixed date and time). Say in the review which parts are stand-ins.
- Report honestly: what was checked by eye, what was only measured, what nobody has heard yet.
Files
| File | What |
|---|---|
| LENS.md | The 3D lens and depth of field: how it works, every parameter, shot recipes |
| FOOTAGE.md | Deterministic app capture with Playwright, markers, encoding, flash repair |
| AUDIO.md | Music and voice prompts, beat grid, placing lines on the beat, ducking, SFX, loudness, upload text |
| QA.md | Stills, contact sheets, the per-frame checklist, render and verification commands |
template/src/ | lib/space.tsx (camera, Plane, Finish), lib/focus.tsx (FocusPlate, Slab), lib/ease.ts, lib/common.tsx (Bay, colours, fonts), scenes/ (Device, World, Title), Film.tsx (dissolves, music ducking, SFX), demo/FakeApp.tsx |
template/scripts/ | capture.cjs (record the app), detect-flashes.mjs + repair-flashes.mjs (bad frames), stills.mjs + sheet.mjs (QA), beatgrid.py (beats) |
Tools: Remotion 4 (React to MP4), CSS 3D (perspective + preserve-3d, no GPU needed), Playwright (capture), ElevenLabs (music, voice, timestamps), ffmpeg full build (scan, repair, loudness), beat_this or librosa (beat grid). Camera rig idea from ui-camera-film (faizalmy, MIT); planes-in-depth idea from website-to-3d-video (geoyrd, MIT).