--- name: final-cut-pro description: Apple Final Cut Pro FCPXML format reference. Covers project structure, timeline creation, clip references, effects, and transitions. Use when generating FCP projects or understanding FCPXML structure. --- plugin: video-editing updated: 2026-01-20 # Apple Final Cut Pro XML (FCPXML) Production-ready patterns for generating FCPXML projects compatible with Final Cut Pro 10.4+. ## FCPXML Version Compatibility | FCP Version | FCPXML Version | Key Features | |-------------|----------------|--------------| | 10.4+ | 1.8+ | Compound clips, roles | | 10.5+ | 1.9 | Enhanced color | | 10.6+ | 1.10 | HDR support | | 10.7+ | 1.11 | Object tracking | **Recommendation:** Use version 1.9 for broad compatibility. ## Basic Project Structure ```xml ``` ## Key Elements Reference ### Format Definition Define the timeline format (resolution, frame rate): ```xml ``` ### Asset Definition Reference media files: ```xml ``` ### Clip Placement on Timeline ```xml ``` **Key timing attributes:** - `offset` - Position on timeline (where clip starts in sequence) - `start` - In-point within source media - `duration` - How long the clip plays ### Gap (Empty Space) ```xml ``` ### Transitions ```xml ``` ### Video Layers (Connected Clips) ```xml ``` ### Titles and Text ```xml <text> <text-style ref="ts1">Welcome to the Video</text-style> </text> ``` ### Markers ```xml ``` ## Complete Project Template ```xml <text> <text-style ref="ts1" font="Helvetica" fontSize="72" fontColor="1 1 1 1"> Project Title </text-style> </text> ``` ## Timing Calculations ### Frame Duration Reference | Frame Rate | frameDuration | |------------|---------------| | 24 fps | 1/24s | | 25 fps | 1/25s | | 30 fps | 1/30s | | 29.97 fps | 1001/30000s | | 23.976 fps | 1001/24000s | | 60 fps | 1/60s | ### Time Format FCPXML uses rational time notation: - Seconds: `30s` (30 seconds) - Frames: `24/24s` (24 frames at 24fps = 1 second) - Fractional: `1001/30000s` (for NTSC timing) ```python def frames_to_fcpxml_time(frames, fps=24): """Convert frame count to FCPXML time string.""" if fps == 29.97: return f"{frames * 1001}/30000s" elif fps == 23.976: return f"{frames * 1001}/24000s" else: return f"{frames}/{fps}s" def seconds_to_fcpxml_time(seconds): """Convert seconds to FCPXML time string.""" return f"{seconds}s" ``` ## Validation Before importing FCPXML: 1. **Validate XML syntax:** ```bash xmllint --noout project.fcpxml ``` 2. **Check file paths exist:** ```bash grep -oP 'src="file://[^"]+' project.fcpxml | while read src; do path="${src#src=\"file://}" [[ -f "$path" ]] || echo "Missing: $path" done ``` 3. **Verify format consistency:** All assets should reference existing format definitions. ## Import into Final Cut Pro 1. File > Import > XML... 2. Select the .fcpxml file 3. FCP will create a new Event with the project 4. Review for any warnings about missing media ## Related Skills - **ffmpeg-core** - Convert media to ProRes for FCP compatibility - **transcription** - Generate subtitles/markers from transcripts