ComfyUI > Nodes > CRT-Nodes > Video Duration Calculator (CRT)

ComfyUI Node: Video Duration Calculator (CRT)

Class Name

Video Duration Calculator

Category
CRT/Utils/Logic & Values
Author
CRT (Account age: 1707days)
Extension
CRT-Nodes
Latest Updated
2026-03-16
Github Stars
0.1K

How to Install CRT-Nodes

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

Video Duration Calculator (CRT) Description

Calculates video duration in seconds using frame count and fps, aiding efficient video editing.

Video Duration Calculator (CRT):

The Video Duration Calculator is a utility node designed to compute the duration of a video in seconds based on the number of frames and the frames per second (fps) rate. This node is particularly useful for AI artists and video creators who need to quickly determine the length of a video clip without manually calculating it. By automating the calculation process, the node helps streamline video editing workflows, ensuring that users can efficiently manage and organize their video content. The primary function of this node is to provide an accurate and rounded duration of a video, which is essential for tasks such as video trimming, synchronization, and planning.

Video Duration Calculator (CRT) Input Parameters:

fps

The fps parameter stands for frames per second, which is a measure of how many individual frames are displayed in one second of video playback. This parameter is crucial as it directly affects the calculation of the video's duration. A higher fps value means more frames are shown per second, resulting in smoother motion in the video. The fps parameter accepts integer values with a default of 30, and it must be at least 1. Adjusting this value will change the perceived smoothness and length of the video when combined with the frame count.

frame_count

The frame_count parameter represents the total number of frames in the video. This parameter is essential for determining the overall length of the video when used in conjunction with the fps value. The frame_count parameter accepts integer values with a default of 300, and it must be at least 1. By specifying the number of frames, you can calculate how long the video will play, which is particularly useful for planning and editing purposes.

Video Duration Calculator (CRT) Output Parameters:

duration_seconds

The duration_seconds output parameter provides the calculated duration of the video in seconds. This value is derived by dividing the total frame count by the frames per second (fps) rate, and it is rounded to two decimal places for precision. The duration_seconds output is crucial for understanding the exact length of the video, which can aid in tasks such as video editing, synchronization with audio, and ensuring that the video meets specific duration requirements.

Video Duration Calculator (CRT) Usage Tips:

  • Ensure that the fps value accurately reflects the frame rate of your video to get a precise duration calculation.
  • Use the frame_count parameter to input the exact number of frames in your video for an accurate duration output.
  • Consider rounding the fps and frame_count values to the nearest whole number to avoid potential calculation errors.

Video Duration Calculator (CRT) Common Errors and Solutions:

Video too short: need at least 16 frames for Moonvalley

  • Explanation: This error occurs when the calculated number of frames is less than 16, which is the minimum required for certain processing tasks.
  • Solution: Increase the frame_count or adjust the fps to ensure that the total number of frames meets the minimum requirement of 16.

Could not determine duration for file

  • Explanation: This error indicates that the node was unable to calculate the duration of the video file, possibly due to an unsupported format or missing data.
  • Solution: Verify that the video file is in a supported format and contains the necessary metadata for duration calculation. Consider re-encoding the video if necessary.

Video Duration Calculator (CRT) Related Nodes

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

Video Duration Calculator (CRT)