ComfyUI > Nodes > ComfyUI-FFmpeg > 🔥StitchingVideo

ComfyUI Node: 🔥StitchingVideo

Class Name

StitchingVideo

Category
🔥FFmpeg
Author
MoonHugo (Account age: 158days)
Extension
ComfyUI-FFmpeg
Latest Updated
2024-11-13
Github Stars
0.04K

How to Install ComfyUI-FFmpeg

Install this extension via the ComfyUI Manager by searching for ComfyUI-FFmpeg
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-FFmpeg in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

🔥StitchingVideo Description

Seamlessly merge two videos with audio selection, CPU/GPU support, and FFmpeg integration for versatile video editing.

🔥StitchingVideo:

The StitchingVideo node is designed to seamlessly combine two video files into a single output, offering a straightforward solution for video editing tasks that require merging content. This node leverages the power of FFmpeg to stitch videos either horizontally or vertically, providing flexibility in how the final video is presented. It also allows you to choose which video's audio track to use in the final output, ensuring that the most relevant audio accompanies the visual content. By supporting both CPU and GPU processing, the node can efficiently handle video encoding tasks, making it a versatile tool for AI artists looking to create composite video works without delving into complex video editing software.

🔥StitchingVideo Input Parameters:

video1_path

This parameter specifies the file path to the first video that you want to stitch. It is crucial as it serves as one of the primary video sources for the stitching process. The path must point to a valid video file, and the default value is set to C:/Users/Desktop/video1.mp4. Ensure the file exists and is accessible to avoid errors.

video2_path

This parameter indicates the file path to the second video to be stitched with the first. Like video1_path, it must be a valid video file path. The default value is C:/Users/Desktop/video2.mp4. This video will be combined with the first video according to the specified stitching type.

device

The device parameter determines whether the stitching process will utilize the CPU or GPU for video encoding. The options are cpu and cuda, with the default being set based on the availability of a CUDA-capable GPU. Using a GPU can significantly speed up the process, especially for high-resolution videos.

use_audio

This parameter allows you to select which video's audio track will be used in the final stitched output. The options are video1 or video2, with video1 being the default. This choice is important for ensuring that the desired audio accompanies the visual content.

stitching_type

The stitching_type parameter defines how the two videos will be combined. You can choose between horizontal and vertical stitching, with horizontal as the default. This setting affects the layout of the final video, determining whether the videos are placed side by side or stacked on top of each other.

output_path

This parameter specifies the directory where the final stitched video will be saved. It must be a valid directory path, and the default is C:/Users/Desktop/output. The node will generate a unique filename based on the current date and time to avoid overwriting existing files.

🔥StitchingVideo Output Parameters:

video_complete_path

This output parameter provides the complete file path to the stitched video once the process is complete. It is essential for locating the final output and verifying that the stitching operation was successful. The path includes the directory specified in output_path and a filename generated by the node.

🔥StitchingVideo Usage Tips:

  • Ensure that both video files are accessible and in a supported format before starting the stitching process to avoid errors.
  • If you have a CUDA-capable GPU, select cuda as the device to speed up the video encoding process, especially for large or high-resolution videos.
  • Choose the appropriate stitching type based on the content and desired presentation of the final video. Horizontal stitching is ideal for side-by-side comparisons, while vertical stitching is suitable for creating a stacked effect.

🔥StitchingVideo Common Errors and Solutions:

"video1_path: <path> is not a video file"

  • Explanation: The specified path for the first video does not point to a valid video file.
  • Solution: Verify that the file path is correct and that the file is a supported video format.

"video2_path: <path> is not a video file"

  • Explanation: The specified path for the second video does not point to a valid video file.
  • Solution: Check the file path and ensure the file is a valid video format.

"video1_path: <path> does not exist"

  • Explanation: The file path for the first video does not exist or is incorrect.
  • Solution: Confirm that the file path is accurate and that the file is present in the specified location.

"video2_path: <path> does not exist"

  • Explanation: The file path for the second video does not exist or is incorrect.
  • Solution: Ensure the file path is correct and that the file is available at the specified location.

"output_path: <path> is not a directory"

  • Explanation: The specified output path is not a valid directory.
  • Solution: Provide a valid directory path where the stitched video can be saved.

🔥StitchingVideo Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-FFmpeg
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.