H3 MCtx Save Video (obvpm):
H3SaveVideoWithMCtx is a specialized node designed to efficiently save video files in MP4 format along with a metadata sidecar file, ensuring a reliable and synchronized pairing between the two. This node is particularly beneficial for users who need to maintain a trustworthy association between video content and its metadata, as it handles both the video encoding and the sidecar creation in a single transaction. The process begins with encoding the video, followed by hashing the MP4 file, and finally creating the sidecar file. This sequence ensures that even if a crash occurs during the process, the video remains playable. The node leverages a faster encoding mechanism using an ffmpeg subprocess when available, significantly speeding up the process compared to traditional methods. This capability is independent of the node's transaction management, allowing flexibility in its operation. Overall, H3SaveVideoWithMCtx provides a robust solution for saving videos with associated metadata, making it an essential tool for AI artists who require reliable video and metadata management.
H3 MCtx Save Video (obvpm) Input Parameters:
video_path
The video_path parameter specifies the location where the video file will be saved. It is crucial for determining the output directory and file naming conventions. There are no explicit minimum or maximum values, but it should be a valid file path string.
images
The images parameter represents the raw image frames that will be encoded into the video. It is essential for the video creation process, as it provides the visual content. The dimensions of these images must match the expected video dimensions to avoid errors.
audio
The audio parameter contains the audio data that will be synchronized with the video frames. This parameter is optional but enhances the video by adding sound. The audio data should be compatible with the video length to ensure proper synchronization.
crf
The crf (Constant Rate Factor) parameter controls the quality of the video encoding. Lower values result in higher quality and larger file sizes, while higher values reduce quality and file size. The typical range is from 0 to 51, with a default value around 23.
metadata
The metadata parameter allows you to include additional information in JSON format, such as prompts or seeds. This metadata is stored in the sidecar file and can be used for future reference or processing. It must be valid JSON, or it will trigger an error.
pins
The pins parameter is used to specify any trimming or pinning operations applied to the video frames. It helps in managing the video content by defining which parts of the video should be included or excluded. The parameter should be consistent with the trimming operations applied elsewhere in the workflow.
H3 MCtx Save Video (obvpm) Output Parameters:
path
The path output parameter provides the file path of the saved MP4 video. This is useful for locating the video file after the save operation is complete.
images
The images output parameter returns the trimmed image frames that were used in the video. This allows for previewing or further processing of the video content.
audio
The audio output parameter returns the trimmed audio data that was synchronized with the video. This is useful for previewing or further audio processing.
H3 MCtx Save Video (obvpm) Usage Tips:
- Ensure that the
imagesandaudioparameters are correctly synchronized to avoid desynchronization issues in the final video. - Use the
crfparameter to balance between video quality and file size according to your needs. A lowercrfvalue will result in higher quality but larger files. - Validate the
metadataparameter to ensure it is in proper JSON format to avoid errors during the save process.
H3 MCtx Save Video (obvpm) Common Errors and Solutions:
"images are <width>x<height> but the latent decodes to <width>x<height>"
- Explanation: This error occurs when the dimensions of the provided images do not match the expected dimensions based on the latent data.
- Solution: Ensure that the images being provided are decoded from the same latent data and have the correct dimensions.
"metadata is not valid JSON"
- Explanation: The metadata provided is not in a valid JSON format, which is required for the sidecar file.
- Solution: Check the metadata string for JSON formatting errors and correct them. Ensure it is a valid JSON object.
"delivered frames but the raw latent covers <number> and the pin specs account for <number> pinned head + <number> pinned tail frames"
- Explanation: The number of frames delivered does not match the expected number after accounting for pinned frames.
- Solution: Verify that the pin specifications are correctly applied and consistent with the trimming operations used in the workflow.
