Media Info To String
Turn a MediaInfo struct into readable text
- in_media_info
- STRING
Load a video or image with JNodes_LoadVisualMediaFromPath and you get back, alongside the frames, a JNODES_MEDIA_INFO object describing what you loaded - frame count, fps, duration, dimensions, that kind of thing. It's a structured type, which is great for wiring individual fields into other nodes, but useless if you just want to look at it. That's this node's whole job: hand it a JNODES_MEDIA_INFO and get back one formatted STRING you can drop into a preview text box, print to console, or bake into a filename or a piece of metadata.
How it works
There's exactly one input and it's typed, so the only thing you can plug in here is a JNODES_MEDIA_INFO - the output of JNodes_LoadVisualMediaFromPath (either its original_media_info or output_media_info pin) or any other JNodes node that produces the same structure. The node formats the structure's fields - per the pack's own docs, that's start_frame, frame_count, fps, duration, frame_time, width and height - into a single readable string and returns it.
This is the "just show me what's in there" companion to JNodes_BreakMediaInfo, which does the opposite job: instead of one formatted string, it splits the same structure out into individual typed pins (INT for frame count, FLOAT for fps, and so on) so you can wire each value somewhere specific. Use MediaInfoToString when you want a human-readable summary; use BreakMediaInfo when you need to actually compute with one of the values.
The inputs and outputs
in_media_info(JNODES_MEDIA_INFO) - the media info to format, typically fromJNodes_LoadVisualMediaFromPath.STRINGoutput - the formatted, human-readable summary.
How to install it
Via ComfyUI Manager: Install Custom Nodes, search "JNodes", install, restart. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/JaredTherriault/ComfyUI-JNodes
pip install -r ComfyUI-JNodes/requirements.txt
then restart ComfyUI. No model downloads - this node just formats a structure that already exists in memory.
Common issues & troubleshooting
Nothing to connect it to. JNODES_MEDIA_INFO is a JNodes-specific type - you can't plug an ordinary IMAGE or a generic dict into this node's input, and you can't skip straight to it without a media-loading node upstream. If the input pin looks unconnectable, you're missing the JNodes_LoadVisualMediaFromPath (or similar) step that actually produces the structure.
Original vs. output info look different, and that's expected. JNodes_LoadVisualMediaFromPath gives you two separate JNODES_MEDIA_INFO outputs - one for the source file as it truly is, one for whatever slice you actually sampled (start_at_n, sample_next_n, and so on). If you plug in original_media_info you'll see the source's full frame count and duration; plug in output_media_info and you'll see the trimmed numbers instead. Make sure you're formatting the one you meant to inspect.
Want just one number, not a paragraph. If all you need is, say, the fps as a value to feed into a save node, this isn't the right tool - you want JNodes_BreakMediaInfo, which exposes each field as its own typed output instead of bundling everything into text.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| in_media_info | JNODES_MEDIA_INFO | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |