Nodes/ComfyUI_StarNodes/⭐ Star Video Compressor
ComfyUI Node

⭐ Star Video Compressor

Compress videos to a chosen quality or a desired file size - handy for Discord's 10 MB limit. Standalone, no Video Helper Suite required. See web/docs/StarVideoCompressor.md

By Starnodes2024·Created 2 years ago·Updated 7 days ago· 103
⭐ Star Video Compressor
  • video
  • images
  • audio
  • Filenames
  • info
quality60
formatvideo/h264-mp4
presetmedium
filename_prefixStarVideo
target_size_mb0.0
video_path
frame_rate30.00
save_audiotrue
save_outputtrue
drop_first_frames0
drop_last_frames0
Category⭐StarNodes/Video

Inputs (14)

NameTypeDefaultDescription
qualityINT600–100Compression quality (0 = smallest file, 100 = best quality). IGNORED when target_size_mb is greater than 0.
formatCOMBOvideo/h264-mp411 options: video/h264-mp4, video/h265-mp4, video/vp9-webm, video/av1-mp4, video/h264-mkv, video/h265-mkv, +5
presetCOMBOmediumEncoder speed vs efficiency. Slower = smaller file at the same quality, but takes longer.
filename_prefixSTRINGStarVideoOutput filename. May contain subfolders, e.g. 'discord/my_clip' - missing folders are created inside the ComfyUI output folder.
target_size_mbFLOAT0.00–1000000Desired output size in MiB. 0 = off (quality slider is used). When > 0 this WINS over the quality slider: the bitrate is calculated from the duration (two-pass where supported).
video_pathSTRINGOptional: direct path to a video file (absolute, or relative to the ComfyUI input folder). Used when no 'video' input is connected. Leave empty to use the 'images' input.
frame_rateFLOAT30.001–240Only used when compressing an IMAGE batch. Tip: right-click the node to convert this widget into an input and connect the loader's fps output.
save_audioBOOLEANtrue
save_outputBOOLEANtrueTrue = ComfyUI output folder, False = temp folder.
drop_first_framesINT00–1000Skip this many frames from the start of the output (e.g. 10 = the output starts at frame 11). 0 = off. Any connected/embedded audio is shifted by the same amount to stay in sync.
drop_last_framesINT00–1000Cut this many frames from the end of the output (e.g. 10 = the last 10 frames are removed). 0 = off. Works together with drop_first_frames. Any connected/embedded audio is trimmed to match so it stays in sync.
videooptSTAR_FILENAMESVideo file(s) from the 'Star Video Loader' node.
imagesoptIMAGEAlternative: encode + compress an image batch directly (uses frame_rate).
audiooptAUDIOOptional external audio track (ComfyUI core audio, e.g. from the 'LoadAudio' node or the Star Video Loader).

Outputs (2)

NameTypeDescription
FilenamesSTAR_FILENAMES
infoSTRING