{"record":{"id":"8224c169738ebb37","repo":"sgl-project/sglang","slug":"minimax-h3-audio-material-has-no-usable-channel-co","errorCode":null,"errorMessage":"MiniMax H3 audio material has no usable channel count","messagePattern":"MiniMax H3 audio material has no usable channel count","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/material_io.py","lineNumber":456,"sourceCode":"            raise ValueError(\"MiniMax H3 video material has no positive dimensions\")\n        fps = _parse_frame_rate(stream.get(\"avg_frame_rate\")) or _parse_frame_rate(\n            stream.get(\"r_frame_rate\")\n        )\n        if fps <= 0:\n            raise ValueError(\"MiniMax H3 video material has no usable frame rate\")\n        if primary_video is None:\n            primary_video = stream\n\n    for stream in audio_streams:\n        try:\n            sample_rate = int(stream.get(\"sample_rate\") or 0)\n            channels = int(stream.get(\"channels\") or 0)\n        except (TypeError, ValueError) as exc:\n            raise ValueError(\"MiniMax H3 audio material has invalid metadata\") from exc\n        if sample_rate <= 0:\n            raise ValueError(\"MiniMax H3 audio material has no usable sample rate\")\n        if channels <= 0:\n            raise ValueError(\"MiniMax H3 audio material has no usable channel count\")\n\n    durations: list[float] = []\n    for value in [\n        (payload.get(\"format\") or {}).get(\"duration\"),\n        *(stream.get(\"duration\") for stream in streams),\n    ]:\n        if value in {None, \"\", \"N/A\"}:\n            continue\n        try:\n            duration = float(value)\n        except (TypeError, ValueError):\n            continue\n        if math.isfinite(duration) and duration > 0:\n            durations.append(duration)\n    if not durations:\n        raise ValueError(\"MiniMax H3 media material has no positive duration\")\n\n    duration_seconds = max(durations)","sourceCodeStart":438,"sourceCodeEnd":474,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/material_io.py#L438-L474","documentation":"An audio stream's channel count parsed but is <= 0 (field missing or 0). A positive channel count is required.","triggerScenarios":"Audio streams where ffprobe reports channels as absent or 0 — malformed stream headers or unusual channel layouts.","commonSituations":"Corrupt audio tracks, raw PCM streams without channel metadata, or files from broken encoders.","solutions":["Re-encode with explicit channels: ffmpeg -i in.wav -ac 2 out.wav","Inspect ffprobe -show_streams for the channels field","Replace or re-mux the material"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"assert all(int(s.get(\"channels\") or 0) > 0 for s in audio_streams)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Re-encode audio with explicit -ac 2"],"tags":["minimax-h3","channels","ffprobe","audio"],"backgroundTag":"invalid-media-metadata","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}