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

# VideoTrim - ComfyUI Built-in Node Documentation

> 此节点通过设置起始时间和时长，将视频剪切到选定的时间窗口。

此节点通过设置起始时间和时长，将视频剪切到选定的时间窗口。它还提供严格模式，当无法达到请求的时长时会引发错误。

## 输入

| 参数                | 描述                                                                        | 数据类型        | 必需 | 范围                                                          |
| ----------------- | ------------------------------------------------------------------------- | ----------- | -- | ----------------------------------------------------------- |
| `video`           | 要修剪的视频。                                                                   | VIDEO       | 是  | —                                                           |
| `trim`            | 使用起始/结束帧修剪窗口。该窗口会被转换为起始时间（从视频开始算起的秒数）和时长（秒）。当起始时间和时长均为 0 时，视频将不做任何修剪直接返回。 | VIDEO\_EDIT | 是  | start\_time: >= 0, default 0<br />duration: >= 0, default 0 |
| `strict_duration` | 如果为 True，当无法满足指定时长时，将引发错误。（默认：False）                                      | BOOLEAN     | 否  | true<br />false                                             |

注意：修剪时长必须 >= 0；负值会引发错误。请求的修剪窗口必须完全位于源视频内。如果无法应用修剪，将引发错误，并报告源视频时长、起始时间和目标时长。

## 输出

| 输出名称    | 描述                                      | 数据类型  |
| ------- | --------------------------------------- | ----- |
| `video` | 修剪后的视频。当修剪窗口为空（起始时间和时长均为 0）时，将原样返回原始视频。 | VIDEO |

> 本文档由 AI 生成。如果您发现任何错误或有改进建议，欢迎贡献！ [在 GitHub 上编辑](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/VideoTrim/zh.md)

***

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