Visit ComfyUI Online for ready-to-use ComfyUI environment
Seamlessly merge two videos with audio selection, CPU/GPU support, and FFmpeg integration for versatile video editing.
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.
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.
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.
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.
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.
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.
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.
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.
cuda
as the device to speed up the video encoding process, especially for large or high-resolution videos.<path>
is not a video file"<path>
is not a video file"<path>
does not exist"<path>
does not exist"<path>
is not a directory"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.