MAI Video Compare (2-6, synchronized):
MAIVideoCompare is a node designed to facilitate the comparison of multiple video renders in a synchronized manner, specifically tailored for AI artists and creators who work with video content. This node allows you to compare between 2 to 6 video sources simultaneously, providing a browser-native viewer that supports various viewing modes such as flip, wipe, side-by-side, and grid layouts. The node does not perform any video processing itself; instead, it generates small h264 previews of the input videos, which are then played using a web-based player. This setup enables synchronized scrubbing, frame stepping, and A/B flickering, with audio playback available from the hovered or locked source. The node also includes a "Winner" widget, which allows you to select a preferred video source for further processing in subsequent steps. This feature is particularly useful for workflows that require iterative refinement and selection of the best video output.
MAI Video Compare (2-6, synchronized) Input Parameters:
winner
The winner parameter specifies which video source is considered the preferred or selected one. This is an integer value that corresponds to the index of the video source you want to prioritize. It plays a crucial role in determining which video will be passed through for further processing in subsequent steps. The default value is typically set to 1, but you can adjust it based on your preference.
preview_crf
The preview_crf parameter controls the quality of the video preview generated by the node. CRF stands for Constant Rate Factor, and it is used in video encoding to balance quality and file size. A lower CRF value results in higher quality and larger file size, while a higher value reduces quality and file size. The default value is 23, which provides a good balance for preview purposes. Adjusting this parameter allows you to optimize the preview quality according to your needs.
unique_id
The unique_id parameter is a unique identifier for the comparison session. It helps in organizing and managing multiple comparison tasks by ensuring that each session is distinct. This parameter is particularly useful when dealing with multiple video comparisons simultaneously, as it prevents any mix-up between different sessions.
video_1, video_2, ..., video_6
These parameters represent the video sources that you want to compare. You can input up to six different video files, each corresponding to a separate parameter (e.g., video_1, video_2, etc.). These videos are the primary inputs for the node, and they will be used to generate the synchronized previews for comparison.
label_1, label_2, ..., label_6
The label parameters allow you to assign descriptive labels to each video source. These labels are used in the comparison interface to help you easily identify and differentiate between the videos. If no label is provided, the node will automatically generate a default label based on the video source index.
MAI Video Compare (2-6, synchronized) Output Parameters:
result
The result parameter is a tuple containing the output of the comparison process. It includes the selected video (based on the winner parameter), the index of the winning video, and a manifest in JSON format that details the comparison session. The manifest includes information such as video labels, filenames, and other metadata, which can be useful for further analysis or documentation.
ui
The ui parameter provides a user interface payload that includes additional information about the comparison session. This payload is used to enhance the user experience by providing visual and interactive elements in the comparison interface. It includes data such as spans and curves, which are used to visualize the comparison results.
MAI Video Compare (2-6, synchronized) Usage Tips:
- To achieve the best balance between preview quality and performance, adjust the
preview_crfparameter according to your needs. A lower value will provide higher quality but may increase processing time. - Use descriptive labels for each video source to make it easier to identify them during the comparison process. This can be particularly helpful when working with multiple videos.
- Utilize the
winnerparameter to quickly select and pass through the preferred video source for further processing, streamlining your workflow.
MAI Video Compare (2-6, synchronized) Common Errors and Solutions:
[ MAI Video Compare (2-6, synchronized)] preview re-encode skipped
- Explanation: This error occurs when the preview re-encoding process fails, possibly due to an issue with the input video file or the encoding settings.
- Solution: Check the input video files for any corruption or format issues. Ensure that the
preview_crfvalue is set correctly and that the necessary encoding libraries (e.g., ffmpeg) are installed and functioning properly.
Invalid video input
- Explanation: This error indicates that one or more of the video inputs are not valid or are missing.
- Solution: Verify that all video input parameters (
video_1,video_2, etc.) are correctly specified and that the files are accessible and in a supported format.
