MiniMax H3 Trim Source AV to 17k+5:
MiniMaxH3TrimSourceAV prepares source video for a MiniMax H3 workflow by removing trailing frames until the remaining sequence has the largest valid 17k+5 frame count available from the source. This is a trim, not a conversion: it does not pad or resize frames. When synchronized audio is available, the node also trims it to the duration of the retained video at H3’s fixed 24 frames per second (fps). This helps you keep the video and audio aligned while seeing exactly how much source material was removed.
MiniMax H3 Trim Source AV to 17k+5 Input Parameters:
frames
Required IMAGE input containing your source video as a batch of frames in [T,H,W,C] order: frame count, height, width, and color channels. The node uses the frame count to find the largest valid H3 17k+5 length, then drops frames from the end; it does not change the size of the frames it keeps. The input must have four dimensions and at least three color channels, or the node raises a validation error. No minimum or maximum frame count, default value, or selectable options are specified in the provided interface. The behavior when the source has too few frames to produce a valid length depends on a helper whose implementation was not provided.
audio
Optional AUDIO input for sound synchronized with the source video. When connected, it is trimmed to the duration of the retained frames at 24 fps, so removing video frames also shortens the corresponding audio. If the source audio is shorter than that duration, the node reports the shortfall and does not add silence. With no audio connected, the node reports that no audio was supplied. No minimum, maximum, default audio value, or selectable options are specified in the provided interface.
MiniMax H3 Trim Source AV to 17k+5 Output Parameters:
trimmed_frames
IMAGE output containing the retained frame batch. It consists of the beginning of the source sequence through the calculated H3 length; any removed frames come from the end. The node does not pad or resize these frames.
trimmed_audio
AUDIO output containing the connected audio trimmed to the retained video’s duration at 24 fps. If the supplied audio is shorter, it remains short rather than being extended with silence. If no audio was connected, the source code returns None for this output.
h3_length
INT output giving the number of frames in trimmed_frames. Use it to check the resulting sequence length or pass that count to a later step that needs it. The count is calculated from the supplied frame batch using the node’s H3 frame-count helper.
trim_info
STRING output summarizing the operation in readable text. It reports the original and retained frame counts, how many frames were dropped, and the retained video duration at 24 fps. It also states whether audio was connected; when audio is present, it reports actual versus target sample counts and the sample rate, including a warning if the source audio was too short.
MiniMax H3 Trim Source AV to 17k+5 Usage Tips:
- Connect a video frame batch to
framesand checktrim_infobefore using the result. It tells you how many trailing frames were removed, so you can confirm that the retained duration suits your project. - Connect
audioonly when it belongs to the same source sequence and is already synchronized with those frames. The node trims by the retained video duration; it does not establish synchronization between unrelated sources. - Plan duration using 24 fps. For example, a retained count of 29 frames represents approximately 1.208 seconds at the rate used by this node.
- Use
h3_lengthwhen a downstream step needs the actual retained frame count, rather than assuming the original batch length was preserved. - If
trim_infosays the source audio was shorter, supply a longer synchronized recording when you need sound throughout the retained video. This node does not fill the missing portion with silence.
MiniMax H3 Trim Source AV to 17k+5 Common Errors and Solutions:
H3 AV Trim expects ComfyUI IMAGE frames [T,H,W,C], got [...]
- Explanation: This is the explicit validation error in the provided source. It occurs when
framesis not a four-dimensional frame batch or has fewer than three color channels. The bracketed values show the shape received. - Solution: Connect a ComfyUI
IMAGEframe batch arranged as frames, height, width, and channels. Ensure the frames have at least three color channels. A single image or a tensor in a different dimension order will not satisfy this check.
Source audio was shorter; no silence was added
- Explanation: This text can appear in
trim_info; it is a status warning, not an exception. The audio contains fewer samples than the target duration calculated from the retained frames. - Solution: Supply synchronized audio that covers the full retained video duration if you need continuous sound. Otherwise, account for the shorter audio in later workflow steps.
No audio connected
- Explanation: This text in
trim_infomeans the optionalaudioinput was left unconnected. It is not an error, andtrimmed_audiois returned asNone. - Solution: Connect the matching source audio if you need an audio result. If you only need video, you can leave the input unconnected.
More trailing frames were dropped than expected
- Explanation: This is a result to check in
trim_info, not a stated error message. The node always selects the largest valid H317k+5frame count available from the supplied batch, so the output may be shorter than your original sequence. - Solution: Compare the original and retained counts in
trim_info. Supply a source batch with enough frames for your intended valid length, and useh3_lengthas the authoritative count after trimming.
