# Trim Video

> Cut a video by start and end time, trim seconds or frames from its edges, keep its first or last seconds, or cut at the cleanest loop point with Smart loop cut.

Source: https://nodaro.ai/docs/nodes/video/trim-video

The **Trim Video** node cuts a section out of a video without regenerating it. You choose one of six trim modes: an exact start and end time, a trim from the edges in seconds or in frames, the first or last few seconds, or a smart cut at the frame that loops best. The output is one shorter clip, with or without its sound.

- Found in: Video › Cut & Assemble
- Output: video
- API type: `trim-video`

## When to use it
- Extract one scene from a longer video.
- Remove an unwanted intro or outro from a generated clip.
- Cut a clip to the exact duration you need.
- Drop the tail dissolve of a VEO 3.1 clip precisely, with frames mode or **Smart loop cut**.
- Take the last few seconds of any clip for an outro.
- Choose the best part of each clip before you join them with [Combine Videos](https://nodaro.ai/docs/nodes/video/combine-videos).

## Quick start
### Add the node

Press Tab on the canvas and choose **Video › Cut & Assemble › Trim Video**.

### Connect the video

Wire the clip into the **Video** input.

### Choose the trim mode

Open the settings panel and choose a **Trim Mode**. For example, choose **Range — start/end (seconds)** and set **Start Time (s)** to 2 and **End Time (s)** to 7 to keep seconds 2 to 7.

### Run it

Click **Run** on the node. The trimmed clip appears on the node.

Workflow: Each generated shot is trimmed to its best part, then Combine Videos joins the two trimmed clips.

- Generate Video → Trim Video (video)
- Generate Video → Trim Video (video)
- Trim Video → Combine Videos (video)
- Trim Video → Combine Videos (video)

## Inputs
| Input | Accepts | What it does |
| --- | --- | --- |
| **Video** | Video nodes, such as Generate Video, Upload Video and Combine Videos | The clip to trim. Required. |

The output, **Video**, is one trimmed clip. It keeps the source audio unless **Output Silent Video** is on.

## The six trim modes

| Trim mode | What the output keeps | Settings |
| --- | --- | --- |
| **Range — start/end (seconds)** (the default) | The part between two exact times. Decimals work, for example `2.5`. | **Start Time (s)**, default 0, and **End Time (s)** |
| **Trim edges (seconds)** | The clip without a number of seconds at its start, its end or both | **Trim from start (s)** and **Trim from end (s)**, both 0 by default |
| **Keep first N seconds** | The first N seconds of the source, or the whole source if it is shorter | **Keep first (s)** |
| **Keep last N seconds** | The last N seconds of the source, whatever its length | **Keep last (s)** |
| **Trim edges (frames)** | The clip without a number of frames at its start, its end or both | **Trim from start (frames)** and **Trim from end (frames)**, both 0 by default |
| **Smart loop cut** | The clip up to the trailing frame that looks most like the first frame | **Lookback window (frames)**, from 2 to 64, default 16 |

The modes that depend on the length of the source measure it when the node runs. They work on a clip of any length, so you do not need to know the length in advance. Frames mode also reads the source's frame rate. If the frame rate cannot be read, the run fails with an error instead of cutting at the wrong frame.

## Other settings

| Setting | What it does |
| --- | --- |
| **Lossless (snap to keyframe)** | Off by default. Copies the video without re-encoding, which is faster and loses no quality. The start moves back to the nearest keyframe, so the clip can begin up to a few seconds earlier than you asked, never later. Sources that cannot be copied fall back to a precise re-encode. **Smart loop cut** ignores this setting. |
| **Output Silent Video** | Off by default. Removes the audio from the trimmed clip. |

## Smart loop cut

**Smart loop cut** compares the last frames of the clip with its first frame, pixel by pixel, and cuts at the trailing frame that looks most like frame 0. The **Lookback window (frames)** sets how many trailing frames it checks.

A fixed offset works when the ideal cut is always in the same place. Smart loop cut is better when the ideal cut varies from run to run. For example, a VEO 3.1 clip made from a first and a last frame ends with a dissolve that is not always exactly 8 frames long. From the API, the job result reports the chosen frame and its similarity score, which helps you judge the seam.

## Credits
Trim Video is priced by the length of the clip it outputs, in steps of 5 seconds, with a minimum of one step:

- **Range** mode counts the time between **Start Time** and **End Time**.
- **Trim edges** modes count what is left after the trims. For the estimate, frames mode assumes 24 frames per second.
- **Keep first** and **Keep last** count the kept seconds, or the whole source when it is shorter.
- **Smart loop cut** counts the whole source, plus a small amount for every 24 frames of lookback.

The **Run** button shows the exact estimate for your settings. When the upstream clip has not been generated yet, the estimate assumes an 8-second clip.

## Tips
- **Shorten only the end.** In Range mode, leave **Start Time (s)** at 0 and set **End Time (s)**.
- **Trim relative to the end.** **Trim edges (seconds)** removes the same amount from any clip, whatever its length.
- **Cap a clip's length.** **Keep first N seconds** makes sure a clip is never longer than you need.
- **Trim exact frames.** Use frames mode when frame alignment matters, for example to drop the last 8 frames of a 24 fps VEO clip.
- **Trim audio instead.** To cut only the sound, or to take the audio out of a video, use [Trim Audio](https://nodaro.ai/docs/nodes/audio/trim-audio).

## Frequently asked questions

### How do I cut the last few seconds off a video?

Set Trim Mode to Trim edges (seconds) and enter the number of seconds in Trim from end. The node measures the source when it runs, so this works on a clip of any length.

### Does Trim Video reduce the quality of my clip?

By default, Trim Video re-encodes the cut so it starts exactly where you asked. Turn on Lossless (snap to keyframe) to copy the video without re-encoding. The start then moves back to the nearest keyframe.

### How do I make a clip loop without a visible jump?

Use the Smart loop cut mode. It finds the last frame that looks most like the first frame and cuts there. To repeat the clip as well, use Loop Video with Smart cut before looping.

### Can I remove the sound while trimming?

Yes. Turn on Output Silent Video, and the trimmed clip has no audio.

### How much does Trim Video cost?

The price follows the length of the clip it outputs, in steps of 5 seconds. The Run button shows the exact estimate for your settings before you run.
