Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
7b500af
Add hybrid scenes: composite code-rendered elements inside footage
lxf82dev Nov 10, 2026
627d0f8
Hybrid scenes: fix the plate environment and the import sequence; rep…
lxf82dev Nov 10, 2026
0e5fc85
Hybrid test: sample the label clear of its text
lxf82dev Nov 10, 2026
e3485f9
Hybrid starter: light the can at environment intensity 1, measured
lxf82dev Nov 11, 2026
abf2798
Media: look frames up at their exact times, not six-decimal seconds
lxf82dev Nov 11, 2026
c62b64a
Export: keep the drawn levels in MP4 and MOV; export opaque scenes to…
lxf82dev Nov 11, 2026
2fc0c90
Hybrid docs: what a trial on filmed footage found
lxf82dev Nov 11, 2026
c9d37fc
Media: draw colour-tagged footage, mattes and depth at their values
lxf82dev Nov 11, 2026
f58666f
Hybrid docs: occlusion on filmed footage
lxf82dev Nov 11, 2026
177ceed
Preserve footage clocks and scene state in hybrid renders
lxf82dev Nov 11, 2026
f2fc08e
Plan reliable occlusion, surface wrapping and kinetic typography
lxf82dev Nov 11, 2026
3f27433
Sync packaged hybrid guidance and quality roadmap
lxf82dev Nov 11, 2026
209850d
Add prepared foreground, surface mapping and kinetic text primitives
lxf82dev Nov 11, 2026
c1160c9
Add correction authoring, exact alpha playback and original-object re…
lxf82dev Nov 11, 2026
c6a1d78
Reject empty foregrounds and invalid baked correction deltas
lxf82dev Nov 11, 2026
7aaf22b
Fit original surface artwork and keep exact geometry on clean plates
lxf82dev Nov 11, 2026
4413622
Hold source samples during code shutter rendering
lxf82dev Nov 11, 2026
8d49f7e
Document full-shot foreground and exact-geometry QA
lxf82dev Nov 11, 2026
0354a6d
Run prepared foreground pixel checks in CI
lxf82dev Nov 11, 2026
530e56b
Fix hybrid source-frame alignment and live product edits
lxf82dev Nov 11, 2026
58318cb
Document human foreground lighting routes and acceptance gates
lxf82dev Nov 12, 2026
a6b49db
Skill reference: list sampleTrackFrame, as the hybrid doc does
lxf82dev Nov 12, 2026
def66d7
Docs: product photographs versus models, and presenters handling prod…
lxf82dev Nov 12, 2026
6b2de0f
Plan reference-conditioned handling shots and record video mask feasi…
lxf82dev Nov 13, 2026
7902831
Route avatar-object interactions through reference-conditioned genera…
lxf82dev Nov 13, 2026
81ef187
docs: define staged scene handoff for coupled interactions
lxf82dev Nov 13, 2026
eeb2118
docs: record full-clip masking, tracker and lighting acceptance results
lxf82dev Nov 13, 2026
caa2256
docs: record staged pickup and completed two-person handoff
lxf82dev Nov 13, 2026
33b3f50
docs: record accepted interactions and stylized story generation find…
lxf82dev Nov 13, 2026
beef201
docs: map hybrid experiments and define shot-level video routes
lxf82dev Nov 13, 2026
b4351d3
Support explicit Chromium selection and record verified hybrid subchecks
lxf82dev Nov 13, 2026
5452f3e
Record interrupted lighting study and retained baseline evidence
lxf82dev Nov 13, 2026
124c277
Record independently verified lighting gains and remaining defects
lxf82dev Nov 13, 2026
7e8d923
Document verified cast reuse across three authored styles
lxf82dev Nov 13, 2026
9c5ed08
Correct lighting measurements and record glare and shadow refinements
lxf82dev Nov 13, 2026
779341d
Record second action brief and tested limits of cast reuse
lxf82dev Nov 13, 2026
51024be
Record controlled hair-mask audit and interrupted glass study
lxf82dev Nov 13, 2026
6729b1f
Bound nested transparency with verified raster and Cycles evidence
lxf82dev Nov 13, 2026
61c2bcf
Separate hair-matte stability from accuracy with verified isolation t…
lxf82dev Nov 14, 2026
e8d902e
Record stronger matting tradeoffs and independent verification
lxf82dev Nov 14, 2026
ca90263
Preserve renderer audio and verify generated-take round trip
lxf82dev Nov 14, 2026
55762d9
Record moving-reflection evidence and remaining renderer limits
lxf82dev Nov 14, 2026
456cbe1
Bound shared human lighting and record failed operating-range cases
lxf82dev Nov 14, 2026
94ded75
Validate imported media before publication and gate export identity
lxf82dev Nov 14, 2026
20b7fd0
Bound moving reflection claims with independent pixel measurements
lxf82dev Nov 14, 2026
02ec15c
Recover interrupted CLI jobs with generation locks and owned resources
lxf82dev Nov 14, 2026
5fbac4f
Record direct-light calibration and bounded glossy reference evidence
lxf82dev Nov 14, 2026
9ad95a3
Record moving-highlight limits and validated spatial proxy reflections
lxf82dev Nov 14, 2026
164753d
Document illustrated cartoon and bounded product reflection results
lxf82dev Nov 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
- run: npx playwright install --with-deps chromium
- run: npm run test:beta
- run: npm run test:renderer
- run: npm run test:hybrid
- run: npm run test:prepared
- run: npm run test:browser
website:
name: Website validation
Expand Down
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## Unreleased

