{"record":{"id":"51e908d3eefea2aa","repo":"sgl-project/sglang","slug":"minimax-h3-media-container-format-is-not-allowed","errorCode":null,"errorMessage":"MiniMax H3 media container format is not allowed","messagePattern":"MiniMax H3 media container format is not allowed","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":420,"sourceCode":"    format_names = set(\n        str((payload.get(\"format\") or {}).get(\"format_name\") or \"\").split(\",\")\n    )\n    allowed_formats = {\n        \"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\")","sourceCodeStart":402,"sourceCodeEnd":438,"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#L402-L438","documentation":"The container format names reported by ffprobe are empty or include a format outside the allowlist (mp4, mov, webm, mkv, avi, and audio containers wav, mp3, flac, ogg). Enforced to guarantee downstream decoders only see supported containers.","triggerScenarios":"A media material in, e.g., FLV, TS, M4A, AIFF, or a container ffprobe can't identify (format_names empty).","commonSituations":"Live-stream captures (MPEG-TS), Apple audio (m4a), or unusual muxings from user uploads hitting the pipeline.","solutions":["Re-mux or re-encode into an allowed container","For audio, prefer wav/mp3/flac/ogg; for video mp4/mov/webm/mkv"],"exampleFix":"# before\nffmpeg -i input.flv -c copy output.flv\n# after\nffmpeg -i input.flv -c:v libx264 -c:a aac output.mp4","handlingStrategy":"validation","validationCode":"import subprocess, json\nout = subprocess.check_output([\"ffprobe\", \"-v\", \"error\", \"-show_format\", \"-of\", \"json\", path])\nnames = set(json.loads(out)[\"format\"][\"format_name\"].split(\",\"))\nallowed = {\"mp4\", \"mov\", \"webm\", \"mkv\", \"avi\", \"wav\", \"mp3\", \"flac\", \"ogg\"}\nassert names and names <= allowed","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Re-mux uploads to mp4/wav at ingest","Keep an allowlist check in your upload API"],"tags":["minimax-h3","container-format","ffmpeg","unsupported-format"],"backgroundTag":"unsupported-media-container","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}