Windows: /watch aborts when App Control blocks ffprobe.exe but allows ffmpeg.exe

Author: vgrosetti-makerCreated Aug 10, 2026Updated Sep 21, 2026

Summary

On Windows, an Application Control (WDAC / Smart App Control) policy can block ffprobe.exe while still allowing ffmpeg.exe from the very same install. When that happens /watch aborts the whole run, even though everything it needs is available through ffmpeg alone.

Environment

  • Windows 11 Home 10.0.26200, PowerShell 5.1 (native, not WSL)
  • ffmpeg 9.0 installed via winget (Gyan.FFmpeg), both binaries in the same directory and both on PATH
  • plugin watch 0.2.0

Symptom

Any /watch invocation that needs metadata dies at the probe step. Running the binary directly reproduces it outside the plugin:

Falha na execução do programa 'ffprobe.exe': Uma política de Controle de
Aplicativo bloqueou este arquivo.

(message is localized, pt-BR here) — surfaced to Python as OSError: [WinError 4551]. ffmpeg.exe, in the same folder, runs fine.

Why the existing checks don't catch it

The guard in frames.py get_metadata() is shutil.which("ffprobe") is None. which() only answers does the file exist and look executable, and the file does exist — the policy denies at execution time, not at lookup time. So the guard passes, the subprocess.run right after it raises OSError, and nothing catches it. setup.py --check reports a healthy install for the same reason.

Two call sites are affected:

  • frames.py → get_metadata() (frame extraction)
  • whisper.py → audio duration before chunking the upload

Both abort instead of degrading.

Suggested direction

Treat "found on PATH" and "actually executable" as two separate facts, and don't let the second one kill the run. Since ffmpeg itself is permitted, everything the probe returns can be recovered from the banner that ffmpeg -hide_banner -i <file> prints on stderr — the Duration: HH:MM:SS.xx line covers both the audio-duration path and the video metadata path. Wrapping the subprocess.run in except OSError and falling back there is enough; a non-zero return code deserves the same fallback.

Verified on a synthetic 7.5s clip: the banner fallback returns exactly 7.5, matching what ffprobe reports on an unblocked machine.

Notes

  • Not a duplicate of #107 / #47 — those are about the .env permission-bit false positive, a different Windows failure.
  • I have this working in a fork and am happy to send it as a PR if you'd rather have the patch than the report.

Source: bradautomates/claude-video