babysor/MockingBird · critical · RuntimeError
ffmpeg not found in PATH.
Error message
ffmpeg not found in PATH.
What it means
RuntimeError raised by ensure_ffmpeg when shutil.which('ffmpeg') returns None, i.e. the ffmpeg binary is not on PATH. render_timeline requires ffmpeg for all normalization and mixing, so this is a hard startup check.
Source
Thrown at skills/speak/scripts/render_timeline.py:123
for key, seg_cfg in config.get("segments", {}).items():
lo, hi = parse_segment_key(key)
if lo <= index <= hi:
merged.update(seg_cfg)
return merged
# ── ffmpeg helpers ────────────────────────────────────────────────────
def _run_ff(cmd: List[str]) -> None:
proc = subprocess.run(cmd, capture_output=True, text=True)
if proc.returncode != 0:
raise RuntimeError(f"ffmpeg failed: {' '.join(cmd)}\n{proc.stderr}")
def ensure_ffmpeg() -> None:
if not shutil.which("ffmpeg"):
raise RuntimeError("ffmpeg not found in PATH.")
def probe_duration_ms(path: Path) -> float:
proc = subprocess.run(
[
"ffprobe", "-v", "error", "-show_entries", "format=duration",
"-of", "default=noprint_wrappers=1:nokey=1", str(path),
],
capture_output=True, text=True,
)
if proc.returncode != 0:
raise RuntimeError(f"ffprobe failed on {path}: {proc.stderr}")
return float(proc.stdout.strip()) * 1000
def normalize_duration_pad_trim(inp: Path, outp: Path, target_ms: int) -> None:
"""Pad short audio then trim to exact target duration (Noiz backend)."""
sec = target_ms / 1000.0View on GitHub (pinned to 28dc5e14f1)
Solutions
- Install ffmpeg: brew install ffmpeg / apt-get install ffmpeg / use a static build
- Verify with: ffmpeg -version
- If installed but not found, add its directory to PATH or invoke the script from a shell with the correct profile loaded
Example fix
# before (missing) # after apt-get update && apt-get install -y ffmpeg # Debian/Ubuntu brew install ffmpeg # macOS
Defensive patterns
Strategy: validation
Validate before calling
import shutil
if not shutil.which('ffmpeg'):
sys.exit('Install ffmpeg first: apt-get install ffmpeg') Prevention
- Install ffmpeg in base images/CI
- Add a startup dependency check
- Document the binary requirement
When it happens
Trigger: Running the script on a machine/container without ffmpeg installed, in a venv whose PATH shadows the binary, or in a minimal Docker image.
Common situations: Fresh macOS/Linux without brew/apt install, slim Docker images, CI runners, or SSH sessions with a minimal PATH.
Related errors
- kokoro-tts CLI not found.
- Package 'webrtcvad' not found. This package enables noise re
- Reference audio not found: {reference_audio}
- ffmpeg failed: {' '.join(cmd)}\n{proc.stderr}
- reference_audio not found: {ref}
AI-assisted analysis of babysor/MockingBird@28dc5e14f1 (2026-08-27).
Data as JSON: /api/errors/82b8fbe5c6640469.
Report an issue: GitHub.