Hybrid scenes: code-rendered elements composited with filmed or generated footage. See [hybrid scenes](docs/hybrid-scenes.md).

- Add derived assets: a matte, depth map, normals, track, camera path or environment is pinned to the hash of the footage it was computed from. A replaced take, a second asset for one role, or a derived video with a different frame count is refused. `asset-add` gains `--role`, `--of` and depth-encoding flags; JSON `data` assets are accepted.
- Add `editableframes/plate`: corner-pin homographies, track and camera-path sampling, frame-rate conform and cadence, depth encodings, plate measurements (levels, light direction, noise), seeded grain, object-id colours and shutter sampling.
- Add `editableframes/three-plate`: depth occlusion by the footage, matte hold-out, lighting from the footage, camera-path replay, a shadow catcher and clay/depth/normal/id/matte passes.
- Add optional `mediaInfo` and `derived` renderer services, declared control passes (`passes`, `clock.pass`) and `render --pass`.
- Add shutter motion blur at export: `render --motion-blur ANGLE [--samples N]`.
- Add `init --hybrid`, a starter with a synthetic plate, and `npm run test:hybrid`.
- Document a trial of the hybrid helpers on generated footage, and how to conform mattes and depth maps made by other tools.
- The hybrid starter lights its can from the footage at environment intensity 1 (was 1.5, set while half of the panorama was empty), with aluminium lids at aluminium's reflectance. Measured against real cans in generated plates.
- Fix video frames looked up one frame early: media preparation read frame times as six-decimal seconds, so frame 1 of a 24 fps clip (0.041667) seemed to start after 1/24 s and a third of the frames of any 24 or 30 fps clip showed their predecessor. Frame times are now exact ticks in the stream's time base.
- Fix MP4 and MOV exports coming out 10–13 levels darker than the frames drawn (128 became 115), footage included: the encoder converted sRGB to the BT.709 camera curve, which players do not undo. Exports now keep the drawn values (BT.709 matrix, limited range, transfer tagged as sRGB).
- Fix footage tagged with BT.709 primaries and transfer (most camera footage) drawing darker than its values, and mattes and depth maps tagged the same way drawing changed data: decoded frames carried colour chunks the browser applied. Frames are now decoded without them.
- Fix MOV export of a scene with no transparency, which failed extracting an alpha channel the frames did not have.
- Document a trial of the hybrid helpers on filmed footage.
- Fix transparent DOM-root exports capturing the preview page's own header through the scene. Any transparent renderer export smaller than the header area was affected.

Runtime files changed, so existing projects need their normal `rebind`.

## 0.1.0-beta.1 — 2026-10-07

First beta for trusted local-code projects. No remote publication is implied.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ These are original code-built studies and previews, not copies of other creators
- **Give each clip the right controls.** Expose a camera for a 3D scene, colors for a title, or media timing for an embedded speaker. Panels support conditional fields, presets and numeric macros.
- **Let people and agents refine the same work.** Stable anchors, validated changes, saved history and undo/redo make targeted edits practical.
- **Bring video into the scene.** Import an MP4 as an editable media port, with timing, playback speed and audio controls. Export an opaque video or a transparent overlay.
- **Put code inside footage.** Let a filmed or generated shot hide, light and carry code-rendered elements: a product behind a passing hand, a headline behind a presenter, a price pinned to a moving sign. Mattes, depth and tracks are pinned inputs from any tool; no model runs here. See [hybrid scenes](docs/hybrid-scenes.md).
- **Choose your model and host.** No Stitchable account, Remotion dependency or model API key is required by the framework. The shared skill and CLI are available for Claude Code, Codex and other tool-capable agents, including Grok; host-specific setup is documented separately.

## Try it
Expand Down
15 changes: 9 additions & 6 deletions bin/editableframe.mjs
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
#!/usr/bin/env node
import {chromiumOptions} from '../scripts/browser.mjs';
import fs from 'node:fs/promises';import path from 'node:path';
import {root,buildApps} from '../scripts/build.mjs';import {serve} from '../scripts/server.mjs';import {init,readProject,mutate,preview,rebind,importAsset} from '../scripts/project.mjs';
const [cmd,...args]=process.argv.slice(2),out=v=>console.log(JSON.stringify(v,null,2));
try{
if(cmd==='init')out(await init(args[0]||'my-clip',{template:args.includes('--media')?'media':args.includes('--renderer')?'renderer':'canvas'}));
const flag=name=>{const i=args.indexOf(name);return i<0?undefined:args[i+1]};
if(cmd==='init')out(await init(args[0]||'my-clip',{template:args.includes('--media')?'media':args.includes('--renderer')?'renderer':args.includes('--hybrid')?'hybrid':'canvas'}));
else if(cmd==='inspect'){const d=await readProject(args[0]),cap=d.studio.capabilities(d.studio.doc.clips[0].id);out({...cap,baseRevision:d.revision,history:{length:d.studio.history.length,cursor:d.studio.cursor}})}
else if(cmd==='apply'){const p=JSON.parse(await fs.readFile(args[1],'utf8'));out(await mutate(args[0],d=>{if(p.baseRevision!==d.revision)throw Error('Stale revision: inspect again');d.studio.execute(p.command,d.studio.revision,'model')}))}
else if(cmd==='asset-add')out(await importAsset(args[0],args[1],args[2]));
else if(cmd==='asset-add'){const depth=flag('--depth'),controller=new AbortController();let signalled;for(const [name,code]of [['SIGINT',130],['SIGTERM',143],['SIGHUP',129]])process.on(name,()=>{signalled??=code;controller.abort()});try{out(await importAsset(args[0],args[1],args[2],{signal:controller.signal,role:flag('--role'),of:flag('--of'),subject:flag('--subject'),encoding:depth?{kind:depth,near:Number(flag('--near')),far:Number(flag('--far')),packing:flag('--packing')??'gray8'}:undefined}))}catch(e){if(signalled)process.exitCode=signalled;throw e}}
else if(cmd==='rebind')out(await rebind(args[0],{reset:args.includes('--reset')}));
else if(cmd==='undo'||cmd==='redo')out(await mutate(args[0],d=>d.studio[cmd]()));
else if(cmd==='preview'){const h=await preview(args[0],{port:Number(args[1]||8791)});console.log(h.url);for(const signal of ['SIGINT','SIGTERM'])process.once(signal,async()=>{h.server.closeAllConnections?.();await h.close();process.exit(0)})}
else if(cmd==='studio'){await buildApps();const h=await serve(root,{port:Number(args[0]||8790)});console.log(h.url)}
else if(cmd==='render'){const {render}=await import('../scripts/render.mjs');const option=name=>{const i=args.indexOf(name);return i<0?undefined:args[i+1]};const controller=new AbortController();process.once('SIGINT',()=>controller.abort());out(await render(args[0],args[1],{frames:option('--frames')?Number(option('--frames')):args[2]&&!args[2].startsWith('--')?Number(args[2]):undefined,fps:option('--fps'),format:option('--format'),background:option('--background'),signal:controller.signal,onProgress:p=>{if(p.phase!=='frames'||p.frame%24===0)console.error(JSON.stringify(p))}}))}
else if(cmd==='render'){const {render}=await import('../scripts/render.mjs');const option=name=>{const i=args.indexOf(name);return i<0?undefined:args[i+1]};for(const name of ['--expect-revision','--expect-binding'])if(args.includes(name)&&(!option(name)||option(name).startsWith('--')))throw Error('Missing value for '+name);const {beginJob,recoverJobs}=await import('../scripts/jobs.mjs');const controller=new AbortController();let signalled;for(const [name,code]of [['SIGINT',130],['SIGTERM',143],['SIGHUP',129]])process.on(name,()=>{signalled??=code;controller.abort()});if(!args.includes('--no-recover')){const found=await recoverJobs(args[0]).catch(e=>[{action:'recovery unavailable: '+e.message}]);if(found.length)console.error(JSON.stringify({phase:'recovery',jobs:found}))}const job=await beginJob(args[0],args[1]).catch(e=>{console.error('Render is not recoverable after a crash: '+e.message)});if(job)process.env.TMPDIR=process.env.TMP=process.env.TEMP=job.tmp;try{out(await render(args[0],args[1],{job,frames:option('--frames')?Number(option('--frames')):args[2]&&!args[2].startsWith('--')?Number(args[2]):undefined,fps:option('--fps'),format:option('--format'),background:option('--background'),pass:option('--pass'),motionBlur:option('--motion-blur')?{angle:Number(option('--motion-blur')),samples:option('--samples')?Number(option('--samples')):8}:undefined,expectRevision:option('--expect-revision'),expectBinding:option('--expect-binding'),signal:controller.signal,onProgress:p=>{if(p.phase!=='frames'||p.frame%24===0)console.error(JSON.stringify(p))}}))}catch(e){if(signalled)process.exitCode=signalled;throw e}finally{await job?.finish()}}
else if(cmd==='recover'){const {recoverJobs}=await import('../scripts/jobs.mjs');out(await recoverJobs(args[0],{dryRun:args.includes('--dry-run'),stopBrowsers:args.includes('--stop-browsers')}))}
else if(cmd==='assets'){const {run}=await import('../scripts/assets.mjs');await run(args)}
else if(cmd==='install-skill'){const {install}=await import('../scripts/install-skill.mjs');out(await install(args[0],args[1]))}
else if(cmd==='doctor'){const {run,ffmpeg,ffprobe}=await import('../scripts/process.mjs');const {chromium}=await import('playwright');const checks={};for(const [name,command]of [['ffmpeg',ffmpeg()],['ffprobe',ffprobe()]]){try{checks[name]=(await run(command,['-version'])).toString().split('\n')[0]}catch(e){checks[name]='MISSING: '+e.message}}try{await fs.access(chromium.executablePath());checks.browser='installed'}catch{checks.browser='MISSING: run npx playwright install chromium'}out({node:process.version,version:'0.1.0-beta.1',platform:process.platform,checks,ready:Object.values(checks).every(x=>!x.startsWith('MISSING')),trust:'Local trusted source; not an untrusted-code sandbox',distribution:'source-checkout',npmPublished:false})}
else if(!cmd||cmd==='help'||cmd==='--help')console.log(`EditableFrames 0.1.0-beta.1\n\n init DIR [--media|--renderer] Create an editable clip (media demo needs FFmpeg)\n rebind DIR [--reset] Accept edited source; archive prior project\n inspect DIR JSON controls + current file revision\n apply DIR proposal.json Revision-checked atomic edit\n undo DIR | redo DIR Saved edit history\n preview DIR [PORT] Preview trusted code on loopback\n render DIR OUTPUT [--frames N] [--fps 30000/1001] [--format png]\n .mp4 = opaque; .mov = alpha ProRes4444\n asset-add DIR ID FILE Pin local media; rebind then swap a port\n studio [PORT] Open all bundled studies and device library\n assets list|verify|pack|install-pack [FILE]\n install-skill codex|claude|grok|generic TARGET\n doctor Show environment requirements\n\nCustom clip modules are executable JavaScript. Use trusted projects.\nNo model, account, cloud service, or Stitchable installation required.`);
else if(cmd==='doctor'){const {run,ffmpeg,ffprobe}=await import('../scripts/process.mjs');const {chromium}=await import('playwright');const checks={};for(const [name,command]of [['ffmpeg',ffmpeg()],['ffprobe',ffprobe()]]){try{checks[name]=(await run(command,['-version'])).toString().split('\n')[0]}catch(e){checks[name]='MISSING: '+e.message}}try{const options=chromiumOptions();await fs.access(options.executablePath??chromium.executablePath());checks.browser=options.executablePath?'configured executable exists (launch checked during render)':'Playwright Chromium exists (launch checked during render)'}catch(e){checks.browser='MISSING: '+e.message+'; install Playwright Chromium or set EDITABLEFRAMES_CHROMIUM_EXECUTABLE to an existing compatible browser'}out({node:process.version,version:'0.1.0-beta.1',platform:process.platform,checks,ready:Object.values(checks).every(x=>!x.startsWith('MISSING')),trust:'Local trusted source; not an untrusted-code sandbox',distribution:'source-checkout',npmPublished:false})}
else if(!cmd||cmd==='help'||cmd==='--help')console.log(`EditableFrames 0.1.0-beta.1\n\n init DIR [--media|--renderer|--hybrid] Create an editable clip (media and hybrid demos need FFmpeg)\n rebind DIR [--reset] Accept edited source; archive prior project\n inspect DIR JSON controls + current file revision\n apply DIR proposal.json Revision-checked atomic edit\n undo DIR | redo DIR Saved edit history\n preview DIR [PORT] Preview trusted code on loopback\n render DIR OUTPUT [--frames N] [--fps 30000/1001] [--format png]\n [--pass clay|depth|normal|id|matte] [--motion-blur ANGLE [--samples N]]\n [--expect-revision R] [--expect-binding B] [--no-recover]\n .mp4 = opaque; .mov = alpha ProRes4444\n asset-add DIR ID FILE Pin local media; rebind then swap a port\n [--role alpha|matte|depth|normals|track|camera|environment|analysis|surface|coverage|foreground --of PLATE_ID [--subject ID]]\n [--depth inverse|linear --near N --far F] Data derived from a plate\n recover DIR [--dry-run] [--stop-browsers]\n Clean up after renders of DIR that were killed\n studio [PORT] Open all bundled studies and device library\n assets list|verify|pack|install-pack [FILE]\n install-skill codex|claude|grok|generic TARGET\n doctor Show environment requirements\n\nCustom clip modules are executable JavaScript. Use trusted projects.\nNo model, account, cloud service, or Stitchable installation required.`);
else throw Error('Unknown command. Run editableframes help');
}catch(e){console.error(e.message);process.exitCode=1}
}catch(e){console.error(e.message);process.exitCode||=1}
6 changes: 3 additions & 3 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ not imply depth, layer, simulation, device or audio-automation services. See the

