Break Media Info
Unpack fps, frame count, and dimensions from a loaded clip
- in_media_info
- start_frame
- frame_count
- fps
- duration
- frame_time
- width
- height
When JNodes loads a video (via Load Visual Media From Path), it hands you back a compact MediaInfo bundle alongside the frames - a little package holding everything the file knows about itself: how many frames, at what fps, how big, how long. Break Media Info is the node that cracks that bundle open into separate output pins you can actually wire into other nodes. It's the "unpack the struct" step, and it's the difference between having the information and being able to use it.
This matters more than it sounds. Video workflows are full of numbers that need to line up - you want your output fps to match the source, your resize target to preserve the aspect ratio, your frame math to know how many frames you're actually working with. Instead of hardcoding those and hoping they match the clip you loaded, you break out the real values and feed them downstream. It's how you make a workflow that adapts to whatever video you throw at it.
How it works
You feed it the JNODES_MEDIA_INFO object that came out of a media loader, and it splits that one wire into seven typed outputs. The loader gives you two of these bundles - one describing the original media and one describing the frames it actually output (which differ when you asked it to start partway in or sample a subset) - so you'll often use two Break Media Info nodes, one on each, to compare source and result.
The inputs and outputs that matter
The one input is in_media_info - the JNODES_MEDIA_INFO bundle from a JNodes media loader.
The outputs are the whole point, seven of them:
start_frame(INT) - where this info's frames begin. Always 0 for the original media; can be nonzero for output media if you started sampling partway in.frame_count(INT) - how many frames.fps(FLOAT) - playback rate. Wire this into your video saver so the output plays at the source's speed.duration(FLOAT) - length in seconds.frame_time(FLOAT) - seconds between frames (duration ÷ frame_count), usually a small number.width(INT) andheight(INT) - the pixel dimensions of each frame, ready to feed a resize or a latent-size calculation.
How to install it
ComfyUI Manager, search JNodes, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/JaredTherriault/ComfyUI-JNodes
pip install -r ComfyUI-JNodes/requirements.txt
No models - this reads metadata off an already-loaded clip.
Common issues & troubleshooting
"It won't connect to my video." The input is specifically a JNODES_MEDIA_INFO object, which is a JNodes type that comes out of the pack's own media loader. You can't feed it a raw video path or an IMAGE batch - it needs the info bundle from Load Visual Media From Path. If you don't have that node in your graph, that's the missing piece.
Output fps looks off. Remember there are two info bundles - original and output - and they can differ if you sub-sampled frames or changed the skip rate on load. Break the right one; use the original media's fps if you want to preserve the source's real playback speed.
frame_time seems tiny. That's correct - it's the gap between frames in seconds, so 24fps gives roughly 0.042. If you were expecting something in milliseconds, that's the mismatch.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| in_media_info | JNODES_MEDIA_INFO | — |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| start_frame | INT | — |
| frame_count | INT | — |
| fps | FLOAT | — |
| duration | FLOAT | — |
| frame_time | FLOAT | — |
| width | INT | — |
| height | INT | — |