ComfyUI > Nodes > DJZ-Nodes > Load Video Batch Frame

ComfyUI Node: Load Video Batch Frame

Class Name

LoadVideoBatchFrame

Category
image/video
Author
DriftJohnson (Account age: 4052days)
Extension
DJZ-Nodes
Latest Updated
2025-04-25
Github Stars
0.04K

How to Install DJZ-Nodes

Install this extension via the ComfyUI Manager by searching for DJZ-Nodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter DJZ-Nodes in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Load Video Batch Frame Description

Facilitates loading and processing video frames from batch files for AI artists, enabling frame extraction and tensor conversion.

Load Video Batch Frame:

The LoadVideoBatchFrame node is designed to facilitate the loading and processing of video frames from a batch of video files. This node is particularly useful for AI artists who need to work with video data in a structured and efficient manner. It allows you to extract specific frames from videos based on various modes of operation, such as loading a single video frame, incrementally loading frames, or randomly selecting frames from a batch. By converting video frames into a tensor format, this node enables seamless integration with machine learning models and other processing pipelines. The node's ability to handle different video formats and its flexibility in frame selection make it a powerful tool for video analysis and creative projects.

Load Video Batch Frame Input Parameters:

mode

The mode parameter determines the method of frame selection from the video batch. It offers three options: single_video, incremental_video, and random. In single_video mode, a specific frame from a specified video is loaded. The incremental_video mode allows for sequential loading of frames, which is useful for processing videos in a continuous manner. The random mode selects frames randomly, providing a way to introduce variability in frame selection. This parameter is crucial for defining how frames are accessed and can significantly impact the workflow depending on the chosen mode.

seed

The seed parameter is an integer that sets the seed for random number generation when the random mode is selected. This ensures that the random selection of frames is reproducible, allowing for consistent results across different runs. The default value is 0, and it can range from 0 to 0xffffffffffffffff. By setting this parameter, you can control the randomness in frame selection, which is particularly useful for experiments requiring repeatability.

index

The index parameter specifies the index of the video from which frames are to be loaded. It is an integer value with a default of 0, and it can range from 0 to 150,000. This parameter is essential when you want to target a specific video within a batch, especially in single_video and incremental_video modes. Adjusting this index allows you to navigate through the video batch and select the desired video for frame extraction.

frame

The frame parameter indicates the specific frame number to be loaded from the selected video. It is an integer with a default value of 0, and it can range from 0 to 999,999. This parameter is critical for pinpointing the exact frame you wish to extract, providing precise control over the frame selection process. It is particularly useful when you need to analyze or process a specific moment within a video.

label

The label parameter is a string that allows you to assign a custom label to the video batch being processed. The default value is Video Batch 001, and it is not multiline. This parameter is useful for organizing and identifying different batches of video data, especially when working with multiple datasets. By labeling your video batches, you can maintain better organization and clarity in your projects.

path

The path parameter is a string that specifies the directory path where the video files are located. It is a required parameter and is not multiline. This parameter is fundamental as it directs the node to the location of the video files, enabling the loading and processing of video frames. Ensuring the correct path is provided is crucial for the successful execution of the node.

pattern

The pattern parameter is a string that defines the file pattern to match video files within the specified directory. The default value is *, which matches all files. This parameter allows you to filter and select specific video files based on their naming patterns, providing flexibility in handling different sets of video data. By using patterns, you can streamline the video selection process and focus on the files relevant to your task.

Load Video Batch Frame Output Parameters:

frame

The frame output parameter is an image tensor representing the loaded video frame. This tensor is formatted to be compatible with machine learning models and other processing tools, making it a versatile output for various applications. The frame tensor is normalized and converted to a format that facilitates further analysis or creative manipulation, serving as a crucial component in video processing workflows.

filename_text

The filename_text output parameter is a string that contains the filename of the video from which the frame was extracted. This output provides context and traceability, allowing you to identify the source of the frame. It is particularly useful for documentation and debugging purposes, as it helps track the origin of the processed data.

Load Video Batch Frame Usage Tips:

  • Ensure the path parameter is correctly set to the directory containing your video files to avoid errors related to file access.
  • Use the mode parameter to tailor the frame selection process to your specific needs, whether you require sequential, random, or specific frame extraction.
  • Set the seed parameter when using the random mode to ensure reproducibility of your results, which is important for consistent experimentation.

Load Video Batch Frame Common Errors and Solutions:

Path does not exist: <path>

  • Explanation: This error occurs when the specified directory path does not exist or is incorrect.
  • Solution: Verify that the path parameter is set to the correct directory containing your video files and that the path is accessible.

No valid video frame found for index <index> and frame <frame>

  • Explanation: This error indicates that the specified video index or frame number is out of range or invalid.
  • Solution: Check that the index and frame parameters are within the valid range for your video files and adjust them accordingly.

No valid video frame found

  • Explanation: This error can occur in incremental_video or random modes when no valid frame is available for extraction.
  • Solution: Ensure that the video files contain enough frames and that the parameters are set correctly to access them. Adjust the index or frame parameters if necessary.

Load Video Batch Frame Related Nodes

Go back to the extension to check out more related nodes.
DJZ-Nodes
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.