Fix FCPXML import failing DTD validation in Final Cut Pro - #88
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bug
Jack reported that importing an exported FCPXML timeline into Final Cut Pro always fails:
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:
1.
modDateis unparseable. FCP wants a numeric UTC offset (2026-08-29 12:35:09 -0700); the upstream writer stamps an IANA zone name instead. AmodDateFCP 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-clipalready 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
Premiere/Resolve XMEML and AAF output are unchanged.
Testing
npm run test:timelinepasses, with new coverage for: nomodDatein the output, oneasset-clipper keep range with nolane=attributes, audio-only FCPXML projects still landing on the spine,stripFcpxmlModDatenot touching non-projecttags, and XMEML keeping both its tracks.tsc --noEmitandeslintare 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