`AdapterRegistry` supports versioned adapters with `create(context)` returning `render(frame)`. An adapter can declare required host services. `createEffectHost` supplies only real implementations; missing services produce an explicit error. The initial demos include direct rendering paths as well as this optional registry. They do not yet all route through a single scheduler.

The beta media host supplies `frameAt` and editable `portFrame`. General `layerAt`, `audioAt`, `maskAt`, `depthAt`, and `simulationAt` services remain extension work. Frame identity must include source revision, time, quality, color and effect order. Temporal effects must define whether they sample original source or upstream composition. Do not fake frame history by repeatedly drawing the same current frame.
The beta media host supplies `frameAt` and editable `portFrame`. Mattes, depth maps, tracks and camera paths reach a renderer as ordinary pinned assets linked to the footage they were computed from (`mediaInfo`, `derived`; see [hybrid scenes](hybrid-scenes.md)). General `layerAt`, `audioAt` and `simulationAt` services, and depth ordering between separate clips, remain extension work. Frame identity must include source revision, time, quality, color and effect order. Temporal effects must define whether they sample original source or upstream composition. Do not fake frame history by repeatedly drawing the same current frame.

## Implemented and proposed

Implemented: authoring core, disk-backed panel editor, revision-checked agent proposals, procedural Canvas/Three/WebGL2 studies, floating-point effects, device lighting, shared clip compositor, PTS-indexed local media frames, static audio-port mixing, rational frame exports and RGBA/ProRes transparency. See beta.md for the exact supported contract.
Implemented: authoring core, disk-backed panel editor, revision-checked agent proposals, procedural Canvas/Three/WebGL2 studies, floating-point effects, device lighting, shared clip compositor, PTS-indexed local media frames, static audio-port mixing, rational frame exports and RGBA/ProRes transparency. See beta.md for the exact supported contract. Since beta 1: derived plate assets, depth occlusion, matte cut-outs, corner pins, lighting from a plate, declared control passes and shutter motion blur at export (hybrid-scenes.md).

Proposed: streaming/hardware media decode, depth/ID sources, audio automation, untrusted-code sandboxing, distributed scheduling, EffectCraft/WASM bridge, broader DOM/media conformance, device-profile unification and explicit schema migration maps.
Proposed: streaming/hardware media decode, depth ordering between clips, audio automation, untrusted-code sandboxing, distributed scheduling, EffectCraft/WASM bridge, broader DOM/media conformance, device-profile unification and explicit schema migration maps.

New custom code remains supported even when it exposes no editable controls. Unknown capabilities must not be discarded or converted to a smaller primitive vocabulary. In this beta, unknown template adapters prevent loading rather than mutating the saved document.

Expand Down
Loading
Loading