Video Mask Editor (C2C):
The VideoMaskEditorMEC node is designed to facilitate precise per-frame mask editing across an entire video batch. It provides an intuitive in-browser video mask editor equipped with tools such as brush, erase, fill, lasso, and onion-skin, allowing you to define keyframes for specific frames. The node then interpolates the non-keyframed frames using distance-transform interpolation, ensuring smooth transitions and consistent mask application throughout the video. This node is particularly beneficial for artists and creators who need to apply detailed and consistent masking across video sequences, enhancing the quality and precision of video editing tasks.
Video Mask Editor (C2C) Input Parameters:
image
The image parameter expects a 4-dimensional tensor representing the video frames to be processed. This input is crucial as it forms the basis upon which the mask editing operations are performed. The tensor should have dimensions corresponding to batch size, height, width, and color channels. Ensuring the correct format and dimensions is essential for the node to function properly.
session_id
The session_id is a string identifier used to manage and track the editing session. It is important for maintaining continuity and consistency across editing operations. An empty or incorrect session ID will result in errors, as it is necessary for the node to associate the editing actions with the correct session.
tween_mode
The tween_mode parameter determines the method used to interpolate non-keyframed frames. The default option is "distance_transform," which provides smooth transitions between keyframes. This parameter allows you to control how the node fills in the gaps between manually edited frames, impacting the overall fluidity and coherence of the mask application.
feather
The feather parameter is a float value that specifies the Gaussian feather radius in pixels. It ranges from 0.0 to 32.0, with a default of 0.0, indicating no feathering. Feathering softens the edges of the mask, creating a more natural blend with the surrounding pixels. Adjusting this parameter can help achieve smoother transitions and reduce harsh edges in the mask.
threshold
The threshold parameter is a float value ranging from 0.0 to 1.0, with a default of 0.0. It is used to binarize the mask after tweening, where 0.0 retains a soft mask and higher values create a more defined binary mask. This parameter is useful for controlling the sharpness and clarity of the mask edges, depending on the desired effect.
input_mask
The input_mask is an optional tensor that serves as a fallback mask if no keyframes are set. This parameter provides a default mask to be used across the video, ensuring that there is always a baseline mask applied even if specific keyframes are not defined.
Video Mask Editor (C2C) Output Parameters:
mask
The mask output is a tensor representing the edited mask for each frame in the video batch. This output is the result of the mask editing and interpolation process, providing a detailed and consistent mask that can be used for further video processing or effects.
info
The info output is a string containing metadata and diagnostic information about the mask editing session. This information can include details about the interpolation method used, session ID, and any other relevant data that can assist in understanding the editing process and results.
Video Mask Editor (C2C) Usage Tips:
- Ensure that the
imageinput is correctly formatted as a 4-dimensional tensor to avoid errors and ensure smooth processing. - Use the
featherparameter to soften mask edges for a more natural look, especially when blending masks with complex backgrounds. - Experiment with different
tween_modesettings to find the best interpolation method for your specific video content and desired effect.
Video Mask Editor (C2C) Common Errors and Solutions:
"image must be IMAGE tensor (B,H,W,C)"
- Explanation: This error occurs when the input image tensor does not have the correct dimensions or format.
- Solution: Verify that the input image is a 4-dimensional tensor with the correct batch size, height, width, and color channels.
" Video Mask Editor (C2C): session_id is empty. Open the node's"
- Explanation: This error indicates that the
session_idparameter is missing or empty, which is necessary for tracking the editing session. - Solution: Ensure that a valid
session_idis provided to maintain session continuity and avoid processing errors.
