# FCPXML Auto Edit - Final Cut Pro Timeline from a Plan (`kotaro-project/fcpxml-auto-edit`) Actor

Turn a simple JSON edit plan (clips, narration, BGM, subtitles, decorative titles) into a Final Cut Pro FCPXML 1.14 timeline. Vertical 1080x1920 Shorts/Reels by default. Open it with File > Import > XML and the edit is laid out for you.

- **URL**: https://apify.com/kotaro-project/fcpxml-auto-edit.md
- **Developed by:** [KOTARO project](https://apify.com/kotaro-project) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / timeline

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## 🎬 FCPXML Auto Edit — a Final Cut Pro timeline from a simple plan

Making Shorts, Reels or TikToks in **Final Cut Pro**? Laying out clips and typing every subtitle by hand takes the longest.

**Describe the edit in a small JSON plan — get a ready-made FCPXML timeline.** Import it into Final Cut Pro (File › Import › XML) and your clips, narration, BGM, subtitles and title cards are already in place. Then polish and export.

### What goes into the timeline

- 🖼️ **Clips** (images or videos) one after another, or at exact times
- 🎙️ **Narration** and 🎵 **BGM** on their own lanes, with volume
- 💬 **Subtitles** — give exact times, or just a `script` with seconds per line
- ✨ **Title cards** in ready-made styles: `gold`, `silver`, `number` (yellow), `url` (pink), `sub` (white), and an optional `#PR` mark for sponsored posts
- 📐 Any size: vertical 1080×1920 (default), 1920×1080, square … at 24/25/30/50/60 fps; clips of another size or frame rate are handled too (`w`, `h`, `fps`)

The title styles come from a real channel's editing rules: bold outlined Japanese-friendly fonts (Hiragino) that stay readable on a phone screen.

### Input

```json
{
  "plan": {
    "title": "Shop opening",
    "width": 1080, "height": 1920, "fps": 30,
    "media": [{"file": "shot1.png", "duration": 4}, {"file": "shot2.mp4", "duration": 6, "keep_audio": true}],
    "narration": {"file": "voice.wav", "volume_db": 3},
    "bgm": {"file": "music.m4a", "volume_db": -18},
    "site_url": "https://example.com",
    "script": [{"text": "Welcome to our shop!", "seconds": 4}, {"text": "New items every day", "seconds": 6}],
    "decos": [{"start": 0, "end": 4, "text": "GRAND OPEN", "style": "gold", "y": 30}],
    "pr": true
  },
  "mediaFolder": "/Users/you/Movies/shop-opening"
}
```

`mediaFolder` is the folder on **your Mac** where the files are. Final Cut Pro then links them on import. Leave it empty and relink in Final Cut Pro instead.

### Output

A downloadable `.fcpxml` file (link in the results) plus a summary: size, length, number of clips, subtitles and titles.

### Notes

- Your media files are never uploaded — the timeline only refers to them by name.
- Writes FCPXML version 1.14 and is checked against Apple's FCPXML 1.14 definition (DTD); it needs a recent Final Cut Pro that reads that version.
- If the plan has a mistake, you get a clear message and are not charged.

### Pricing

Pay per timeline built (see the Pricing tab). Apart from Apify's standard start fee, there is no per-run charge.

Made by **KOTARO Data Works** 🇯🇵

# Actor input Schema

## `plan` (type: `object`):

width, height, fps (23.976, 24, 25, 29.97, 30, 50, 59.94 or 60), duration (seconds); autowrap (default true) breaks long subtitle lines, wrap_chars (default 10) sets the line width in full-width characters; site_url shows a web address near the bottom for the whole video; media: \[{file, duration, at?, in?, keep_audio?, w?, h?, fps? (for a clip of another size)}]; narration / bgm: {file, at?, duration?, volume_db?}; subs: \[{start, end, text, style?, y?}] or script: \[{text, seconds}]; decos: \[{start, end, text, style, y?}]; pr: true adds a #PR mark. Styles: sub, gold, silver, number, url, pr.

## `mediaFolder` (type: `string`):

Where the clips sit on your Mac, e.g. /Users/you/Movies/shop-video. Final Cut Pro then finds them on import. Leave empty to relink after import.

## `fileName` (type: `string`):

Name for the .fcpxml file (letters, numbers, - and \_).

## Actor input object example

```json
{
  "plan": {
    "title": "My first auto edit",
    "width": 1080,
    "height": 1920,
    "fps": 30,
    "media": [
      {
        "file": "shot1.png",
        "duration": 4
      },
      {
        "file": "shot2.png",
        "duration": 4
      }
    ],
    "script": [
      {
        "text": "Welcome to our shop!",
        "seconds": 4
      },
      {
        "text": "New items every day",
        "seconds": 4
      }
    ],
    "decos": [
      {
        "start": 0,
        "end": 4,
        "text": "SALE",
        "style": "gold",
        "y": 30
      }
    ]
  },
  "fileName": "project"
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "plan": {
        "title": "My first auto edit",
        "width": 1080,
        "height": 1920,
        "fps": 30,
        "media": [
            {
                "file": "shot1.png",
                "duration": 4
            },
            {
                "file": "shot2.png",
                "duration": 4
            }
        ],
        "script": [
            {
                "text": "Welcome to our shop!",
                "seconds": 4
            },
            {
                "text": "New items every day",
                "seconds": 4
            }
        ],
        "decos": [
            {
                "start": 0,
                "end": 4,
                "text": "SALE",
                "style": "gold",
                "y": 30
            }
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("kotaro-project/fcpxml-auto-edit").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "plan": {
        "title": "My first auto edit",
        "width": 1080,
        "height": 1920,
        "fps": 30,
        "media": [
            {
                "file": "shot1.png",
                "duration": 4,
            },
            {
                "file": "shot2.png",
                "duration": 4,
            },
        ],
        "script": [
            {
                "text": "Welcome to our shop!",
                "seconds": 4,
            },
            {
                "text": "New items every day",
                "seconds": 4,
            },
        ],
        "decos": [{
                "start": 0,
                "end": 4,
                "text": "SALE",
                "style": "gold",
                "y": 30,
            }],
    } }

# Run the Actor and wait for it to finish
run = client.actor("kotaro-project/fcpxml-auto-edit").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "plan": {
    "title": "My first auto edit",
    "width": 1080,
    "height": 1920,
    "fps": 30,
    "media": [
      {
        "file": "shot1.png",
        "duration": 4
      },
      {
        "file": "shot2.png",
        "duration": 4
      }
    ],
    "script": [
      {
        "text": "Welcome to our shop!",
        "seconds": 4
      },
      {
        "text": "New items every day",
        "seconds": 4
      }
    ],
    "decos": [
      {
        "start": 0,
        "end": 4,
        "text": "SALE",
        "style": "gold",
        "y": 30
      }
    ]
  }
}' |
apify call kotaro-project/fcpxml-auto-edit --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kotaro-project/fcpxml-auto-edit"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/q1a1g9CvJ10d72DFY/builds/medKZfQS5xKye3Dlf/openapi.json
