Nodes/Framerate Converter/Extract Media Info
ComfyUI Node

Extract Media Info

Extract Media Info — turn Probe Video's bundle into scalars you can actually wire up

By LaserDog80·Created 4 months ago·Updated 4 months ago· 0
Extract Media Info
  • media_info
  • source_fps
  • duration
  • frame_count
  • width
  • height
  • has_audio
  • audio_sample_rate
  • video_path

If you've built any ComfyUI graphs past the tutorial level, you know the pattern: one node hands you a nice fat bundle of data, and the next node wants a plain number. That's the entire job of Extract Media Info. It's the unglamorous adapter in the Framerate Converter pack (Trope Tools, TropeMedia) that unpacks a MEDIA_INFO bundle into eight typed scalar outputs so you can wire them into plain FLOAT/INT/STRING/BOOLEAN inputs anywhere in your graph.

It has exactly one required input - media_info, which comes out of the pack's Probe Video node - and no optional inputs. Pure dict access, no FFmpeg, no filesystem, nothing to go wrong. It's about as simple as a ComfyUI node gets, which is exactly why it's worth having.

The outputs

  • source_fps (FLOAT) and duration (FLOAT) - feed straight into Calc Conversion and Calc Audio.
  • frame_count (INT), width (INT), height (INT) - handy for logging or resolution-based logic.
  • has_audio (BOOLEAN) - lets you branch on whether the source even has a soundtrack before deciding how to handle audio.
  • audio_sample_rate (INT) - Calc Audio uses this to compute the right pitch-preserving filter.
  • video_path (STRING) - the original path, so you can pass it around without retyping it.

If a field is missing from the bundle, it returns a zero/false instead of crashing, which keeps a slightly-off source from killing the whole chain.

The typical chain

The full granular conversion pipeline in this pack looks like:

Probe Video → Extract Media Info → Calc Conversion → Calc Audio
                                        ↓                    ↓
                              Build Command ←──────── Gen Output Path
                                        ↓
                                  Run FFmpeg → Verify FPS / Verify Sync

Without Extract Media Info you'd be manually typing source_fps, duration, and the rest into the calc nodes from whatever you saw in a summary. With it, the numbers flow automatically and the chain stays honest - the math nodes see the probed framerate, not the one you remember from the filename.

Install

Nothing special - it ships with the pack. ComfyUI Manager → Trope Tools - Framerate Converter → Install, or git clone https://github.com/LaserDog80/ComfyUI-FramerateConverter into custom_nodes/ and restart. Like the whole pack it's pure Python standard library, no pip installs.

If you only ever use the pack's one-shot Convert Framerate node, you will never meet this one, and that's fine - the composite node runs the same pipeline internally. Extract Media Info earns its keep the moment you want to build your own conversion graph, log a video's properties, or branch on whether a source has audio. It's a utility node with one move, and it doesn't pretend otherwise.

CategoryTrope Tools/Framerate Converter/Inspect

Inputs (1)

NameTypeDefaultDescription
media_infoMEDIA_INFO

Outputs (8)

NameTypeDescription
source_fpsFLOAT
durationFLOAT
frame_countINT
widthINT
heightINT
has_audioBOOLEAN
audio_sample_rateINT
video_pathSTRING