calesthio/OpenMontage · error · ValueError

ffprobe is required to validate local reference audio

Error message

ffprobe is required to validate local reference audio

What it means

Error "ffprobe is required to validate local reference audio" thrown in calesthio/OpenMontage.

Source

Thrown at tools/video/seedance_ark.py:1165

        # Windows does not allow ffprobe to reopen a NamedTemporaryFile while
        # Python still holds the file handle. Close it before probing, then
        # remove it explicitly on every path.
        with tempfile.NamedTemporaryFile(suffix=suffix, delete=False) as temp:
            temp.write(decoded)
            temp.flush()
            temp_path = Path(temp.name)
        try:
            return self._probe_local_audio_duration(temp_path, max_seconds=max_seconds)
        finally:
            temp_path.unlink(missing_ok=True)

    @staticmethod
    def _probe_local_audio_duration(path: Path, *, max_seconds: int = 15) -> float:
        if not path.is_file():
            raise ValueError(f"local audio file does not exist: {path}")
        ffprobe = shutil.which("ffprobe")
        if not ffprobe:
            raise ValueError("ffprobe is required to validate local reference audio")
        try:
            proc = subprocess.run(
                [
                    ffprobe,
                    "-v",
                    "error",
                    "-show_entries",
                    "format=duration",
                    "-of",
                    "default=noprint_wrappers=1:nokey=1",
                    str(path),
                ],
                capture_output=True,
                text=True,
                timeout=10,
                check=False,
            )
            duration = float(proc.stdout.strip()) if proc.returncode == 0 else 0

View on GitHub (pinned to 95e1c3d0ab)

Solutions

  1. Install ffmpeg (which provides ffprobe) via your package manager, e.g. `apt install ffmpeg` or `brew install ffmpeg`.
  2. Or reference the audio by URL/asset ID so no local probing is needed.

When it happens

Trigger: ffprobe is not installed or not on PATH while validating a local reference audio clip.

Common situations: See trigger scenarios.


AI-assisted analysis of calesthio/OpenMontage@95e1c3d0ab (2026-08-15). Data as JSON: /api/errors/5d2219d150ee69a5. Report an issue: GitHub.