Skip to content

OpenReel Video - Professional browser-based video editor. Open source CapCut alternative. 100% browser-based, no installation, no cloud uploads, no watermarks.

TypeScript
4.5 KB
Raw Blame

Saved-project compatibility fixtures

w4.openreel.json, w5.openreel.json, w6.openreel.json and w8.openreel.json are project files exactly as the w4 (feat/premiere-parity-w4), w5 (feat/premiere-parity-w5), w6 (feat/premiere-parity-w6) and w8 (w8/essential-graphics) trees write them. They are checked by apps/web/src/test/project-compat.test.ts:

  • the file validates and imports, with the same timeline, media, text clip and marker;
  • a re-save loses or changes nothing the file had (the only additions are the documented normalizations: the implicit main sequence for pre-w6 files, placeholder flags for media without a blob, default rack parameters, generatedShaders: []), and a second re-save is identical;
  • the project opens in the project store and an edit is exactly one undo step.

What each fixture exercises: a 3-scene video track with a crossfade, an effect and a transform, a faded audio clip on a track with an audio rack, a text clip and a marker (w4+); bins, smart bins, media label/scene/shot/take/good-take, clip labels and a sync-lock-off track (w5+); a nest of two clips plus a second sequence (w6); the w6 content plus an Essential Graphics lower third with edited controls, i.e. graphicInstances and its member text/shape clips (w8). Older fixtures must load with no graphicInstances and gain none on re-save.

w8-audio-repair.openreel.json

Wave 8 audio repair (DeHum, DeClick, DeClip, DeEss, DeReverb, Gate) adds new effect types to clip audio effects and to track / bus / master racks. It changes no required field, so the older files above must still open untouched (checked: re-saving w4/w5/w6 never emits a repair effect) and this file, which uses all six effect types in a clip, a track rack, a bus rack and the master rack, must round-trip with every parameter. It is checked by apps/web/src/test/project-compat.audio-repair.test.ts. It is written by the w8 tree from the w6 fixture:

cd apps/web && OPENREEL_AUDIO_REPAIR_FIXTURE_OUT=$PWD/src/test/fixtures/compat/w8-audio-repair.openreel.json \
  npx vitest run src/test/project-compat.audio-repair.test.ts -t "writes the fixture"

w9-desktop-ingest.openreel.json

Wave 9 desktop ingest adds only optional fields: mediaLibrary.desktopIngest (proxy format, Proxies / Media folders, jobs at once, proxies-with-copy), sourceFile.path (the file's absolute path on disk), copiedFrom (copy-to-project provenance: original path + SHA-256) and, on a proxy reference, profile and previewPath (the H.264 twin of a ProRes proxy). The older files above must still open untouched (checked: re-saving w4..w8 never emits any of them) and this file, which uses all of them, must round-trip with every field. It is checked by apps/web/src/test/project-compat.desktop-ingest.test.ts and written by the w9 tree from the w6 fixture:

cd apps/web && OPENREEL_DESKTOP_INGEST_FIXTURE_OUT=$PWD/src/test/fixtures/compat/w9-desktop-ingest.openreel.json \
  npx vitest run src/test/project-compat.desktop-ingest.test.ts -t "writes the fixture"

w12-lumetri.openreel.json

Wave 12 Basic Correction adds only optional fields: clip.colorGrading.tone (exposure, contrast, highlights, shadows, whites, blacks), clip.colorGrading.vignette (amount, midpoint, roundness, feather) and keyframes on colorGrade.tone.* / colorGrade.vignette.*. The older files above must still open untouched (checked: re-saving w4..w9 never emits any of them) and this file, which uses all of them on one clip, must round-trip. It is checked by apps/web/src/test/project-compat.lumetri.test.ts and written by the w12 tree from the w9 fixture:

cd apps/web && OPENREEL_LUMETRI_FIXTURE_OUT=$PWD/src/test/fixtures/compat/w12-lumetri.openreel.json \
  npx vitest run src/test/project-compat.lumetri.test.ts -t "writes the fixture"

Regenerating

The fixtures are generated by the tree they represent, never hand-edited, so the bytes are what that tree writes:

git worktree add --detach /tmp/wt-w5 feat/premiere-parity-w5
cd /tmp/wt-w5 && pnpm install --frozen-lockfile --offline
sed 's#"../src/#"./#' <repo>/apps/web/scripts/generate-compat-fixture.gen.ts > apps/web/src/gen-compat.test.ts
cd apps/web && OPENREEL_COMPAT_WAVE=w5 OPENREEL_COMPAT_OUT=<repo>/apps/web/src/test/fixtures/compat/w5.openreel.json \
  npx vitest run src/gen-compat.test.ts
cd <repo> && git worktree remove --force /tmp/wt-w5

Use OPENREEL_COMPAT_WAVE=w4|w5|w6. When a later wave changes the on-disk format, add a w7 fixture the same way and keep the old ones: they are the proof that old files still open.