ComfyUI > Nodes > ComfyUI-UniversalToolkit > Extract Video Frames (UTK)

ComfyUI Node: Extract Video Frames (UTK)

Class Name

Extract_Video_Frames_UTK

Category
UniversalToolkit/Tools
Author
whmc76 (Account age: 1110days)
Extension
ComfyUI-UniversalToolkit
Latest Updated
2026-03-16
Github Stars
0.07K

How to Install ComfyUI-UniversalToolkit

Install this extension via the ComfyUI Manager by searching for ComfyUI-UniversalToolkit
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-UniversalToolkit 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

Extract Video Frames (UTK) Description

Extracts frames from videos or image sequences based on target count and extraction mode.

Extract Video Frames (UTK):

The Extract_Video_Frames_UTK node is designed to intelligently extract frames from video files or image sequences, providing a flexible and efficient way to sample frames based on a specified target frame count and extraction mode. This node is particularly useful for AI artists who need to work with video content, as it allows for the selection of frames that are evenly distributed or concentrated in specific parts of the video, such as the beginning, middle, or end. By offering multiple extraction modes, the node enables users to tailor the frame extraction process to their specific needs, ensuring that the most relevant frames are captured for further processing or analysis. The node's ability to handle both video files and image sequences adds to its versatility, making it a valuable tool for a wide range of creative and technical applications.

Extract Video Frames (UTK) Input Parameters:

video_path

The video_path parameter specifies the path to the video file from which frames will be extracted. It supports various video formats such as mp4, avi, and mov. This parameter is crucial as it determines the source of the video content. If a valid video path is not provided, the node will not be able to extract frames from a video file. The default value is an empty string, indicating that no video path is set initially.

target_frames

The target_frames parameter defines the number of frames you wish to extract from the video or image sequence. This parameter directly impacts the number of frames that will be processed and returned by the node. The minimum value is 1, the maximum is 1000, and the default is set to 8. Adjusting this parameter allows you to control the granularity of the frame extraction process.

mode

The mode parameter determines the frame extraction strategy, offering several options: average, front_heavy, back_heavy, middle_heavy, and ends_heavy. Each mode specifies a different distribution pattern for the extracted frames. For example, average mode extracts frames evenly across the entire video, while front_heavy mode focuses more on the beginning of the video. The default mode is average, providing a balanced extraction across the video.

images

The images parameter is an optional input that allows you to provide an image sequence instead of a video file. If this parameter is used, the node will prioritize the image sequence over the video path for frame extraction. This flexibility is beneficial when working with pre-extracted image sequences. The parameter does not have a default value, as it is optional and only used when necessary.

Extract Video Frames (UTK) Output Parameters:

images

The images output parameter returns the extracted frames as a batch tensor. This tensor contains the frames in the order specified by the extraction mode and target frame count. The output is crucial for further processing, as it provides the visual data needed for analysis or creative projects. The shape of the tensor reflects the number of frames and their dimensions, offering a structured format for easy manipulation.

frames_count

The frames_count output parameter indicates the total number of frames successfully extracted and returned in the images tensor. This count is essential for verifying that the desired number of frames has been extracted and for understanding the scope of the data available for further use. It provides a simple numeric value that confirms the node's operation and the extent of the extracted data.

Extract Video Frames (UTK) Usage Tips:

  • Ensure that the video_path is correctly specified and points to a valid video file to avoid errors during frame extraction.
  • Experiment with different mode settings to achieve the desired distribution of frames, especially if you are interested in specific parts of the video.
  • Use the images parameter to work with pre-existing image sequences, which can be useful for projects that require specific frame selections.

Extract Video Frames (UTK) Common Errors and Solutions:

必须提供视频路径或图片序列输入

  • Explanation: This error occurs when neither a video path nor an image sequence is provided as input.
  • Solution: Ensure that you specify either a valid video_path or provide an images sequence to enable frame extraction.

未能加载任何帧

  • Explanation: This error indicates that no frames were successfully loaded from the specified video or image sequence.
  • Solution: Check the video_path or images input to ensure they are correct and accessible. Verify that the video file is not corrupted and that the image sequence is properly formatted.

Extract Video Frames (UTK) Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-UniversalToolkit
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 Models, enabling artists to harness the latest AI tools to create incredible art.

Extract Video Frames (UTK)