Nodes/AQnodes for ComfyUI/AQ_StillImageToVideo
ComfyUI Node

AQ_StillImageToVideo

One image, one audio track, straight to .mp4

By 2frames·Created about a year ago·Updated 6 months ago· 1
AQ_StillImageToVideo
  • image
  • audio
  • video_path
filename_prefixsong_cover
fps1
encoderauto (gpu→cpu fallback)
title
tagline
headline
tags
keyscaleC major

Let's be clear about what this node is not: it is not an image-to-video generator. There's no motion, no frame synthesis, no diffusion over time. AQ_StillImageToVideo takes one still image and one audio clip and muxes them into an mp4 where the image sits there for the whole duration of the audio. In other words, it makes album-art videos - and the defaults tell you exactly who it's for. filename_prefix defaults to song_cover, there are inputs for musical key, tagline, and headline, and a sibling node in this pack uploads the result straight to YouTube. It's the finishing step of an automated song-cover pipeline: generate the cover, generate (or load) the song, and get a YouTube-ready video file out the other end.

If you actually want the image to move, this isn't your node - go run an image-to-video model (the pack's author clearly uses a real video model upstream and this node just packages the result). What this does, it does cleanly.

How it works

Source-grounded, it's a thin ffmpeg wrapper. The node:

  1. takes the IMAGE tensor (first frame if it's a batch) and the AUDIO tensor's waveform + sample rate,
  2. writes a temp PNG frame and a 16-bit PCM WAV,
  3. runs ffmpeg -loop 1 -framerate <fps> -i frame.png -i audio.wav ... -c:v libx264 -c:a aac -b:a 192k -pix_fmt yuv420p -shortest -movflags +faststart,
  4. writes filename_prefix_00001.mp4 (auto-incremented) into ComfyUI's output folder and returns the path.

The -loop 1 is the whole trick - one frame repeated, with -shortest cutting the video when the audio ends. If your image has odd pixel dimensions, it crops a pixel or two to make them even, because H.264 encoders demand that. The encoder dropdown lets you force CPU (libx264) or a specific GPU encoder (h264_nvenc, h264_amf, h264_qsv); the default auto tries the GPU encoders in order and falls back to CPU libx264 ultrafast if any of them fail, which is the right behavior for a machine you don't fully control.

The inputs that matter

  • image - the IMAGE tensor. The still that becomes every frame.
  • audio - an AUDIO tensor, not a file path. Load audio with an audio-loading or music-generation node and wire it here.
  • fps - frames per second of the output. Default 1. That's genuinely fine for a static cover; bump it if you want smoother (identical) frames or if your player misbehaves at 1 fps.
  • encoder - auto is the sensible default; pick CPU only if you're seeing GPU-encoder crashes.

The optional music-metadata fields - title, tagline, headline, tags, keyscale - don't render anything on screen. They get written into the file as ffmpeg metadata (title, comment, description, genre, and key), so the mp4 is tagged for music players and YouTube. keyscale is a 34-option musical-key dropdown (C major through B minor) that ends up as the key tag.

Output

One STRING output, video_path, holding the absolute path of the written mp4. The path also gets printed to the console, so even if you don't wire the port up, you'll see where it went.

Installing and dependencies

Pack-level install:

cd ComfyUI/custom_nodes
git clone https://github.com/2frames/ComfyUI-AQnodes

restart, or use ComfyUI Manager and search "AQnodes". The one real external requirement here is ffmpeg on your PATH - the node shells out to the ffmpeg binary. ComfyUI usually bundles one you can use; if you get "ffmpeg not found"-style errors, install ffmpeg or make ComfyUI's bundled binary reachable. The pack's heavy pip requirements (transformers, onnxruntime, etc.) are for its other nodes and don't touch this one.

Gotchas

  • The output is only as good as your audio tensor. A silent or empty AUDIO input produces a silent video - the node won't warn you.
  • fps affects the container, not motion. Don't crank it expecting animation; you'll just get a bigger file of the same still.
  • The metadata tags only show up in players that read them. YouTube reads title/description; genre and key are nice-to-haves for local music apps.
  • Filename auto-increments by counting existing filename_prefix_*.mp4 files, so repeated runs pile up numbered files rather than overwriting. Clear the folder if you want to start numbering fresh.
CategoryAquasite/Media

Inputs (10)

NameTypeDefaultDescription
imageIMAGE
audioAUDIO
filename_prefixSTRINGsong_cover
fpsINT11–60
encoderCOMBOauto (gpu→cpu fallback)5 options: auto (gpu→cpu fallback), cpu (libx264), nvidia (h264_nvenc), amd (h264_amf), intel (h264_qsv)
titleoptSTRING
taglineoptSTRING
headlineoptSTRING
tagsoptSTRING
keyscaleoptCOMBOC major34 options: C major, C# major, Db major, D major, D# major, Eb major, +28

Outputs (1)

NameTypeDescription
video_pathSTRING