Skip to content

Handle ffmpeg binary missing from PATH in generate_video - #1

Open
somebox wants to merge 1 commit into
mainfrom
feature/ffmpeg-binary-not-found-handling
Open

Handle ffmpeg binary missing from PATH in generate_video#1
somebox wants to merge 1 commit into
mainfrom
feature/ffmpeg-binary-not-found-handling

Conversation

@somebox

@somebox somebox commented Jul 19, 2026

Copy link
Copy Markdown
Owner

What

Adds a FileNotFoundError handler to generate_video in src/imageloop/job.py.

Why

ffmpeg-python shells out to the ffmpeg binary via subprocess. The current code handles:

  • ImportError — the ffmpeg-python Python package is not installed
  • ffmpeg.Error — ffmpeg ran but returned an error

…but it does not handle the case where ffmpeg-python is installed but the ffmpeg binary is missing from PATH. In that case ffmpeg.run() raises an uncaught FileNotFoundError. This adds a dedicated branch with install instructions (apt / brew / download).

Origin

Salvaged from an old local stash (rename gemini key + ffmpeg error handling). The other half of that stash (renaming the gemini-flash-image model key to gemini) is obsolete — the gemini model is now keyed as nano-banana in src/imageloop/settings.py after the refactor into a package, so the rename is moot and was dropped.

Test plan

  • With ffmpeg-python installed but ffmpeg binary not on PATH, run a generation that reaches generate_video and confirm the friendly message prints instead of a traceback.

ffmpeg-python shells out to the ffmpeg binary; if it is installed as a
Python package but the ffmpeg binary is not on PATH, ffmpeg.run() raises
FileNotFoundError, which was previously uncaught. Add a dedicated handler
with install instructions (apt/brew/download) before the ffmpeg.Error
branch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant