π Probe Media
Ask any media file what it actually is β before you commit to encoding it
- frames
- audio
- duration_sec
- width
- height
- fps
- video_codec
- audio_codec
MF_ProbeMedia is an ffprobe wrapper that hands you a video's facts as typed outputs: duration, width, height, fps, and which codecs it actually uses. Pure read, no encode, no decode-to-tensor - it just reads the container metadata and reports. If you've ever loaded an unfamiliar clip and wondered "what the hell is this actually?" before building a workflow around it, this is the node that answers.
The honest use-it-or-not framing: MediaForge's own encode nodes probe internally (Compose's target_*=0 inherits from the source on its own), so you often don't need this node. Its real jobs are (1) inspecting an unknown file before deciding how to process it, and (2) feeding dimensions/fps into other nodes' widgets as wired inputs - so a downstream MF_ComposeVideo scales to whatever you probed instead of you typing numbers by hand.
How it works
It shells out to ffprobe and parses the JSON. The details that matter: duration_sec comes from the container's format.duration, which the readme calls the authoritative timeline - use it when you need "how long is this." width/height are display dimensions and rotation-aware, so portrait phone video reports the correct orientation instead of raw coded dimensions. fps is parsed from the frame rate fraction (30000/1001 β 29.97).
The outputs that matter
duration_sec(FLOAT),width/height(INT) - the geometry and length.fps(FLOAT) - effective frame rate.video_codec/audio_codec(STRING) -"h264","hevc","av1","aac","opus", etc., or""when there's no such stream. That empty string is the "this file has no audio" answer, and it's a genuinely useful check before you build an audio pipeline on top of a video-only source.
Input is media_path (or the dual-input triplet - wire frames/tensor_fps/audio and it probes the temp file the pack writes). Six outputs, all typed.
Install
Part of MediaForge:
cd ComfyUI/custom_nodes
git clone https://github.com/leon80148/comfyui_MediaForge.git
# restart ComfyUI
Or ComfyUI Manager β "MediaForge". Needs ffprobe - the pack's requirements.txt installs a fallback binary if you don't have system ffmpeg.
Common issues
Don't expect video_codec to tell you about the profile or bit depth - it's the codec name, not a full spec; MF_LoadVideoFrames's metadata_json output has the deep probe data if you need it. And remember this reads container metadata: a file that's been remuxed oddly can report things that don't match what decoders actually produce. If a probe says 30fps but playback looks wrong, that's a metadata vs. reality mismatch, not this node being wrong. It's a question-answering node - pair it with MF_DetectSilence / MF_DetectScenes when you're sizing up unknown footage.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| media_path | STRING | input/sample.mp4 | β |
| framesopt | IMAGE | β | |
| tensor_fpsopt | FLOAT | 30.01β240 | β |
| audioopt | AUDIO | β |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| duration_sec | FLOAT | β |
| width | INT | β |
| height | INT | β |
| fps | FLOAT | β |
| video_codec | STRING | β |
| audio_codec | STRING | β |