# Cut a long video into clips

> Rank the moments in a webinar, podcast, or long ad, cut each into its own vertical clip, caption it, and schedule the set.

Source: https://advibly.com/docs/use-cases/clip-a-long-video



One recording, ten posts. The analyser finds the moments worth cutting, and
`advibly_render_composition` does the cutting with per-scene trims.

The whole read side is free. You pay 0.4 credits per clip cut, plus captions.

## Rank the moments [#rank-the-moments]

```
advibly_analyze_video {
  video_url: "https://www.youtube.com/watch?v=...",
  format: "moments",
  question: "Find the strongest standalone clips for vertical social - a claim, a story, or a contrarian take that needs no setup.",
  context: "Ranking the highlights of the user's long recording so the strongest standalone moments can be cut into social clips."
}
  → analysis_id, moments[]: start, end, why
```

`moments` is the format built for exactly this: ranked highlights for clipping
and re-hooking. The `question` steers what counts as strong.

| Source       | Limit                                   |
| ------------ | --------------------------------------- |
| YouTube URL  | Passed straight through, no size limit. |
| `gs://` URI  | Passed straight through.                |
| Direct https | Up to 18 MB.                            |
| Generation   | `generation_id` instead of `video_url`. |

A two-hour webinar is fine. The analyser reads the transcript, then zooms into
the frames that matter rather than sampling the whole file.

Ask follow-ups with `follow_up_of: analysis_id` and a `question`. The video is
already in that analysis's context, which makes every extra question far
cheaper than a second full pass.

## Verify the cut points before spending [#verify-the-cut-points-before-spending]

Timestamps are the model's estimate, and a clip that starts mid-word is a
wasted render. Confirm the boundaries of each moment you intend to cut:

```
advibly_analyze_video {
  follow_up_of: analysis_id,
  question: "For the moment at 18:42, give the exact second the speaker starts that sentence and the exact second they finish it.",
  thinking: "high",
  context: "Confirming exact sentence boundaries for a chosen highlight so the cut clip starts and ends cleanly."
}
```

`thinking: "high"` is worth it for counting and exact-timestamp questions.

## Open a project [#open-a-project]

```
advibly_create_project {
  brand_id,
  name: "Q3 webinar clips",
  context: "Grouping every clip cut from the user's long recording into one project in their library."
}
  → project_id
```

Ten clips and ten captioned versions is twenty files. One tile is better.

## Cut each moment [#cut-each-moment]

One render per clip, one scene, trimmed:

```
advibly_render_composition {
  brand_id,
  project_id,
  scenes: [
    {
      source: "https://.../webinar.mp4",
      trim_start_seconds: 1122.0,
      trim_end_seconds: 1166.5
    }
  ],
  texts: [
    { content: "The part nobody tells you", start_seconds: 0, duration_seconds: 2.5, position: "top", size: "lg" }
  ],
  context: "Cutting the confirmed highlight out of the long recording as a standalone social clip with its hook card."
}
```

Flat 0.4 credits, one to three minutes. `source` is a generation id or a
direct https video URL.

<Callout type="warn">
  Every scene is **scaled to fill the canvas**. A 16:9 recording cut for a
  vertical feed gets cropped to the centre, so a speaker sitting off to one side
  can end up half out of frame. Cut one clip first and look at it before running
  the other nine.
</Callout>

The result is saved as a new video generation and as an editable composition.
Hand the user its `edit_url` when the framing needs a human eye.

## Caption every clip [#caption-every-clip]

```
advibly_add_subtitles {
  brand_id,
  project_id,
  video: clipGenerationId,
  preset: "glide",
  context: "Burning captions into the cut clip so it reads with sound off in a social feed."
}
```

Billed per started minute, minimum one minute, so a 40-second clip and a
55-second clip cost the same. Dynamic presets are 0.4 credits/min and
animated, basic presets 0.2 and static; the
[style sheet](https://cdn-public.advibly.com/website-assets/subtitle-captions/style-sheet.webp)
shows all of them.

Add `translation_language` to caption in a different language than the audio
(+0.4 credits/min), and `vocabulary` for names the transcriber mishears.

## Stitch, when the ask is a compilation [#stitch-when-the-ask-is-a-compilation]

```
advibly_stitch_videos {
  brand_id,
  project_id,
  clips: [clip1, clip2, clip3],
  context: "Joining the selected clips into one compilation reel in the order the user approved."
}
```

Free, 2 to 12 clips, hard cuts in the order given. The output takes the
**first** clip's aspect ratio and mismatched clips get letterboxed, so put a
correctly-shaped clip first.

## Next [#next]

* Send the set out: [Schedule a week of posts](/use-cases/schedule-a-campaign).
* Read the source as an ad instead of a recording:
  [Recreate an ad you like](/use-cases/recreate-an-ad).
