Skip to content

Fix FCPXML import failing DTD validation in Final Cut Pro - #88

Merged
wassgha merged 1 commit into
mainfrom
screenshot-bug-fix-pr
Aug 29, 2026
Merged

Fix FCPXML import failing DTD validation in Final Cut Pro#88
wassgha merged 1 commit into
mainfrom
screenshot-bug-fix-pr

Conversation

@wassgha

@wassgha wassgha commented Aug 29, 2026

Copy link
Copy Markdown
Owner

The bug

Jack reported that importing an exported FCPXML timeline into Final Cut Pro always fails:

The XML document sent from application "(null)" could not be imported.
DTD validation failed. (The data couldn't be read because it isn't in the correct format.)

His hunch about a 12-hour vs 24-hour date format was the right thread to pull.

Cause

Two problems in the FCPXML we emit. Before:

<project name="interview" modDate="2026-08-29 12:35:09 America/Los_Angeles">
  <sequence ...>
    <spine>
      <asset-clip name="interview.mp4 1" ref="ra24740a9b9ee" offset="0s" duration="1/1s" start="0s">
        <asset-clip name="interview.mp4 1" ref="ra24740a9b9ee" offset="0s" duration="1/1s" start="0s" lane="1"/>
      </asset-clip>

1. modDate is unparseable. FCP wants a numeric UTC offset (2026-08-29 12:35:09 -0700); the upstream writer stamps an IANA zone name instead. A modDate FCP can't parse takes down the whole document with the generic DTD error. FCP 10.6.x is stricter still — it only accepts the clock format matching the user's system 12/24-hour setting, so even a well-formed value is a coin flip. The attribute is optional and we have nothing meaningful to put there, so we drop it.

2. Duplicate connected clips. We hand the writer parallel V1/A1 tracks, which XMEML and AAF both need. But a single FCP asset-clip already carries the video and audio of its asset, so the writer turned A1 into connected clips in lane 1 — that imports as a duplicate video overlay with doubled audio. We now collapse to one track for the FCPXML path only.

After

<project name="interview">
  <sequence duration="5/2s" format="r1" tcStart="0s" tcFormat="NDF" audioLayout="stereo" audioRate="48k">
    <spine>
      <asset-clip name="interview.mp4 1" ref="ra24740a9b9ee" offset="0s" duration="1/1s" start="0s"/>
      <asset-clip name="interview.mp4 2" ref="ra24740a9b9ee" offset="1/1s" duration="3/2s" start="2/1s"/>
    </spine>

Premiere/Resolve XMEML and AAF output are unchanged.

Testing

npm run test:timeline passes, with new coverage for: no modDate in the output, one asset-clip per keep range with no lane= attributes, audio-only FCPXML projects still landing on the spine, stripFcpxmlModDate not touching non-project tags, and XMEML keeping both its tracks. tsc --noEmit and eslint are clean.

I could not verify the import in Final Cut Pro itself — it isn't installed here — so that check is still worth doing before release. The output is well-formed per xmllint, and both defects are independently confirmed against how real FCP-authored files look.

🤖 Generated with Claude Code

Final Cut Pro rejected every exported .fcpxml with "The XML document sent
from application "(null)" could not be imported. DTD validation failed."

Two problems in the FCPXML we emit:

- `<project modDate>` was stamped with an IANA zone name
  (`2026-08-29 12:37:45 America/Los_Angeles`) where FCP wants a numeric UTC
  offset (`... -0700`). FCP 10.6.x is stricter still and only accepts the
  clock format matching the user's system 12/24-hour setting, so even a
  well-formed value is a coin flip. modDate is optional and we have nothing
  meaningful to put there, so drop it.

- We hand the writer parallel V1/A1 tracks (needed for XMEML and AAF), but a
  single FCP asset-clip already carries both the video and audio of its
  asset. The writer turned A1 into connected clips in lane 1, which imports
  as a duplicate video overlay with doubled audio. Collapse to one track for
  the FCPXML path only.

Premiere/Resolve XMEML and AAF output are unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app.rescript Ready Ready Preview Aug 29, 2026 7:40pm

@wassgha
wassgha merged commit f8a669e into main Aug 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant