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

# VideoTrim - ComfyUI Built-in Node Documentation

> This node cuts a video to a chosen time window by setting a start time and a duration.

This node cuts a video to a chosen time window by setting a start time and a duration. It also offers a strict mode that raises an error when the requested duration cannot be achieved.

## Inputs

| Parameter         | Description                                                                                                                                                                                                                                          | Data Type   | Required | Range                                                       |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | -------- | ----------------------------------------------------------- |
| `video`           | The video to trim.                                                                                                                                                                                                                                   | VIDEO       | Yes      | —                                                           |
| `trim`            | Trim window using start/end frames. The window is converted into a start time (in seconds from the beginning of the video) and a duration (in seconds). When both the start time and the duration are 0, the video is returned without any trimming. | VIDEO\_EDIT | Yes      | start\_time: >= 0, default 0<br />duration: >= 0, default 0 |
| `strict_duration` | If True, when the specified duration is not possible, an error will be raised. (default: False)                                                                                                                                                      | BOOLEAN     | No       | true<br />false                                             |

Note: The trim duration must be >= 0; negative values raise an error. The requested trim window must fit inside the source video. If the trim cannot be applied, an error is raised that reports the source duration, start time, and target duration.

## Outputs

| Output Name | Description                                                                                                                  | Data Type |
| ----------- | ---------------------------------------------------------------------------------------------------------------------------- | --------- |
| `video`     | The trimmed video. When the trim window is empty (start time and duration both 0), the original video is returned unchanged. | VIDEO     |

> This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! [Edit on GitHub](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/VideoTrim/en.md)

***

**Source fingerprint (SHA-256):** `ba8f8ccbae7e8aebda553810b81ccaa427d45523142bd00746c4e2f4e5b41a1b`
