Nodes/ComfyUI_MetaSaver/Save Video with Custom Metadata
ComfyUI Node

Save Video with Custom Metadata

Bake generation params into your video's container tags

By SorenWeile·Created 9 months ago·Updated 6 months ago· 0
Save Video with Custom Metadata
  • video
  • meta_value_0
  • meta_value_1
  • meta_value_2
  • meta_value_3
  • meta_value_4
  • meta_value_5
  • meta_value_6
  • meta_value_7
  • meta_value_8
  • meta_value_9
    ◄filename_prefixvideo/ComfyUI►
    ◄format▾►
    ◄codec▾►
    ◄meta_name_0►
    ◄meta_name_1►
    ◄meta_name_2►
    ◄meta_name_3►
    ◄meta_name_4►
    ◄meta_name_5►
    ◄meta_name_6►
    ◄meta_name_7►
    ◄meta_name_8►
    ◄meta_name_9►

    Same idea as its image sibling, ported to video: instead of a PNG chunk, your labeled fields get written as tags on the video container itself - the kind ffprobe or exiftool will happily print out, no ComfyUI required to read them. If you've been using MetaSaver on your stills to track seeds and prompts, this is the version for whatever you're rendering out as a video.

    What it actually takes as input - and where the README gets ahead of itself

    Worth flagging up front, because it'll trip you up if you read the pack's GitHub page before opening the node: the README describes wiring in a raw image batch and setting an fps. That's not what the node on the canvas asks for. What you'll actually see is a single video input - an already-assembled VIDEO object, the kind you get out of whatever node in your graph turns frames into a video - plus format and codec dropdowns. Wire the video output from upstream into this node directly; there's no frame batch and no fps field here. Think of it as "take the video my workflow already built, and re-save it with my metadata tags stapled on," not "build a video from raw frames."

    Inputs and outputs that matter

    • video (VIDEO, required) - the encoded video coming in from upstream.
    • filename_prefix (STRING, default video/ComfyUI) - note the video/ in the default; unlike the image nodes this one drops files into a video subfolder of your output directory by default, not the top level. Worth knowing before you go hunting for your file.
    • format - auto (keep whatever container the incoming video already is) or force mp4.
    • codec - auto (keep the source codec) or force h264.
    • meta_name_0…meta_name_9 / meta_value_0…meta_value_9 - ten optional label/value pairs, same wildcard-typed mechanism as the image nodes. Empty pairs are skipped.

    No output socket - it's a terminal save node.

    Installing it

    ComfyUI Manager: search "MetaSaver", install, restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/SorenWeile/ComfyUI_MetaSaver
    

    Restart. Unlike the image side, the video nodes need PyAV (pip install av) - it's what actually writes the container tags. Most ComfyUI distributions already ship it, but if this node is missing from your menu after a restart, PyAV failing to import is the first thing to check in the console log.

    Reading it back, and the usual gotchas

    Pull the tags with ffprobe -v quiet -print_format json -show_format your_video.mp4, or exiftool your_video.mp4, or in Python with PyAV: open the container and read container.metadata.get("custom_metadata") for the JSON blob. If the tags don't show up at all, ffprobe -show_format_tags is the fastest way to confirm whether they got written before you go blaming your reader script.

    The most common miss is the same one as the image nodes: a meta_name typed with nothing wired into its matching meta_value (or the reverse) gets dropped without complaint, so a "missing" field is almost always an unpaired one, not a bug. And if the node's not there at all after install, it's PyAV nine times out of ten - check that before anything else.

    Categoryimage/video

    Inputs (24)

    NameTypeDefaultDescription
    videoVIDEO—
    filename_prefixSTRINGvideo/ComfyUI—
    formatCOMBO2 options: auto, mp4
    codecCOMBO2 options: auto, h264
    meta_name_0optSTRING—
    meta_value_0opt*—
    meta_name_1optSTRING—
    meta_value_1opt*—
    meta_name_2optSTRING—
    meta_value_2opt*—
    meta_name_3optSTRING—
    meta_value_3opt*—
    meta_name_4optSTRING—
    meta_value_4opt*—
    meta_name_5optSTRING—
    meta_value_5opt*—
    meta_name_6optSTRING—
    meta_value_6opt*—
    meta_name_7optSTRING—
    meta_value_7opt*—
    meta_name_8optSTRING—
    meta_value_8opt*—
    meta_name_9optSTRING—
    meta_value_9opt*—

    Outputs (0)

    No outputs