Edit package: timelines and Animatic media (#67) #124

Merged
crowmaki merged 2 commits from issue-67-edit-package-timelines into main 2026-10-09 19:04:39 +00:00
Owner

Closes #67. Part of #24 (User Stories 196–198).

What

The Edit package now carries the Animatic, so an editor can start from it in Resolve.

<package>/
  Animatic/<Scene bin>/   1A board 01.png … 1 slate 01.png, 1 Performance.wav
  Timelines/              <Scene bin>.fcpxml / .otio / .srt, Animatic.fcpxml / .otio (whole film)
  • FCPXML 1.10, written by hand: exactly one event holding one project, with no browser clips, bins or markers (as #21 found Resolve requires). Project ratio at final size, 24 fps, starting at 01:00:00:00. A clip of another size, such as a draft, gets <adjust-conform type="fit"/>.
  • .otio: V1 has the clips and stills, A1 the Takes' own audio (with gaps), and A2 the Performance. Timeline markers come from transitions (purple) and shot directions (cyan), and clip markers from timecoded Take notes in the played range.
  • Take events reference the whole packaged clip, with in and out points at the Line marks, so handles are available.
  • Board and slate events become PNG stills at final size. A new still starts wherever the Panel or the captions change. Each still has the Shot label (1B_2 1/2) and the captions burned in: dialogue with its cue, plus action Lines on "no coverage" slates. Text is set in Noto Sans (OFL), which now ships in crates/studio-core/fonts/, so stills look the same on every machine. The sidecar ffmpeg's fontconfig has no config on Windows.
  • Performance: each Scene's Performance is written as a 48 kHz stereo WAV beside its stills. It plays under everything except Take events. In FCPXML it is connected on lane -1 and cut at event edges.
  • .srt: one per Scene with dialogue, timed from the timeline's start.
  • Export progress now counts every file it writes. EditPackageProgress.clip is renamed to item, and the Export view says this.

Tests

crates/studio-core/tests/edit_package.rs drives ProjectSession and checks:

  • the package tree;
  • the golden FCPXML and OTIO in tests/fixtures/edit-package-scene.*, which follow the shape of the Resolve test kit's files: a draft Take scaled to fit, a two-Panel Board split at the Panel change, a final Take with an in-range note, a no-coverage slate and a transition marker;
  • in and out points against the Animatic's Line marks;
  • still size and captions;
  • the .srt;
  • the whole-film timeline playing the Scenes back to back;
  • Performance WAV and lane -1 audio, with total length equal to the Cut's.

The still renderer and the time and URL helpers also have unit tests.

cargo test --workspace --all-features, bun test src scripts and bun run check all pass.

Not verified in Resolve

  • The goldens are this code's output, checked by hand against the test kit's shape. The kit is gitignored and isn't compared directly.
  • #21 showed that clip markers survive OTIO import. Timeline (Stack) markers and lane -1 connected audio in FCPXML were not part of that test, so they're worth a quick import check.

Screenshots

Export in progress, then done (the seeded Project has no Takes, so only the Animatic goes in):

Export progress
Export done

The exported Board still for that sketch, and from the test package a Board with MARK's caption, plus a "no coverage" slate:

Board still
Board with caption
No coverage slate

Closes #67. Part of #24 (User Stories 196–198). ## What The Edit package now carries the Animatic, so an editor can start from it in Resolve. ``` <package>/ Animatic/<Scene bin>/ 1A board 01.png … 1 slate 01.png, 1 Performance.wav Timelines/ <Scene bin>.fcpxml / .otio / .srt, Animatic.fcpxml / .otio (whole film) ``` - **FCPXML 1.10**, written by hand: exactly one event holding one project, with no browser clips, bins or markers (as #21 found Resolve requires). Project ratio at final size, 24 fps, starting at `01:00:00:00`. A clip of another size, such as a draft, gets `<adjust-conform type="fit"/>`. - **`.otio`**: V1 has the clips and stills, A1 the Takes' own audio (with gaps), and A2 the Performance. Timeline markers come from transitions (purple) and shot directions (cyan), and clip markers from timecoded Take notes in the played range. - **Take events** reference the whole packaged clip, with in and out points at the Line marks, so handles are available. - **Board and slate events** become PNG stills at final size. A new still starts wherever the Panel or the captions change. Each still has the Shot label (`1B_2 1/2`) and the captions burned in: dialogue with its cue, plus action Lines on "no coverage" slates. Text is set in **Noto Sans (OFL)**, which now ships in `crates/studio-core/fonts/`, so stills look the same on every machine. The sidecar ffmpeg's fontconfig has no config on Windows. - **Performance**: each Scene's Performance is written as a 48 kHz stereo WAV beside its stills. It plays under everything except Take events. In FCPXML it is connected on lane -1 and cut at event edges. - **`.srt`**: one per Scene with dialogue, timed from the timeline's start. - Export progress now counts every file it writes. `EditPackageProgress.clip` is renamed to `item`, and the Export view says this. ## Tests `crates/studio-core/tests/edit_package.rs` drives `ProjectSession` and checks: - the package tree; - the golden FCPXML and OTIO in `tests/fixtures/edit-package-scene.*`, which follow the shape of the Resolve test kit's files: a draft Take scaled to fit, a two-Panel Board split at the Panel change, a final Take with an in-range note, a no-coverage slate and a transition marker; - in and out points against the Animatic's Line marks; - still size and captions; - the `.srt`; - the whole-film timeline playing the Scenes back to back; - Performance WAV and lane -1 audio, with total length equal to the Cut's. The still renderer and the time and URL helpers also have unit tests. `cargo test --workspace --all-features`, `bun test src scripts` and `bun run check` all pass. ## Not verified in Resolve - The goldens are this code's output, checked by hand against the test kit's shape. The kit is gitignored and isn't compared directly. - #21 showed that clip markers survive OTIO import. Timeline (Stack) markers and lane -1 connected audio in FCPXML were not part of that test, so they're worth a quick import check. ## Screenshots Export in progress, then done (the seeded Project has no Takes, so only the Animatic goes in): ![Export progress](https://git.crowmaki.me/attachments/76719c3d-7325-41c7-a2f1-6c437464fbed) ![Export done](https://git.crowmaki.me/attachments/7ec0d250-4ccb-4114-89da-b15b4f29a896) The exported Board still for that sketch, and from the test package a Board with MARK's caption, plus a "no coverage" slate: ![Board still](https://git.crowmaki.me/attachments/ab57f143-eed2-44be-b4bc-c46e18964331) ![Board with caption](https://git.crowmaki.me/attachments/c8e958bd-9261-478f-9670-b9dc2904fdf9) ![No coverage slate](https://git.crowmaki.me/attachments/e6a9cbad-877f-473b-93ae-99cf9958b956)
The Edit package now carries the Animatic, so an editor can start from
it in Resolve. Each picked Scene gets a timeline, and the picked Scenes
together get a whole-film one, written as hand-made FCPXML 1.10 and as
.otio: the Project ratio at final size, 24 fps, from 01:00:00:00.

The FCPXML holds one event with one project and no browser clips, bins
or markers, as the Resolve test kit found it must. A circled Take's
event plays its whole packaged clip with in and out points at the Line
marks, and a draft of another size is scaled to fit. The .otio carries
the markers Resolve keeps: transitions and shot directions on the
timeline, and timecoded Take notes on their clips.

Board and "no coverage" events become PNG stills at final size under
Animatic/<Scene bin>/, a new one wherever the Panel or the captions
change, with the Shot label and captions burned in. Text is set in Noto
Sans (OFL), which now ships with studio-core, so stills look the same on
every machine. Each Scene's Performance goes in beside its stills as a
WAV and plays under everything but Take events. A sidecar .srt carries
each Scene's dialogue.

Export progress now counts every file it writes (clips, stills,
Performances and the timelines), and the Export view says so.

Co-Authored-By: Claude <noreply@anthropic.com>
Performance audio is cut at event edges, so no connected FCPXML clip
runs past its parent. A Take event's in point gives way when rounded
marks would put its out point past the clip's end. Bounce and the
package share one FLAC decode on Ffmpeg, and the timeline format is
written in one place.

Co-Authored-By: Claude <noreply@anthropic.com>
crowmaki deleted branch issue-67-edit-package-timelines 2026-10-09 19:04:39 +00:00
Sign in to join this conversation.
No description provided.