Refactor: Extract FFmpeg utilities into separate module #18
+1,406
−395
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.
Extract FFmpeg Utilities into Separate Module
Refactors FFmpeg command construction and execution logic from
monkeyplug.pyinto a dedicatedutilities.pymodule to improve maintainability and testability.Why?
As I added features in my own fork monkeyplug.py grew fairly large. It also allows for a more easily maintainable code base. In order to support both remote whisper servers as well as file chunking, eventually it allows a separation of concerns moving forward.
Ideally this is the ground work for future feature PRs without overwhelming the monkeyplug.py
Changes
FFmpegCommandBuilder,AudioFilterBuilder, andFFmpegRunnerclasses tosrc/monkeyplug/utilities.pytest_utilities.py) and functional tests (test_functional.py)requirements-dev.txtBenefits
Testing