{"record":{"id":"a80da80684170d78","repo":"sgl-project/sglang","slug":"minimax-h3-media-material-is-invalid","errorCode":null,"errorMessage":"MiniMax H3 media material is invalid","messagePattern":"MiniMax H3 media material is invalid","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":399,"sourceCode":"            raise ValueError(\n                \"MiniMax H3 image material has no positive display geometry\"\n            )\n        return {\n            \"condition_type\": \"image\",\n            \"coded_width\": int(coded_width),\n            \"coded_height\": int(coded_height),\n            \"display_width\": int(width),\n            \"display_height\": int(height),\n            \"image_format\": image_format,\n            \"exif_transposed\": (coded_width, coded_height) != (width, height),\n        }\n\n    if condition_type not in {\"audio\", \"video\", \"video_audio\"}:\n        raise ValueError(f\"unsupported MiniMax H3 condition type {condition_type!r}\")\n    try:\n        payload = _ffprobe_media(path)\n    except Exception as exc:\n        raise ValueError(\"MiniMax H3 media material is invalid\") from exc\n\n    streams = payload.get(\"streams\") or []\n    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\",","sourceCodeStart":381,"sourceCodeEnd":417,"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#L381-L417","documentation":"Running ffprobe on the media material failed (ffprobe not found, non-zero exit, unparseable output). The library wraps any exception from _ffprobe_media into this error.","triggerScenarios":"condition_type is audio/video/video_audio and ffprobe is missing from PATH, times out, or the file is not a media container ffprobe can read.","commonSituations":"Container/image without ffmpeg installed, PATH not including ffmpeg's bin dir in the serving environment, or a corrupt/non-media file passed as audio/video material.","solutions":["Verify ffprobe is installed and on PATH: ffprobe -version","If corrupt, re-encode or re-fetch the media file","In Docker images, add ffmpeg (apt-get install -y ffmpeg)"],"exampleFix":"# Dockerfile\n# before\nFROM python:3.12-slim\n# after\nFROM python:3.12-slim\nRUN apt-get update && apt-get install -y --no-install-recommends ffmpeg","handlingStrategy":"try-catch","validationCode":"import shutil, subprocess\nassert shutil.which(\"ffprobe\"), \"ffprobe not on PATH\"\nsubprocess.run([\"ffprobe\", \"-v\", \"error\", path], check=True)","typeGuard":null,"tryCatchPattern":"try:\n    minimax_h3_localize_material_uri(uri)\nexcept ValueError as e:\n    if \"media material is invalid\" in str(e):\n        log_ffprobe_env(); raise","preventionTips":["Install ffmpeg in the serving image and smoke-test ffprobe at startup","Health-check media dependencies before accepting traffic"],"tags":["minimax-h3","ffprobe","ffmpeg-missing","media-validation"],"backgroundTag":"ffprobe-invocation-failed","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}