H3 X2 Decode + Stream Save:
The H3X2StreamSave node is designed to facilitate the efficient decoding and streaming of video content using the H3 X2 format. This node leverages advanced video encoding techniques, specifically the H.264 NVENC, to ensure high-quality video output with optional AAC audio integration. It is particularly optimized for handling video streams with spatial tiles of 256/64, allowing for asynchronous processing that enhances performance and reduces latency. The node is capable of producing one video per execution, making it ideal for scenarios where batch processing of video content is required. Tested on high-performance hardware like the RTX 4070, it supports resolutions up to 1088x1920 and frame rates of 24 fps, ensuring compatibility with a wide range of video production needs.
H3 X2 Decode + Stream Save Input Parameters:
samples
This parameter represents the latent video data that needs to be processed. It is a required input and serves as the foundational data from which the video will be decoded and streamed. The quality and characteristics of the final video output are directly influenced by the quality of the latent samples provided.
vae
The VAE (Variational Autoencoder) is a required input that aids in the decoding process of the latent samples. It ensures that the video is reconstructed accurately from the latent space, maintaining the integrity and quality of the original content.
filename_prefix
This string parameter specifies the prefix for the output video file's name. By default, it is set to "H3_X2_Stream/video". This allows you to organize and identify output files easily, especially when processing multiple videos.
fps
The frames per second (fps) parameter determines the playback speed of the video. It is a float value with a default of 24.0, and it can range from 1.0 to 120.0. Adjusting this value affects the smoothness and temporal resolution of the video playback.
nvenc_gpu
This integer parameter specifies the GPU device index used for encoding via FFmpeg/NVENC. The default value is 0, with a range from 0 to 31. This is particularly useful in multi-GPU systems where you need to specify which GPU to utilize for encoding tasks.
cq
The constant quality (cq) parameter is an integer that controls the quality of the video encoding, with a default value of 18. It ranges from 0 to 51, where lower values result in higher quality and larger file sizes, while higher values produce lower quality and smaller file sizes.
fp16_accumulation
This boolean parameter, defaulting to True, determines whether to use FP16 accumulation during processing. Enabling this can improve performance on supported hardware by reducing computational load, though it may slightly affect precision.
audio
This optional parameter allows you to include an audio track in the video. If provided, it will be encoded alongside the video, adding an auditory dimension to the output.
H3 X2 Decode + Stream Save Output Parameters:
(none)
This node does not produce any direct outputs. Its primary function is to save the processed video to a file, as specified by the input parameters.
H3 X2 Decode + Stream Save Usage Tips:
- Ensure that the
samplesandvaeinputs are correctly configured to match the expected formats, as this will directly impact the quality of the video output. - Adjust the
fpsparameter to match the desired playback speed of your video, keeping in mind that higher frame rates may require more processing power. - Use the
nvenc_gpuparameter to specify the appropriate GPU for encoding, especially in systems with multiple GPUs, to optimize performance. - Experiment with the
cqparameter to find the right balance between video quality and file size for your specific needs.
H3 X2 Decode + Stream Save Common Errors and Solutions:
Unexpected H3 finalized chunk shape/dtype
- Explanation: This error occurs when the shape or data type of the input samples does not match the expected format.
- Solution: Verify that the input samples are correctly formatted and that the batch size, channels, and data type align with the node's requirements.
Incomplete decode: <written>/<total> frames
- Explanation: This error indicates that not all frames were successfully decoded and written to the output.
- Solution: Check the input data for completeness and ensure that the processing was not interrupted. Re-run the node if necessary.
This PyTorch lacks allow_fp16_accumulation
- Explanation: The node attempted to use FP16 accumulation, but the current PyTorch version does not support it.
- Solution: Either disable the
fp16_accumulationoption or update to a PyTorch version that supports this feature.
