HKUDS/DeepTutor · error · ManimRenderError
Rendered video duration could not be parsed for visual…
Error message
Rendered video duration could not be parsed for visual review.
What it means
Raised by _probe_duration when ffprobe succeeds but its stdout cannot be parsed as a float duration. Means the container reported no duration entry (e.g. streamed/raw output without format metadata), so frame timestamps for visual review cannot be computed.
Solutions
- Remux or re-encode the video so it carries format duration metadata
- Fall back to a fixed number of evenly spaced frames or a default duration when metadata is absent
- Inspect raw ffprobe output on the file to diagnose the missing 'format=duration' entry
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at deeptutor/agents/math_animator/visual_review.py:116 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of HKUDS/DeepTutor@3e82f13042 (2026-08-27).
Data as JSON: /api/errors/17d8866301bd3721.
Report an issue: GitHub.
Appendix: source
Thrown at deeptutor/agents/math_animator/visual_review.py:116
"-of",
"default=noprint_wrappers=1:nokey=1",
str(video_path),
]
process = await asyncio.create_subprocess_exec(
*command,
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.PIPE,
)
stdout, stderr = await process.communicate()
if process.returncode != 0:
raise ManimRenderError(
"Failed to inspect rendered video duration: "
+ stderr.decode(errors="ignore").strip()
)
try:
return max(float(stdout.decode().strip() or "0"), 0.0)
except ValueError as exc:
raise ManimRenderError(
"Rendered video duration could not be parsed for visual review."
) from exc
@staticmethod
def _choose_timestamps(duration: float) -> list[float]:
if duration <= 0:
return [0.0]
if duration < 2:
return [0.0, min(duration / 2, duration), max(duration - 0.05, 0.0)]
return [
max(duration * 0.15, 0.0),
min(duration * 0.5, duration),
max(duration * 0.85, 0.0),
]
@staticmethod
def _path_to_attachment(path: Path) -> Attachment:
suffix = path.suffix.lower()View on GitHub (pinned to 3e82f13042)