Skip to content

IO-AtelierTech/comfyui-video-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

ComfyUI Video Utils

Video utility nodes for ComfyUI by IO-AtelierTech

Provides utility nodes for video operations, particularly for FFmpeg integration and workflow connectivity.

Features

  • Save Video with Path Output: Save video and get file path for FFmpeg integration
  • Extract Video Path: Get file path from loaded videos
  • FFmpeg Bridge: Seamlessly connect video generation to FFmpeg processing

Installation

Via IO-AtelierTech ComfyUI Bundle (Recommended)

This plugin is included in the comfyui-bundle Docker image.

docker pull ioateliertech/comfyui-bundle:latest

Manual Installation

cd ComfyUI/custom_nodes
git clone https://github.com/io-ateliertech/comfyui-video-utils.git
# No additional dependencies required

Available Nodes

SaveVideoGetPath

Save a VIDEO to disk and output both the video object and the file path.

Use Case: Connect video generation nodes to FFmpeg nodes that require STRING paths.

Inputs:

  • video (VIDEO) - The video to save
  • filename_prefix (STRING) - Output path prefix (default: video/ComfyUI)
  • format (COMBO) - Video format: auto, mp4 (default: mp4)
  • codec (COMBO) - Video codec: auto, h264 (default: h264)

Outputs:

  • video (VIDEO) - Passthrough of the video object
  • video_path (STRING) - Absolute file path to the saved video

GetVideoPath

Extract the file path from a VIDEO that was loaded from disk.

Use Case: Get the path from videos loaded via LoadVideo node.

Note: Only works with videos loaded from files, not generated videos. For generated videos, use SaveVideoGetPath.

Inputs:

  • video (VIDEO) - The video to get path from

Outputs:

  • video_path (STRING) - File path of the video

Usage Examples

Video Generation → FFmpeg Processing

LumaImageToVideo_fal → SaveVideoGetPath → FFmpeg Node
                            ↓ (video_path)
                       (saves & outputs path)

Workflow

# Generate video with fal.ai
luma_node = LumaImageToVideo(...)

# Save and get path for FFmpeg
save_node = SaveVideoGetPath(
    video=luma_node.output,
    filename_prefix="video/generated",
    format="mp4"
)

# Use path in FFmpeg node
ffmpeg_node = FFmpegProcess(
    input_path=save_node.video_path,  # STRING path
    # ... other parameters
)

Technical Details

VIDEO Type Handling

ComfyUI's VIDEO type is an object that may contain:

  • VideoFromFile - Loaded from disk (has __file attribute)
  • Generated videos - No file path until saved

This plugin bridges the gap by:

  1. SaveVideoGetPath: Saves generated videos and returns the path
  2. GetVideoPath: Extracts path from already-loaded videos

Output Paths

Videos are saved to ComfyUI's output directory structure:

  • Base: ComfyUI/output/
  • Videos: ComfyUI/output/video/
  • Filename format: {prefix}_{counter:05}_.{ext}

Example: video/generated_00001_.mp4

Integration with Other Plugins

Works seamlessly with:

Development

This is a lightweight utility plugin with no external dependencies beyond ComfyUI core.

File Structure

comfyui-video-utils/
├── __init__.py          # Node definitions and registration
└── README.md            # This file

Adding New Utilities

To add new video utility nodes:

class MyVideoUtility:
    @classmethod
    def INPUT_TYPES(cls):
        return {
            "required": {
                "video": ("VIDEO", {}),
            },
        }

    RETURN_TYPES = ("STRING",)
    FUNCTION = "process"
    CATEGORY = "video/utils"

    def process(self, video):
        # Your logic here
        return (result,)

# Register
NODE_CLASS_MAPPINGS["MyVideoUtility"] = MyVideoUtility

License

MIT License

Part of the IO-AtelierTech ComfyUI ecosystem.

Related Projects

About

Video utility nodes for ComfyUI FFmpeg integration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages