Save Movie:
Save Movie turns a sequence of images into an H.264-encoded MP4 movie for convenient playback, review, and sharing from ComfyUI. It prepares multiple frames in parallel and uses x264’s “veryfast” encoding preset to reduce export time. Its documented encoding follows core Save Video’s BT.709 colour and limited-range conventions, with adjustable compression quality and optional resizing using Lanczos filtering, a method designed to retain detail during scaling. Frames are converted to 8-bit pixel values before encoding, so this node is intended for viewing copies rather than preserving high-precision or HDR master images. It saves the movie to ComfyUI’s output directory and returns information to the interface so the saved result can be displayed.
Save Movie Input Parameters:
images
A required IMAGE batch containing the frames to save, in their playback order. Each image in the batch becomes one frame of the movie; the batch therefore determines the movie’s content and frame count. The implementation expects ComfyUI’s usual image layout: a batch of frames with height, width, and colour-channel dimensions. Before encoding, each frame is moved to CPU memory, multiplied by 255, clipped to the range 0–255, and converted to unsigned 8-bit values without rounding. Values outside the normal 0–1 image range therefore lose information rather than being automatically tone-mapped. For predictable results, supply images already prepared for ordinary display rather than raw linear-light or HDR data. No default value, numeric minimum, numeric maximum, or selectable options are defined for this input.
fps
A required FLOAT setting that determines how many frames play each second. The default is 24.0, the minimum is 1.0, and the maximum is 240.0. This setting changes playback speed and duration without adding, removing, or generating intermediate frames in this node. For example, a batch of 120 frames produces approximately five seconds of video at 24 fps, or four seconds at 30 fps. Match this value to the intended frame rate of your sequence when you want to preserve its original timing; increasing it makes the same frames play faster, while decreasing it makes them play more slowly.
filename_prefix
A required STRING that sets the output subfolder and the beginning of the movie’s filename. Its default is paintaplate/movie, meaning a file with the prefix movie is saved inside the paintaplate subfolder of ComfyUI’s output directory. The node uses ComfyUI’s save-path helper to obtain the destination and a counter, then names the file using the prefix followed by an underscore, a five-digit counter, another underscore, and .mp4; an example is movie_00001_.mp4. This makes it easier to organise exports by shot or version without manually naming every render. No minimum or maximum string length, or fixed list of options, is declared in the schema.
crf
An optional INT controlling x264’s compression quality. The default is 18, the minimum is 0, and the maximum is 51. Lower values generally retain more detail and create larger files, while higher values generally create smaller files with more visible compression, especially in grain, fine textures, shadows, and moving areas. The default of 18 matches the quality setting described for core Save Video; the node’s tooltip also identifies 12 as the setting used for playback proxies and review in its associated workflow. A value of 0 requests x264’s lossless mode, but it does not undo the node’s preceding conversion to 8-bit values or make the export a high-precision image master. CRF controls quality rather than a fixed file size, so movies with the same setting can differ considerably in size.
width
An optional INT specifying the exported movie’s width in pixels. The default is 0, the minimum is 0, and the maximum is 8192. A value of 0 keeps the incoming frames’ width according to the parameter’s documented behaviour; a positive value requests a target width. Resizing takes place during conversion using Lanczos filtering, which helps preserve detail when scaling. A smaller width can reduce encoding work and make review files easier to handle, while a larger width increases the output dimensions without recreating detail missing from the source. Set both dimensions explicitly when you need a particular delivery size; the exposed code does not establish that setting only one dimension automatically preserves the original aspect ratio.
height
An optional INT specifying the exported movie’s height in pixels. The default is 0, the minimum is 0, and the maximum is 8192. A value of 0 keeps the incoming frames’ height according to the parameter’s documented behaviour; a positive value requests a target height. Together with width, this controls the movie’s final dimensions without changing the upstream image batch. Choose dimensions with the same width-to-height proportion as your source to avoid stretching the image. For example, a 1920 × 1080 sequence can be reduced proportionally to 1280 × 720. The resizing is passed to the movie writer as part of the same conversion operation.
Save Movie Output Parameters:
(none)
This node has no output sockets and does not pass an IMAGE, VIDEO, or file-path value to downstream nodes. It is an output node: its purpose is to write an MP4 file to disk. After saving, it returns interface information containing the filename, output subfolder, output-directory designation, and an animated-result flag so ComfyUI can present the saved movie. That interface information is not a connectable workflow output.
Save Movie Usage Tips:
- Start with
crf=18,width=0, andheight=0for an export at the incoming resolution using the node’s default quality. - Use
crf=12when you want a higher-quality review copy, especially for judging grain, subtle lighting changes, or fine detail. Expect a larger file than at 18. - Matchfpsto your sequence’s intended frame rate. Use frame count divided by fps to estimate duration; for example, 121 frames at 24 fps is approximately 5.04 seconds. - For quicker review exports, reduce both dimensions proportionally, such as 1920 × 1080 to 1280 × 720. The node already handles parallel frame preparation internally, so there is no worker-count setting to configure.
- Use prefixes such as
paintaplate/shot010/reviewto organise files by shot. ComfyUI’s output directory remains the base location, and the node adds a numbered filename. - Convert or tone-map linear-light and HDR material into an appropriate display-ready image before saving. This node clips out-of-range pixel values and does not expose an OCIO transform or HDR tone-mapping control.
- Keep a high-precision frame-sequence master separately if you need further compositing or colour grading. Treat the MP4 as a review or delivery copy rather than a replacement for that master.
Save Movie Common Errors and Solutions:
Missing required input: images, fps, or filename_prefix
- Explanation: These three inputs are required by the schema. ComfyUI may reject execution when an image connection is missing or a required value is unavailable. The exact validation message depends on your ComfyUI version.
- Solution: Connect a valid IMAGE batch to
imagesand make surefpsandfilename_prefixhave values. Start with 24.0 andpaintaplate/movieif you are unsure.
Input value outside the allowed range
- Explanation: The schema limits
fpsto 1–240,crfto 0–51, and each output dimension to 0–8192. Values outside those limits may be rejected during validation; the supplied class does not define a custom error message for this case. - Solution: Enter values within the declared ranges. Use integer values for
crf,width, andheight, and use 0 for a dimension only when you want to keep its incoming size.
Permission denied or unable to create the output file
- Explanation: Saving can fail if ComfyUI cannot write to the selected output location, the destination is unavailable, or the filename contains characters unsupported by your operating system. The precise message comes from the filesystem or movie-writing backend, not from a custom check in this class.
- Solution: Try a simple prefix such as
paintaplate/movie, confirm that ComfyUI’s output directory is writable, and check available disk space. Avoid using the prefix as an arbitrary absolute filesystem path.
Encoder initialization or unsupported-dimensions error
- Explanation: The movie writer can fail if its H.264 encoder cannot accept the requested dimensions or encoding configuration. Some H.264 pixel formats require even-numbered dimensions; the supplied node class does not show the writer’s complete validation or exact error strings.
- Solution: Try conventional even-numbered dimensions such as 1280 × 720 or 1920 × 1080 with
crf=18. If encoding still fails, inspect ComfyUI’s console for the backend message and verify that the extension’s required video-encoding dependencies are installed.
Memory allocation failure during export
- Explanation: Large batches or very high-resolution frames can put pressure on system memory because frames are converted to CPU-based arrays and multiple frames may be processed concurrently. An allocation error may originate in PyTorch, NumPy, or the movie-writing backend rather than this node itself.
- Solution: Test a shorter sequence and close other memory-heavy applications. If necessary, resize the images upstream before connecting them; reducing only the exported dimensions does not remove the original large IMAGE batch from memory.
Export looks too dark, has clipped highlights, or shows colour differences
- Explanation: This is a visual symptom rather than a defined error message. The node directly converts image values to 8-bit and clips values outside 0–1 before encoding. Raw linear-light or HDR imagery may therefore look wrong, and the node does not perform an explicit colour-space conversion through OCIO.
- Solution: Prepare the images for display before export using the appropriate colour conversion or tone-mapping workflow. Check the prepared frames first, and do not rely on lowering
crfto recover clipped highlights or correct an unsuitable colour transform.
Movie plays too fast, too slowly, or appears stretched
- Explanation: These are configuration symptoms rather than encoder errors. Playback timing follows
fps, while the requested width and height determine the exported dimensions; an incorrect frame rate changes duration, and mismatched proportions can distort the picture. - Solution: Set
fpsto the sequence’s intended rate. Keep both dimensions at 0 to retain the incoming size, or supply a width and height with the same aspect ratio as the original frames.
