Preview Video (WebM)
Finally, a Scrubable Video Preview That Doesn't Trash Your output/ Folder
- images
- audio
Here's the thing ComfyUI has never bothered to give you: a Preview Video node to match Preview Image. So every time you queue a video sampler just to see whether the motion reads, you reach for SaveWEBM or SaveVideo - and both write a file into output/. Tune for an hour and you've buried a dozen throwaway clips you'll never assemble. Preview Video (WebM) is the one-node fix: it plays your image batch back as a scrubable WebM inside the node, encodes to the temp directory instead of output/, and deletes its own previous file on every run. Nothing to clean up. Ever.
It's a small, unusually well-made pack - one node, one opinionated author (dreevelle), and a README that includes actual per-frame benchmark tables. You don't need a pack reputation when the docs are this honest about tradeoffs.
How it works
The node is an output node (it has no outputs - you wire images in from the same socket that already feeds your save node, and it runs on its own). On each execution it encodes the batch with libvpx-vp9 via PyAV into ComfyUI's temp directory, hands the frontend a preview descriptor, and the player pops up in the node. Scrubbing works because ComfyUI's /view endpoint serves the file with range requests, and keyframes are placed about once a second so a drag never has to seek back far. The previous run's file is deleted the moment the next one lands, so a long tuning session stays at one file per node, not gigabytes.
Because it's a preview, it's tuned like one. Colour is explicitly tagged BT.709 full-range (left to its own devices, the encoder uses swscale's BT.601 defaults and writes no matrix tag - a mismatch that can rotate saturated hues by up to 15%). near-lossless even encodes 4:4:4 so the codec's own artifacts can't be mistaken for the model's.
The inputs that actually matter
images- the batch to play. The one socket that matters.fps- defaults to24, the native rate of most current video models. Stored as an exact rational, so23.976stays2997/125instead of drifting across a long batch.quality(advanced) -fast,balanced,high,near-lossless. The default isnear-lossless, and honestly it's the right call: at crf 15 the only thing you're judging is the model. Drop tofastwhen you just want to see whether the motion reads - it's about 2.5x quicker thanSaveWEBM's settings.audio(optional) - muxed as Opus, trimmed to the batch length. WebM only takes Vorbis or Opus, so AAC from the MP4 path won't fly; unsupported sample rates get resampled.mute- skips the audio stream entirely at encode time rather than silencing it.
Install
The pack is dreevelle/ComfyUI-PreviewWebM - search "PreviewWebM" in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/dreevelle/ComfyUI-PreviewWebM
Then restart ComfyUI. No extra dependencies - PyAV and torch ship with ComfyUI. torchaudio is only needed if you feed audio at a rate Opus doesn't support and don't want to use mute.
Gotchas worth knowing
- A preview doesn't survive a restart. Temp files are wiped when the server starts and stops, so the player 404s until you queue again. The workflow remembers the result; the file doesn't. Don't panic.
near-losslessis 4:4:4 (VP9 profile 1) - Chrome and Firefox decode it in software, nothing decodes it in hardware. The other presets stay 4:2:0. If your machine grinds on playback, that's why.- One video per node. The frontend only shows the first result, so it deliberately makes a single file.
- Odd dimensions are fine, RGBA batches keep their alpha, and there's no 10-bit out of libvpx-vp9 unless it was built with the high-bit-depth flag - so banding in very smooth gradients is about the only artifact a lower crf can't fix.
The name's a lie in the best way: it doesn't save anything, and that's the whole point.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | The image batch to play back as a video. | |
| fps | FLOAT | 24.000.01–1000 | Playback frame rate of the preview. Defaults to 24, the native rate of most current video models. |
| quality | COMBO | near-lossless | Encoder speed against picture quality: 'fast' — realtime VP9, crf 40. Lowest latency, biggest file. 'balanced' — crf 34. Roughly twice as fast as the defaults SaveWEBM uses. 'high' — crf 28, more search effort. Use when you need to judge fine detail. 'near-lossless' — crf 15 and 4:4:4 chroma. Encoder artifacts stay below what you can see, so what you are judging is the model and not the codec. Slowest and by far the largest, which costs nothing here because the file is discarded next run. This only affects the throwaway preview, never anything you save. |
| mute | BOOLEAN | false | Leave the audio out of the preview without unwiring it. The track is skipped at encode time rather than silenced, so the file has no audio stream at all and the encode skips the resample too. Has no effect if nothing is wired to 'audio'. |
| audioopt | AUDIO | Optional audio track, muxed as Opus. Trimmed to the length of the image batch. Sample rates Opus does not support are resampled to the next supported rate. |
Outputs (0)
No outputs