Handle ffmpeg binary missing from PATH in generate_video - #1
Open
somebox wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a
FileNotFoundErrorhandler togenerate_videoinsrc/imageloop/job.py.Why
ffmpeg-pythonshells out to theffmpegbinary via subprocess. The current code handles:ImportError— theffmpeg-pythonPython package is not installedffmpeg.Error— ffmpeg ran but returned an error…but it does not handle the case where
ffmpeg-pythonis installed but theffmpegbinary is missing fromPATH. In that caseffmpeg.run()raises an uncaughtFileNotFoundError. 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 thegemini-flash-imagemodel key togemini) is obsolete — the gemini model is now keyed asnano-bananainsrc/imageloop/settings.pyafter the refactor into a package, so the rename is moot and was dropped.Test plan
ffmpeg-pythoninstalled butffmpegbinary not onPATH, run a generation that reachesgenerate_videoand confirm the friendly message prints instead of a traceback.