Load Videos From Folder(LoadVideosFromFolder)
This node relies on the VideoHelperSuite extension to implement video decoding functionality, supporting common video formats.
Load Videos From Folder
The Load Videos From Folder node relies on the VideoHelperSuite extension to implement video decoding functionality and supports common video formats.
The Load Videos From Folder node is a utility node designed for batch loading video files from a specified folder. Its core function is to read videos and convert their frame sequences into image tensors that can be processed by ComfyUI, providing an input source for subsequent image or video processing workflows.
Node Functionality
This node relies on the VideoHelperSuite extension to implement video decoding functionality and supports common video formats. Its internal mechanism decodes video files frame by frame and preprocesses the frame sequence based on user-defined parameters (such as frame skipping and resizing), ultimately outputting a batch containing multiple image frames or a gridded image.
Node Parameter Description - Load Videos From Folder
Parameters
| Parameter Name | Data Type | Required | Default Value | Range/Options | Description |
|---|---|---|---|---|---|
output_type | COMBO | Yes | batch | "batch", "grid" | output_type (Input Parameter): Selects the arrangement method for the output images. "batch" packs frames into a batch, while "grid" arranges multiple frames into a grid image. Valid options are: "batch", "grid". |
video | STRING | Yes | X://insert/path/ | - | video (Input Parameter): Specifies the folder path containing the video files to be loaded. The node will read all video files under this path. |
force_rate | FLOAT | Yes | 0 | 0 - 60 (Step: 1) | force_rate (Input Parameter): Forces the frame rate (FPS) of the output frame sequence. Setting it to 0 uses the video's original frame rate. Valid range is 0-60, with a step of 1. |
custom_width | INT | Yes | 0 | 0 - 4096 | custom_width (Input Parameter): Customizes the width of the output images. Setting it to 0 preserves the video's original width. Valid range is 0-4096. |
custom_height | INT | Yes | 0 | 0 - 4096 | custom_height (Input Parameter): Customizes the height of the output images. Setting it to 0 preserves the video's original height. Valid range is 0-4096. |
frame_load_cap | INT | Yes | 0 | 0 - 10000 (Step: 1) | frame_load_cap (Input Parameter): Limits the maximum number of frames to load; 0 means no limit. Used to control processing load. Valid range is 0-10000, with a step of 1. |
skip_first_frames | INT | Yes | 0 | 0 - 10000 (Step: 1) | skip_first_frames (Input Parameter): Skips a specified number of frames from the beginning of the video before starting to load. Valid range is 0-10000, with a step of 1. |
select_every_nth | INT | Yes | 1 | 1 - 1000 (Step: 1) | select_every_nth (Input Parameter): Interval sampling; only loads every Nth frame. Used to reduce frame rate or speed up processing. Valid range is 1-1000, with a step of 1. |
grid_max_columns | INT | Yes | 4 | 1 - 16 (Step: 1) | grid_max_columns (Input Parameter): When the output type is "grid", sets the maximum number of columns for the grid layout. Valid range is 1-16, with a step of 1. |
add_label | BOOLEAN | Yes | False | - | add_label (Input Parameter): Boolean value that determines whether to add a filename label to the output images. Used to identify different video sources. |
Output
| Parameter Name | Data Type | Description |
|---|---|---|
| IMAGE | IMAGE | IMAGE (Output Parameter): Outputs the loaded and processed video frame sequence in the format of an image tensor. |
Use Cases
This node is highly useful in workflows for creating video style transfers or generating video thumbnail previews. Users can connect it to nodes for image upscaling, filter application, or frame interpolation to batch-process the loaded video frames, thereby efficiently handling entire video clips.
Notes
Please note that the ComfyUI-VideoHelperSuite extension must be installed before using this node. Additionally, when processing high-resolution or very long videos, be mindful of VRAM usage. The data volume can be controlled by setting the frame load cap and frame skipping parameters.
Load Videos From Folder Node Source Code Link
The Load Videos From Folder node is from the ComfyUI-KJNodes node package.
Comments
Sign in with GitHub to join the discussion.