Reference
Rendering
Outputs, aspects, covers and chapters, the quality of the blur, and the heat defaults: utility QoS, a third of the cores and an 80 °C governor.
Outputs
- Files: the output’s extension picks the format.
.mp4(H.264, or HEVC withHEVC=1),.mov(ProRes 422 HQ),.webm,.gif. - Aspects: 16:9, 1:1, 4:5 or 9:16. A second aspect is a second layout, composed for its own frame, never a crop of the first.
- Size and speed: 60 fps and 1080p on the long side by default.
- Covers: a still per aspect (
render.mjs stills stills 0is frame 0). - Chapters: a timeline of scenes carries a film of any length; chapters land in the mp4 and in a list for a YouTube description. A film that declares chapters needs three or more, the first at 0, each at least 10 seconds.
Quality
Sixteen subframes a frame are the motion blur. Each also gets a different subpixel offset on a 4×4 grid, so the blend is a 16-sample antialias as well: Chrome snaps text to whole pixels, and without it text in a slow move stepped a pixel every few frames. Rasters go through FILM.draw, which mipmaps what Chrome does not. On a real 28 s release film the worst slow-move flicker fell 37–76 %, at the same render time.
A frame that moves fast (a push, a whip) gets 48 subframes instead: at 16 its moments showed as copies about 12 px apart. A quick pass measures every frame’s speed first; on a 56 s reel 8.5 % of the frames were fast, a render about a fifth longer. The shutter (SHUTTER, 360° by default) sets how much of each frame the sixteen cover: 180° is a film camera’s, crisper, at the same cost.
Checks
A page that loses a WebGL context (Chrome keeps 16 a page, and a lost one draws nothing) fails the capture instead of delivering an empty backdrop, and each cut keeps its chunks in a folder of its own, so a square cut never deletes the master’s. Before the first frame, the soundtrack: a file without sound or an AUDIO_AT past its end stops the render, a track shorter than the film or a silent stretch is said. After the last, the file: its size, frames, length and sound are read back, and a file that does not match fails the render.
Length
PREVIEW=1drafts the whole film at a sixteenth of the work.FROMandTOrender one chapter or one transition.RESUME=1picks up a stopped render from its chunks, refusing when the page, its scripts or the settings changed.KEEP=1keeps the chunks, so another format is an encode, not a render.
Heat
A render keeps the chip busy for minutes, and a run of test renders once took it to 91 °C. The renderer runs cool by default; these measurements chose the defaults: 8 s of reel.html (1080p60, 16 subframes) on an M5 Pro, with other work on the machine.
| Workers | QoS class | Governor | Time | Peak | Held |
|---|---|---|---|---|---|
| 12 | default | 86 °C | 77 s | 87.9 °C | 16 s |
| 6 | default | 86 °C | 117 s | 86.7 °C | 4 s |
| 12 | default | 80 °C | 250 s | 85.5 °C | 198 s |
| 12 | utility | 80 °C | 248 s | 81.8 °C | 76 s |
| 6 | utility | 80 °C | 231 s | 80.0 °C | 0 s |
| 12 | background | 86 °C | 1039 s | 80.1 °C* | 0 s |
* another session’s work on the machine; its own load held about 60 °C.
- The defaults are the bold row: a third of the cores (
WORKERS), theutilityQoS class (QOS), the governor at 80 °C (TEMP_MAX). At the same ceiling full speed is slower and hotter: it heats past the ceiling before the governor can hold it, then spends most of the render cooling (198 s of 250). - A long film takes longer, not hotter. At the defaults this reel renders at about 29× real time; a film without WebGL fields or dither, faster. Draft with
PREVIEW=1; leave a very long master toQOS=background, the coolest, at a third of the speed. - Faster, knowingly:
QOS=default WORKERS=12 TEMP_MAX=86is the old behaviour, for a short film when you ask for speed. One render at a time, always. - The governor reads the chip, not the render, so heat from other work holds the render too. It needs
swiftc(Xcode’s command-line tools) to buildthermo.swiftonce; without it, macOS’s own thermal state, which only acts at “serious”. - Spotlight: the scratch folders end in
.noindex, because chunks written and deleted by the thousand kept Spotlight’s indexers busy after a render.
Delivery
The finished films leave the work folder for a folder of their own, and the work folder goes to the Trash once its source is safe in the product’s kit. See Making a film. deliver.mjs puts each cover through ImageOptim when it is installed, with an SSIM against the original: a real release film’s posters went from 1.0 MB to 0.13 MB at SSIM 0.9995.