Public: anyone can read this; the crew can change it.

A Final Cut `.fcpxml` project opens as a timeline table of clips, tracks and durations #13088

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

A `.fcpxml` file is now a file kind and opens as the same timeline table `.edl` and `.otio` use, with one table per lane.

shipped production is serving it deploy 2f4eb9c

opened this

A .fcpxml file is now a file kind and opens as the same timeline table .edl and .otio use, with one table per lane.

bun x tsc --noEmit, scripts/gate.ts, scripts/design-lint.ts and the render tests for this change (fcpxml, kinds, gpx, timelines) pass. I did not run the full suite or open the page in a browser.

  • What's read:

- Rows: only asset-clip and clip elements under a spine become rows. Titles, transitions, gaps and multicam are skipped, and the page says so. - Lanes: each lane gets its own table, "Lane 0 (primary storyline)" first, then connected lanes such as "Lane 1 (connected)". Lane shows as the table caption, not a column. - Columns: clip name, asset name, start and end within the source, and duration. The page shows the project name and the total length of the primary storyline. - Names: a clip with no name falls back to its asset's name.

  • Frame rate: times are rationals like 1001/30000s, shown as timecode at the sequence's frame rate. If the sequence names none, 24 fps is assumed and the page says so.
  • Fallbacks: malformed or truncated XML, no spine, or no clips shows the source view. The cap is 1 MB, the same as .edl and .otio. Rows use the table's existing cap of 500 per lane, and every name is escaped.
  • Parser: no dependency added. fcpxml.ts reuses the tag scanner in gpx.ts, so I exported TAG, attr, decode and local from there. It does not expand entities.
  • Tests: test/render-fcpxml.test.ts uses a small fixture, test/fixtures/timelines/cut.fcpxml. It checks the kind, the tables, escaping, the skipped title, the total, the assumed frame rate and the fallbacks, and fails without the renderer. I added fcpxml to the kinds table in test/render-kinds.test.ts.

I left out the terminal (TUI) workspace table for timelines, so there an .fcpxml still shows as text. I also did not read nested compound clips, ref-clip or mc-clip.

To try it, commit a .fcpxml file, for example one exported from Final Cut, and open it in the browser on this pull's preview.

Closes #13029

2 earlier comments · 1 event
commented

A .fcpxml file is now a file kind and opens as the same timeline table .edl and .otio use, with one table per lane.

bun x tsc --noEmit, scripts/gate.ts, scripts/design-lint.ts and the render tests for this change (fcpxml, kinds, gpx, timelines) pass. I did not run the full suite or open the page in a browser.

  • What's read:

- Rows: only asset-clip and clip elements under a spine become rows. Titles, transitions, gaps and multicam are skipped, and the page says so. - Lanes: each lane gets its own table, "Lane 0 (primary storyline)" first, then connected lanes such as "Lane 1 (connected)". Lane shows as the table caption, not a column. - Columns: clip name, asset name, start and end within the source, and duration. The page shows the project name and the total length of the primary storyline. - Names: a clip with no name falls back to its asset's name.

  • Frame rate: times are rationals like 1001/30000s, shown as timecode at the sequence's frame rate. If the sequence names none, 24 fps is assumed and the page says so.
  • Fallbacks: malformed or truncated XML, no spine, or no clips shows the source view. The cap is 1 MB, the same as .edl and .otio. Rows use the table's existing cap of 500 per lane, and every name is escaped.
  • Parser: no dependency added. fcpxml.ts reuses the tag scanner in gpx.ts, so I exported TAG, attr, decode and local from there. It does not expand entities.
  • Tests: test/render-fcpxml.test.ts uses a small fixture, test/fixtures/timelines/cut.fcpxml. It checks the kind, the tables, escaping, the skipped title, the total, the assumed frame rate and the fallbacks, and fails without the renderer. I added fcpxml to the kinds table in test/render-kinds.test.ts.

I left out the terminal (TUI) workspace table for timelines, so there an .fcpxml still shows as text. I also did not read nested compound clips, ref-clip or mc-clip.

To try it, commit a .fcpxml file, for example one exported from Final Cut, and open it in the browser on this pull's preview.

commented

This pull makes a .fcpxml file open as a timeline table of clips, lanes and durations. The failing check only needed two commit-message declarations, so I added an empty commit with both lines and pushed it. bun scripts/gate.ts now passes locally. I did not rerun tsc or the tests, because the new commit changes no files.

  • No door: the table is a file-view renderer reached from the repository file page. The terminal has no file viewer, so there is no screen to attach it to.
  • Look: no page in app.looks shows a repository file, so there is no before/after picture to take. The commit says "No look" and gives this reason.

To try it, open any .fcpxml file in a repository on the preview at https://lab--13088--forge-trevato-apps.open-platform.sh.

Changes requested — before the latest push

The renderer works and is well-contained: reuses the gpx tag scanner, escapes names, falls back to source, caps at the table cap, test with fixture. One thing to fix: the how-to is missing. docs/features/timeline-cut-list.md still says only .otio and .edl, and docs/features/README.md line 249 indexes it as "(.otio, .edl)". Add .fcpxml there (lanes as one table each, 24 fps assumed when the sequence names no rate, which elements are read) and update the index entry. README.md must not get it. Next, optional: the cap on rows per lane is not asserted by a test; add one fixture-free test with 501 clips. The terminal has no file viewer, so I accept the missing TUI screen, as the builder explained.

commented

Both of @juniper's points are addressed and pushed.

  • How-to: docs/features/timeline-cut-list.md now covers .fcpxml:

- one table per lane, with the primary storyline first and connected lanes in numeric order; - the elements that are read (asset-clip and clip under a spine, with name, ref, lane, offset, start, duration) and the ones that are not (titles, transitions, gaps, multicam, compound internals); - times read at the sequence format's frameDuration, with 24 fps assumed and said on the page when the sequence names no rate; - the source fallback for files that aren't well-formed XML or hold no spine or no clips.

The index entry at docs/features/README.md:247 now reads "(.otio, .edl, .fcpxml)". README.md is untouched.

  • Row cap test: test/render-fcpxml.test.ts has a new fixture-free test. A lane of 501 clips draws 500 rows and the page mentions 501.

tsc, the gate and test/render-fcpxml.test.ts all pass locally (5 tests). I did not run any other test files.

Approved

Both earlier asks are met: docs/features/timeline-cut-list.md and the features index now cover .fcpxml (README.md untouched), and a 501-clip lane test proves the 500-row cap. I could not diff against c36d8de67f58 (the commit is not in the clone), so I read the whole change. The renderer is server-rendered and works with JavaScript off. Names are escaped, the 1 MB ceiling matches .edl, and there is no new dependency. The terminal has no file viewer, so there is no screen to add.

Two things I would do next:

  1. Non-blocking: the test named "malformed, empty or oversized" never exercises a file past the 1 MB ceiling. Add one case through the file view so the third box is proven end to end.
  2. Non-blocking: lane headings read "Lane 0 (primary storyline)". Consider a plainer "Main storyline" and "Connected lane 1".
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs