{"record":{"id":"14a824663b597f27","repo":"sgl-project/sglang","slug":"minimax-h3-audio-material-has-no-usable-sample-rat","errorCode":null,"errorMessage":"MiniMax H3 audio material has no usable sample rate","messagePattern":"MiniMax H3 audio material has no usable sample rate","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":454,"sourceCode":"            ) from exc\n        if width <= 0 or height <= 0:\n            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\")","sourceCodeStart":436,"sourceCodeEnd":472,"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#L436-L472","documentation":"An audio stream's sample_rate parsed but is <= 0 (typically 0 because the field was missing/None). The pipeline needs a positive sample rate for audio materials.","triggerScenarios":"Audio streams where ffprobe omits sample_rate or reports 0 — some raw/ADPCM streams or container-muxed audio without a header.","commonSituations":"PCM-in-MOV without rate metadata, streams produced by experimental muxers, or truncated audio tracks.","solutions":["Re-encode the audio with explicit rate: ffmpeg -i in.wav -ar 44100 out.wav","Fix at the producing side so the audio header carries sample_rate","Validate sample_rate > 0 via ffprobe before submission"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"assert all(int(s.get(\"sample_rate\") or 0) > 0 for s in audio_streams)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Re-encode audio with explicit -ar 44100"],"tags":["minimax-h3","sample-rate","ffprobe","audio"],"backgroundTag":"invalid-media-metadata","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}