sgl-project/sglang · error · ValueError
MiniMax H3 video material has no positive dimensions
Error message
MiniMax H3 video material has no positive dimensions
What it means
A video stream parsed successfully but reported width <= 0 or height <= 0, so the pipeline cannot compute geometry for it.
Source
Thrown at python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/material_io.py:438
raise ValueError("MiniMax H3 media container format is not allowed")
video_streams = [s for s in streams if s.get("codec_type") == "video"]
audio_streams = [s for s in streams if s.get("codec_type") == "audio"]
if condition_type in {"video", "video_audio"} and not video_streams:
raise ValueError("MiniMax H3 video material has no video stream")
if condition_type in {"audio", "video_audio"} and not audio_streams:
raise ValueError("MiniMax H3 audio material has no audio stream")
primary_video: dict[str, Any] | None = None
for stream in video_streams:
try:
width = int(stream.get("width") or 0)
height = int(stream.get("height") or 0)
except (TypeError, ValueError) as exc:
raise ValueError(
"MiniMax H3 video material has invalid dimensions"
) from exc
if width <= 0 or height <= 0:
raise ValueError("MiniMax H3 video material has no positive dimensions")
fps = _parse_frame_rate(stream.get("avg_frame_rate")) or _parse_frame_rate(
stream.get("r_frame_rate")
)
if fps <= 0:
raise ValueError("MiniMax H3 video material has no usable frame rate")
if primary_video is None:
primary_video = stream
for stream in audio_streams:
try:
sample_rate = int(stream.get("sample_rate") or 0)
channels = int(stream.get("channels") or 0)
except (TypeError, ValueError) as exc:
raise ValueError("MiniMax H3 audio material has invalid metadata") from exc
if sample_rate <= 0:
raise ValueError("MiniMax H3 audio material has no usable sample rate")
if channels <= 0:
raise ValueError("MiniMax H3 audio material has no usable channel count")View on GitHub (pinned to 0132848349)
Solutions
- Re-encode keeping only the real video track: ffmpeg -map 0:v:0 -i in.mp4 -c:v libx264 out.mp4
- Remove attached-picture streams from the file
- Validate with ffprobe that every video stream has positive width/height
Defensive patterns
Strategy: validation
Validate before calling
assert all(int(s.get("width") or 0) > 0 and int(s.get("height") or 0) > 0 for s in video_streams) Prevention
- Strip attached-picture/cover streams before submission
- Re-encode user uploads
When it happens
Trigger: Video streams with missing dimension fields (int(stream.get('width') or 0) yields 0), e.g. attached pictures, subtitle/data streams misclassified, or streams with unset dimensions.
Common situations: Album-art video streams in audio files, cover-art mjpeg streams, or corrupt encodes.
Related errors
- MiniMax H3 video material has invalid dimensions
- MiniMax H3 media material is invalid
- MiniMax H3 video material has no video stream
- MiniMax H3 audio material has no audio stream
- MiniMax H3 video material has no usable frame rate
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/c608fe3d0241f0fe.
Report an issue: GitHub.