Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI-CustomNodeKit > 视频帧数统计

ComfyUI Node: 视频帧数统计

Class Name

VideoFrameCounter

Category
video
Author
user2318 (Account age: 2574days)
Extension
ComfyUI-CustomNodeKit
Latest Updated
2026-07-16
Github Stars
0.05K

How to Install ComfyUI-CustomNodeKit

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

视频帧数统计 Description

Calculate total frame count and frame rate of video files for AI artists and video editors, simplifying data retrieval.

视频帧数统计:

The VideoFrameCounter node is designed to provide essential information about a video file by calculating its total frame count and determining the frame rate. This node is particularly useful for AI artists and video editors who need to understand the structure of a video for further processing or analysis. By leveraging this node, you can easily obtain the number of frames in a video and the effective frame rate, which can be crucial for tasks such as video editing, animation, or any application where precise timing and synchronization are required. The node simplifies the process by automatically using the video's original frame rate if no specific frame rate is provided, ensuring that you get accurate and relevant data without needing extensive technical knowledge.

视频帧数统计 Input Parameters:

video_path

The video_path parameter is a string that specifies the path to the video file you wish to analyze. This parameter is crucial as it directs the node to the correct file location from which to extract frame information. The default value is an empty string, and it does not support multiline input. Providing an accurate path is essential for the node to function correctly, as an incorrect path will result in an error.

fps

The fps parameter is a float that determines the target frame rate for the video analysis. If set to 0, the node will automatically use the video's original frame rate, which is useful if you want to maintain the video's native timing. The parameter accepts values ranging from 0 to 120.0, with a default of 0, allowing for precise control over the frame rate used in calculations. This flexibility is beneficial for scenarios where you need to adjust the frame rate for specific requirements or constraints.

视频帧数统计 Output Parameters:

frames

The frames output is an integer representing the total number of frames in the video. This information is vital for understanding the video's length and structure, enabling you to plan edits or synchronize other media elements accurately. Knowing the frame count can also help in tasks such as creating animations or ensuring that video segments align correctly in a timeline.

fps

The fps output is a float that indicates the effective frame rate used in the analysis. This value is either the original frame rate of the video or the user-specified frame rate, depending on the input provided. Understanding the frame rate is crucial for maintaining the video's timing and ensuring that any modifications or analyses are consistent with the original media.

视频帧数统计 Usage Tips:

  • Ensure that the video_path is correctly specified to avoid errors related to file access. Double-check the path for typos or incorrect directory structures.
  • Use the fps parameter to control the frame rate for specific applications, such as when you need to match the frame rate of other media elements or adhere to platform-specific requirements.

视频帧数统计 Common Errors and Solutions:

ValueError: Could not determine frame count for file

  • Explanation: This error occurs when the node is unable to access the video file or the file does not contain any frames within the specified time range.
  • Solution: Verify that the video_path is correct and that the video file is not corrupted. Ensure that the file contains valid video data.

RuntimeError: 无法执行 ffmpeg

  • Explanation: This error indicates that the node encountered an issue executing the ffmpeg command, which is used for video processing.
  • Solution: Check that ffmpeg is installed and accessible from your system's PATH. Ensure that the video file is not corrupted and that the video_path is correct.

视频帧数统计 Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-CustomNodeKit
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.