> ## Documentation Index
> Fetch the complete documentation index at: https://docs.profy.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# Video Production

> The profy-movie plugin's video production pipeline: from creative brief to professional timeline editing and export

# Video Production

The `profy-movie` plugin provides a complete AI-assisted video production pipeline, from creative ideation to final export. Core capabilities include AI-generated storyboards, a multi-track timeline editor (Widget), subtitle generation, and multi-format export.

## Architecture Overview

```mermaid theme={null}
graph LR
    A[Creative Brief] --> B[Script]
    B --> C[Storyboard]
    C --> D[Asset Generation]
    D --> E[Timeline Assembly]
    E --> F[Manual Editing]
    F --> G[Caption/Export]

    subgraph "Agent Tools"
        M["movie(action=...)"]
        T["timeline_edit(action=...)"]
    end

    subgraph "Rendering Surface"
        W["Video Timeline Widget"]
    end

    M --> B
    M --> C
    M --> E
    M --> G
    T --> F
    E --> W
    T --> W
```

## Tools

### `movie` — Main Video Production Tool

Covers the full pipeline from creative to export via the `action` parameter:

| Action       | Description                  | Input             | Output                                   |
| ------------ | ---------------------------- | ----------------- | ---------------------------------------- |
| `brief`      | Generate creative brief      | User description  | Structured creative document             |
| `script`     | Generate script              | Brief/description | Scene-structured script                  |
| `storyboard` | Generate storyboard          | Script            | Shot sequence with visual descriptions   |
| `strategy`   | Generate production strategy | Storyboard        | Model selection, style guidance          |
| `assemble`   | Assemble timeline            | Asset list        | Multi-track timeline JSON + opens Widget |
| `caption`    | Generate subtitles           | Video/audio       | SRT/VTT subtitle file                    |
| `export`     | Export final product         | Timeline state    | Video/asset pack/project file/subtitles  |

**Examples**:

```python theme={null}
# Generate storyboard from description
movie(action="storyboard", input="30-second product ad showcasing three core features of a smartwatch")

# Assemble assets into timeline
movie(action="assemble", clips=["intro.mp4", "feature1.mp4", "feature2.mp4", "outro.mp4"])

# Generate subtitles
movie(action="caption", source="assembled_video.mp4", language="en")

# Export
movie(action="export", format="mp4", quality="1080p")
```

### `timeline_edit` — Programmatic Timeline Editing

The Agent directly manipulates the open timeline with 10 actions covering common editing needs:

| Action             | Description                | Key Parameters                                |
| ------------------ | -------------------------- | --------------------------------------------- |
| `add_clip`         | Add clip to track          | `track`, `asset_id`, `start`, `duration`      |
| `remove_clip`      | Remove clip                | `clip_id`                                     |
| `move_clip`        | Move clip position         | `clip_id`, `track`, `start`                   |
| `trim_clip`        | Trim clip head/tail        | `clip_id`, `trim_start`, `trim_end`           |
| `split`            | Split clip                 | `track`, `clip_id`, `at`                      |
| `add_transition`   | Add transition             | `from_clip`, `to_clip`, `type`, `duration`    |
| `add_text_overlay` | Add text overlay           | `text`, `track`, `start`, `duration`, `style` |
| `adjust_speed`     | Adjust playback speed      | `clip_id`, `speed`                            |
| `set_volume`       | Set volume                 | `clip_id`, `volume`                           |
| `snapshot`         | Get current timeline state | -                                             |

**Examples**:

```python theme={null}
# Add a 5-second clip at track 0, starting at 0s
timeline_edit(action="add_clip", track=0, asset_id="intro_001", start=0, duration=5.0)

# Split clip at 2.5 seconds
timeline_edit(action="split", track=0, clip_id="c1", at=2.5)

# Add crossfade transition
timeline_edit(action="add_transition", from_clip="c1", to_clip="c2", type="crossfade", duration=0.5)

# Add title text overlay
timeline_edit(action="add_text_overlay", text="SmartWatch Pro", track=1, start=0, duration=3.0, style={"fontSize": 48, "position": "center"})

# Get current timeline snapshot
timeline_edit(action="snapshot")
```

## Video Timeline Widget

The timeline Widget is a specialized instance of the Widget rendering surface, providing professional multi-track editing powered by the Twick SDK.

**Core capabilities**:

* Multi-track video/audio/subtitle tracks
* Clip drag, trim, and split
* Transition effect preview
* Keyframe animation
* Real-time playback preview

**Data flow**:

```
Agent (timeline_edit) ←→ JSON-RPC Bridge ←→ Twick SDK (iframe)
                                            ↕
                                        User manual edits
```

Agent's `timeline_edit` operations and user manual edits share the same timeline state. The Agent can retrieve the latest state (including user edits) via `snapshot`.

## Skill Template System

The `profy-movie` plugin includes a Flova-style 7-section video production methodology Skill, along with scenario-specific preset templates.

### 7-Section Methodology

Every video project follows seven standardized phases:

1. **Creative Definition** — Target audience, core message, emotional tone
2. **Script Writing** — Scene structure, dialogue/narration, duration planning
3. **Storyboard Design** — Composition, camera movement, transition annotations
4. **Production Strategy** — Model selection, style consistency, resource budget
5. **Asset Generation** — AI-generated images/video clips
6. **Timeline Arrangement** — Assembly, pacing, music matching
7. **Polish & Export** — Subtitles, color grading, format output

### Preset Templates

#### product-ad

For 15-60 second product showcase videos. Includes:

* Standard structure: Hook → Pain point → Product reveal → Feature demo → CTA
* Recommended model configurations and style parameters
* Camera movement templates (push, orbit, close-up)

#### animated-short

For 1-3 minute narrative animations. Includes:

* Three-act narrative structure
* Character consistency guidance
* Scene transitions and emotional arc
* Music pacing alignment

## Enhanced Storyboard

The storyboard phase supports:

* **Drag-and-drop reordering** — Rearrange scene order
* **Inline editing** — Directly modify shot descriptions, duration, camera movement
* **Annotation system** — Add notes to individual storyboard frames
* **Version tracking** — Maintain edit history with rollback support

## Export Formats

`movie(action="export")` supports multiple output formats:

| Format      | Description                                     | Use Case              |
| ----------- | ----------------------------------------------- | --------------------- |
| `video`     | MP4/WebM video file                             | Final deliverable     |
| `assets`    | All assets bundled (ZIP)                        | Asset archival        |
| `project`   | Project file (JSON timeline + asset references) | Continued editing     |
| `subtitles` | SRT/VTT subtitle file                           | Subtitle distribution |

## User Journey

A typical video production flow:

```
1. User describes video requirements
   → Agent calls movie(action="brief") to generate creative brief

2. Confirm creative direction
   → Agent calls movie(action="script") to generate script
   → Agent calls movie(action="storyboard") to generate storyboard

3. User reviews/edits storyboard (drag to reorder, annotate)

4. Agent calls movie(action="strategy") to determine production strategy
   → AI models generate assets for each scene

5. Agent calls movie(action="assemble") to assemble timeline
   → Video Timeline Widget opens

6. User fine-tunes in Widget (drag, trim, add transitions)
   → Agent can call timeline_edit(action="snapshot") to get user edits

7. Agent calls movie(action="caption") to generate subtitles
   → Agent calls movie(action="export") to export final product
```

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rendering Surfaces" icon="window-maximize" href="/en/documentation/plugins/rendering-surfaces">
    Eight display channels
  </Card>

  <Card title="A2UI" icon="grid-2" href="/en/documentation/plugins/a2ui">
    Declarative interactive UI components
  </Card>
</CardGroup>
