Nodes/ComfyUI-Video-Edit/Video Get Frame Rate
ComfyUI Node

Video Get Frame Rate

The frame rate reader that doesn't decode a single frame

By guchendesigndog·Created 4 months ago·Updated 4 months ago· 6
Video Get Frame Rate
  • video
  • frame_rate

VideoGetFrameRate is one of those small utility nodes you don't appreciate until you need it: it reads the frame rate of a video and hands it to you as an INT. That's the whole job. No decoding, no pixel work, nothing clever - it pulls the number straight from the file's metadata, so it's effectively free.

In the ComfyUI-Video-Edit pack, this is a pure helper. Its real value is keeping your graph's numbers correct instead of hardcoded. Video generation and interpolation nodes care a lot about fps - save a video at the wrong frame rate and a clip that looked fine in the graph plays back too fast, too slow, or with judder.

How to use it

One input, one output:

  • video (VIDEO) - feed it from Video Load Preview, same as the rest of this pack.
  • Output: frame_rate (INT) - the video's frames per second, rounded to a whole number.

Wire that frame_rate output into anything with an fps/frame_rate input - a Video Save node, an interpolation setup, a workflow that generates a matching clip. The honest use case: you loaded a source clip that's 30fps but you're generating a 24fps insert for it, and you want the numbers visible in the graph instead of memorized.

Gotchas

  • It's an integer, so fractional rates get rounded. A 29.97fps file reads as 30. For casual editing workflows that's usually fine - for frame-accurate work with interlaced or drop-frame sources, be aware you're getting the rounded value.
  • It reads what the file claims, not what's actually true. A lazily muxed or badly re-encoded file can report a wrong rate. If a video plays at the wrong speed after you use this, blame the source, not the node.
  • It's a metadata read. If your video came from a node that only exists as an in-memory tensor (like ImageToVideo from this same pack), it still works - it just reports the rate that node was given.

Install

The pack installs the standard way:

cd ComfyUI/custom_nodes/
git clone https://github.com/guchendesigndog/comfyui-video-edit.git
pip install -r comfyui-video-edit/requirements.txt

Or search "ComfyUI-Video-Edit" in ComfyUI Manager and restart. The one dependency is PyAV (av>=10.0.0), which needs FFmpeg installed. It's a tiny pack by a solo author (谷尘 / guchendesigndog on GitHub), MIT-licensed, no community drama to speak of - read the source if you're curious; the whole file is a single readable Python module. If you're building the kind of workflow where this node is useful, its sibling VideoGetTotalFrames probably belongs next to it.

CategoryVideoEdit

Inputs (1)

NameTypeDefaultDescription
videoVIDEO

Outputs (1)

NameTypeDescription
frame_rateINT