ComfyUI Extension: ComfyUI_VideoCutter
Run ComfyUI workflows without the setup
No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.
Lightweight custom node that trims a native ComfyUI VIDEO object by timestamps or frame numbers.
Looking for a different extension?
Custom Nodes (0)
README
ComfyUI Video Trimmer
ComfyUI Video Trimmer is a lightweight custom node that trims a native ComfyUI VIDEO object by either timestamps or frame numbers.
It is designed to fit directly into standard video workflows:
Load Video -> Video Trimmer -> Save Video
Features
- Accepts native
VIDEOinput from ComfyUI video loader nodes - Outputs native
VIDEOfor downstream save/encode nodes - Supports trimming by time in seconds or by frame range
- Preserves audio alignment when an audio track is present
- Returns useful metadata about the trimmed clip
Installation
- Place this folder inside your ComfyUI
custom_nodesdirectory:
ComfyUI/custom_nodes/ComfyUI_VideoCutter_CodexAPP
-
Restart ComfyUI.
-
Search for the node named
Video Trimmerin theVideo Editingcategory.
Node Overview
Node Name
Video Trimmer
Category
Video Editing
Inputs
videoNative ComfyUIVIDEOinput.trim_modeChoosetimeorframes.start_timeTrim start time in seconds whentrim_mode = time.end_timeTrim end time in seconds whentrim_mode = time. Use0to trim fromstart_timeto the end of the video.start_frameTrim start frame whentrim_mode = frames.end_frameTrim end frame whentrim_mode = frames. Use0to trim fromstart_frameto the end of the video.
Outputs
trimmed_videoNative ComfyUIVIDEOoutput.duration_secondsDuration of the trimmed result.frame_countNumber of frames in the trimmed result.resolved_start_frameActual start frame used after validation.resolved_end_frameActual end frame used after validation.
How To Use
Trim By Time
- Add
Load Video. - Add
Video Trimmer. - Connect the
VIDEOoutput fromLoad VideotoVideo Trimmer. - Set
trim_modetotime. - Enter
start_timeandend_time. - Connect
trimmed_videoto your preferredSave Videonode.
Example:
start_time = 2.50end_time = 7.75
This keeps the section from 2.50 seconds up to 7.75 seconds.
Trim By Frame
- Set
trim_modetoframes. - Enter
start_frameandend_frame. - Use
0forend_frameto keep everything from the start frame to the video end.
Example:
start_frame = 48end_frame = 192
This keeps frames 48 through 191.
Example Workflow
Load Video
-> Video Trimmer
-> Save Video
Recommended setup:
- Use
Load Videoto import a source clip. - Use
Video Trimmerto isolate the section you want. - Use
Save Videoto encode/export the trimmed result.
Notes
- The node trims in memory from the decoded
VIDEOobject supplied by upstream nodes. - Because ComfyUI video workflows often operate on decoded frames, this node focuses on workflow compatibility and frame accuracy.
- Audio is trimmed to stay synchronized with the selected frame range when audio data is available on the incoming
VIDEO.
Error Handling
The node raises clear errors for:
- empty videos
- invalid frame rate metadata
- malformed frame tensors
- start or end positions outside valid bounds
- invalid trim ranges where start is not before end
Developer Notes
Implementation lives in:
/Users/benjaminbertram/ComfyUI/custom_nodes/ComfyUI_VideoCutter_CodexAPP/nodes.py
Registration entry point:
/Users/benjaminbertram/ComfyUI/custom_nodes/ComfyUI_VideoCutter_CodexAPP/__init__.py
Run ComfyUI workflows without the setup
No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.