ComfyUI Node

AV1 Codec

A quality slider pretending to be a codec

By Immac·Created about a year ago·Updated about a year ago· 2
AV1 Codec
    • codec
    crf30

    AV1 Codec is one of the two "codec factory" nodes in ComfyUI Core Video Nodes (Immac/ComfyUI-CoreVideoMocks), and of everything in this pack, it's the closest to being genuinely informative. In a real encoder you don't just say "use AV1" - you also pick a quality target. This node exists to hand you a codec object with that quality baked in, so the encoder node can just consume it.

    The mechanics are simple. One input, crf, an INT with default 30, min 0, max 63, and the author's own tooltip: "Constant Rate Factor (CRF) for AV1 encoding. Lower values mean better quality." CRF is the real deal - it's how ffmpeg and libaom actually work. Lower number, bigger file, better quality; higher number, smaller file, more artifacts. For AV1, 23–28 is the sweet spot most people land on, and 30 (the default here) is a reasonable "I value file size" starting point.

    The output is codec, typed DICT, and it returns {"codec": "AV1", "crf": crf}. A dict instead of a string is actually the right design call - it lets the encoder node read structured options instead of parsing text. That's a genuinely decent API idea buried in a pack that GitHub describes as "A set of mock nodes for RFC purposes."

    Why AV1, and why you should care

    AV1 is the modern royalty-free codec (Alliance for Open Media), and it's the quality-per-bit king of the open world - roughly 30% better compression than VP9 at the same quality, which is why YouTube ships it for 4K+ and why everyone's been slowly migrating to it. The trade-off: encoding is slow. Real-time AV1 encode is not a thing on consumer hardware; expect minutes per clip.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/Immac/ComfyUI-CoreVideoMocks
    

    Restart ComfyUI. No pip packages, no models, no ffmpeg - pure Python on ComfyUI's own folder_paths. Or ComfyUI Manager → "ComfyUI Core Video Nodes."

    The honest version

    Feed the codec dict to the pack's Encode Video Stream node and you'll hit a wall - more on that there. The dict is a placeholder, not a real libaom preset. Still, this node teaches the right lesson: codec choice and quality setting are separate decisions, and a well-designed pipeline carries them as one structured object. If you want real AV1 encoding today, that's ffmpeg or handbrake, not this pack. But as a way to understand what a codec factory should look like, this is one of the better nodes in the mock.

    Categoryvideo

    Inputs (1)

    NameTypeDefaultDescription
    crfINT300–63Constant Rate Factor (CRF) for AV1 encoding. Lower values mean better quality.

    Outputs (1)

    NameTypeDescription
    codecDICT