sgl-project/sglang · error · ValueError

MiniMax H3 video material has no video stream

Error message

MiniMax H3 video material has no video stream

What it means

The MiniMax H3 video material contains no video stream. Re-encode the file with a video track.

Solutions

  1. Fix condition_type to 'audio' if the material is audio-only
  2. Re-encode the source ensuring a video stream exists: ffmpeg -i in.mp4 -c:v libx264 out.mp4
  3. Validate with ffprobe -show_streams before submitting
Defensive patterns

Strategy: validation

Validate before calling

import subprocess, json
streams = json.loads(subprocess.check_output(["ffprobe", "-v", "error", "-show_streams", "-of", "json", path]))["streams"]
has_video = any(s.get("codec_type") == "video" for s in streams)
assert condition_type not in {"video", "video_audio"} or has_video

Prevention

When it happens

Trigger: An audio-only file (mp3/wav) labeled as condition_type 'video' or 'video_audio', or a video file whose video stream is corrupt and dropped by ffprobe.

Common situations: Mismatched condition_type vs actual content in generated requests; cover-art-only MP3s; recordings where video track failed.

Related errors


AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28). Data as JSON: /api/errors/fca015da68f69668. Report an issue: GitHub.

Appendix: source

Thrown at python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/material_io.py:424

        "mov",
        "mp4",
        "m4a",
        "3gp",
        "3g2",
        "mj2",
        "matroska",
        "webm",
        "wav",
        "mp3",
        "flac",
        "ogg",
    }
    if not format_names or not format_names.issubset(allowed_formats):
        raise ValueError("MiniMax H3 media container format is not allowed")
    video_streams = [s for s in streams if s.get("codec_type") == "video"]
    audio_streams = [s for s in streams if s.get("codec_type") == "audio"]
    if condition_type in {"video", "video_audio"} and not video_streams:
        raise ValueError("MiniMax H3 video material has no video stream")
    if condition_type in {"audio", "video_audio"} and not audio_streams:
        raise ValueError("MiniMax H3 audio material has no audio stream")

    primary_video: dict[str, Any] | None = None
    for stream in video_streams:
        try:
            width = int(stream.get("width") or 0)
            height = int(stream.get("height") or 0)
        except (TypeError, ValueError) as exc:
            raise ValueError(
                "MiniMax H3 video material has invalid dimensions"
            ) from exc
        if width <= 0 or height <= 0:
            raise ValueError("MiniMax H3 video material has no positive dimensions")
        fps = _parse_frame_rate(stream.get("avg_frame_rate")) or _parse_frame_rate(
            stream.get("r_frame_rate")
        )
        if fps <= 0:

View on GitHub (pinned to 0132848349)