sgl-project/sglang · error · ValueError

MiniMax H3 audio material has no audio stream

Error message

MiniMax H3 audio material has no audio stream

What it means

The MiniMax H3 audio material contains no audio stream. Re-encode the file with an audio track.

Solutions

  1. Set condition_type to 'video' if no audio is intended
  2. Add a silent audio track: ffmpeg -i in.mp4 -f lavfi -i anullsrc -shortest -c:v copy out.mp4
  3. Verify with ffprobe that an audio stream exists
Defensive patterns

Strategy: validation

Validate before calling

has_audio = any(s.get("codec_type") == "audio" for s in streams)
assert condition_type not in {"audio", "video_audio"} or has_audio

Prevention

When it happens

Trigger: A silent/muted video re-muxed without an audio track but labeled 'video_audio', or a data file labeled 'audio'.

Common situations: Muted screen recordings, video stripped of audio during transcoding (-an flag), or wrong condition_type in the request.

Related errors


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

Appendix: source

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

        "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:
            raise ValueError("MiniMax H3 video material has no usable frame rate")
        if primary_video is None:

View on GitHub (pinned to 0132848349)