# Export and hand off a project

The delivery helper creates a new folder containing the final MP4, SRT/VTT captions, a cover image, editable project source, asset-rights records and a versioned checksum manifest. It does not publish, contact a client or transfer rights to third-party material.

Run from the toolkit folder after rendering your project:

```sh
node scripts/export-project.cjs projects/my-explainer --format portrait --video outputs/portrait.mp4 --out deliveries/my-explainer-portrait
```

Use the actual video path printed by your rendering workflow. `--video` is relative to the project folder. The new delivery folder must be outside that source project and must not already exist. To keep reviewed caption files, supply both `--srt` and `--vtt` as project-relative paths. With neither option, captions are generated from the selected plan's authored cues, or from `project.captionFiles` when burned-in captions were hidden.

```sh
node scripts/export-project.cjs projects/my-explainer --format landscape --video outputs/landscape.mp4 --srt outputs/landscape.srt --vtt outputs/landscape.vtt --out deliveries/my-explainer-landscape
```

For a custom cover, first create a reviewed PNG, JPEG or WebP inside the project with the same aspect ratio as the video, then add `--cover` with its project-relative path. The render command does not create that custom file. Without `--cover`, the helper extracts an actual video frame near the beginning. It does not invent a promotional thumbnail or select the best expression automatically.

## What the helper verifies

- The MP4 has a video stream, the requested aspect ratio and a duration matching the authored plan within 0.2 seconds. FFmpeg decodes it before packaging.
- Caption timestamps are ordered and inside the delivered video. SRT and VTT have matching cue text and timing. Spoken-word accuracy and meaningful timing still need your review.
- Input paths remain inside the project; symlinks and unlisted editable source files are rejected. Only the explicitly listed source files enter the editable-source folder.
- Every media input has a rights entry. Delivery stops when an entry is `unconfirmed` or `not-permitted`.
- Files copied into the handoff have byte counts and SHA-256 hashes recorded in `DELIVERY.json`; the command reads them back to verify those hashes.

The rights status is the project author's declaration. A generated manifest cannot establish ownership, consent or licensing permission. Keep the relevant source notices and permission records with your own project documentation.

## Review before sharing

1. Play the entire final MP4 with sound. Check the first and last words, speech continuity, sound levels and any edits around pauses.
2. Check captions against the actual speech. Look at the beginning, middle and end as well as every edited phrase. Read text at phone size and inspect both formats separately.
3. Check image crops, logos, visible hands/props and optional masks. A technical validation pass cannot judge whether a useful detail was cut off.
4. Confirm the cover represents this video, the title/claims are accurate, and placeholder names or numbers are gone.
5. Open the delivery folder. Confirm `video.mp4`, `captions.srt`, `captions.vtt`, `cover.png`, `ASSET-RIGHTS.json`, `DELIVERY.json` and `source/project.json` are present. Keep the original source separately.

The editable source requires the toolkit version recorded in the manifest. Runtime binaries, model weights, toolkit dependencies and unrelated kit assets are not copied into each handoff. If you give the editable project to another person, check the toolkit license and their access separately; owning a rendered video does not by itself grant a copy of every production tool.

## Rights manifest format

Each media file listed in `project.sourceFiles` has an entry in the file named by `project.rights`:

```json
{
  "version": 1,
  "assets": [
    {
      "path": "assets/narration.wav",
      "license": "Describe the actual permission",
      "source": "Describe where this file came from",
      "redistribution": "unconfirmed"
    }
  ]
}
```

Allowed statuses are `permitted`, `unconfirmed` and `not-permitted`. Change a status only after checking the actual permission. External demo footage, private voice profiles and restricted purchased tools are not supplied by this workflow.

Selecting a final file and assembling a handoff are separate from uploading it, publishing selectable captions, scheduling it or making a video public. Verify those destination states separately if you later perform them.
