ComfyUI Node
TS Video Loader
Load a video: frames, audio and a compact video_info bundle. Trim the clip visually on the timeline inside the node, resample the frame rate and resize while decoding.
TS Video Loader
- images
- audio
- video_info
- video
◄source_path►
◄start_seconds0.000►
◄end_seconds-1.000►
◄frame_rate0.000►
◄max_frames0►
◄longer_side0►
◄shorter_side0►
◄divisible_by1►
◄frame_step1►
◄resize_filterarea►
◄when_too_largestop►
CategoryTS/Video
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| source_path | STRING | Video file. Pick or drop one in the node's own interface; a path to a file on the ComfyUI machine works too. | |
| start_seconds | FLOAT | 0.0000–1000000 | Start of the clip. Drag the left handle on the timeline. |
| end_seconds | FLOAT | -1.000-1–1000000 | End of the clip. -1 means "until the end of the file". Drag the right handle on the timeline. |
| frame_rate | FLOAT | 0.0000–240 | Output frame rate. 0 keeps the source rate. Fractional rates such as 23.976 are allowed. |
| max_frames | INT | 00–1000000 | Hard cap on the number of loaded frames. 0 means no cap. It trims the tail of whatever the timeline selected, after the frame rate and the frame step have been applied — the node's status line always shows how many frames actually come out. |
| longer_side | INT | 00–16384 | Length of the longer side of the frame. 0 derives it from the shorter side, keeping the aspect ratio. Works the same on landscape and portrait footage. Resizing happens inside the decoder, not afterwards. |
| shorter_side | INT | 00–16384 | Length of the shorter side. 0 derives it from the longer one. |
| divisible_by | INT | 11–64 | Round the output size down to a multiple of this value. Video models usually want 8, 16 or 32. |
| frame_step | INT | 11–1000 | Keep every Nth frame after the frame-rate stage. 1 keeps them all. |
| resize_filter | COMBO | area | Scaling filter. area suits strong downscaling, lanczos keeps edges sharp, neighbor is for pixel art. |
| when_too_largeopt | COMBO | stop | What to do when the frames will not fit in RAM. The ceiling is 60% of the machine's memory (at least 8 GB), or whatever TS_VIDEO_MAX_BYTES says. • stop (default) — refuse with a message naming the size, so nothing quietly starts paging. • use disk — put the frames in a memory-mapped file in the ComfyUI temp folder. What comes out is an ordinary IMAGE tensor, and the allocation cannot fail outright however big the clip is. Be honest about the cost: decoding writes every frame once, so memory still climbs towards the full size while it runs (measured: a 31.9 GB clip took 92 s on disk against 51 s in RAM). What you gain is that those pages are backed by a real file, so the system can drop them instead of failing, and downstream only the frames a node touches are read back. Make sure the temp drive has room; the file goes away when the run releases the tensor, and leftovers are swept on the next decode. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | Decoded frames [B,H,W,C], float32 in 0..1. |
| audio | AUDIO | Audio for the same time range. Nothing at all when the file has no audio track — silence would quietly overwrite a real track further down the graph. |
| video_info | TS_VIDEO_INFO | Metadata bundle. Feed it into TS Video Info to get the numbers. |
| video | VIDEO | The trimmed source file itself, without resizing or frame-rate change. A cheap reference for nodes that take VIDEO. |