{"record":{"id":"e0172d7162d1303c","repo":"sgl-project/sglang","slug":"minimax-h3-video-material-has-no-usable-frame-rate","errorCode":null,"errorMessage":"MiniMax H3 video material has no usable frame rate","messagePattern":"MiniMax H3 video material has no usable frame 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":443,"sourceCode":"    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:\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),","sourceCodeStart":425,"sourceCodeEnd":461,"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#L425-L461","documentation":"Neither avg_frame_rate nor r_frame_rate of the video stream parsed to a positive FPS (both were 0/0, N/A, or non-positive). Frame rate is required to process video materials.","triggerScenarios":"Streams where ffprobe reports avg_frame_rate '0/0' and r_frame_rate '0/0' — common for single-frame streams, some VFR/concat outputs, and attached pictures.","commonSituations":"Slideshows/exported stills, concat demuxer outputs, streams from some screen recorders.","solutions":["Re-encode forcing a frame rate: ffmpeg -i in.mp4 -r 30 -c:v libx264 out.mp4","If the file is really a single image, submit it as an image material instead","Check ffprobe avg_frame_rate and fix at the producing side"],"exampleFix":"# before\nffmpeg -i slides.mkv -c copy out.mkv   # r_frame_rate 0/0\n# after\nffmpeg -i slides.mkv -r 25 -c:v libx264 out.mp4","handlingStrategy":"validation","validationCode":"def fps_ok(s):\n    num, _, den = str(s.get(\"avg_frame_rate\") or s.get(\"r_frame_rate\") or \"0/0\").partition(\"/\")\n    try:\n        return int(den or 1) != 0 and int(num) / int(den) > 0\n    except (ValueError, ZeroDivisionError):\n        return False\nassert all(fps_ok(s) for s in video_streams)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Re-encode with -r 30 when frame rate metadata is missing","Submit stills as image materials"],"tags":["minimax-h3","frame-rate","ffprobe","video"],"backgroundTag":"invalid-media-metadata","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}