{"record":{"id":"fca015da68f69668","repo":"sgl-project/sglang","slug":"minimax-h3-video-material-has-no-video-stream","errorCode":null,"errorMessage":"MiniMax H3 video material has no video stream","messagePattern":"MiniMax H3 video material has no video stream","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":424,"sourceCode":"        \"mov\",\n        \"mp4\",\n        \"m4a\",\n        \"3gp\",\n        \"3g2\",\n        \"mj2\",\n        \"matroska\",\n        \"webm\",\n        \"wav\",\n        \"mp3\",\n        \"flac\",\n        \"ogg\",\n    }\n    if not format_names or not format_names.issubset(allowed_formats):\n        raise ValueError(\"MiniMax H3 media container format is not allowed\")\n    video_streams = [s for s in streams if s.get(\"codec_type\") == \"video\"]\n    audio_streams = [s for s in streams if s.get(\"codec_type\") == \"audio\"]\n    if condition_type in {\"video\", \"video_audio\"} and not video_streams:\n        raise ValueError(\"MiniMax H3 video material has no video stream\")\n    if condition_type in {\"audio\", \"video_audio\"} and not audio_streams:\n        raise ValueError(\"MiniMax H3 audio material has no audio stream\")\n\n    primary_video: dict[str, Any] | None = None\n    for stream in video_streams:\n        try:\n            width = int(stream.get(\"width\") or 0)\n            height = int(stream.get(\"height\") or 0)\n        except (TypeError, ValueError) as exc:\n            raise ValueError(\n                \"MiniMax H3 video material has invalid dimensions\"\n            ) 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:","sourceCodeStart":406,"sourceCodeEnd":442,"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#L406-L442","documentation":"For condition_type video or video_audio, ffprobe found no stream with codec_type == 'video' in the file. The pipeline requires at least one video stream for these types.","triggerScenarios":"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.","commonSituations":"Mismatched condition_type vs actual content in generated requests; cover-art-only MP3s; recordings where video track failed.","solutions":["Fix condition_type to 'audio' if the material is audio-only","Re-encode the source ensuring a video stream exists: ffmpeg -i in.mp4 -c:v libx264 out.mp4","Validate with ffprobe -show_streams before submitting"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import subprocess, json\nstreams = json.loads(subprocess.check_output([\"ffprobe\", \"-v\", \"error\", \"-show_streams\", \"-of\", \"json\", path]))[\"streams\"]\nhas_video = any(s.get(\"codec_type\") == \"video\" for s in streams)\nassert condition_type not in {\"video\", \"video_audio\"} or has_video","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Derive condition_type from actual stream presence, not user input"],"tags":["minimax-h3","video-stream","ffprobe"],"backgroundTag":"missing-media-stream","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}