Enhancement: Custom FFmpeg Path Support for FFMPEG Backend #142
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.
This pull request enhances the audioread library by introducing custom FFmpeg path support for the FFMPEG backend. With this enhancement, users can specify a custom path to the FFmpeg executable, enabling greater flexibility and compatibility across different systems.
Key Changes:
Added functionality to specify a custom path to the FFmpeg executable for the FFMPEG backend.
Improved compatibility by handling platform-specific differences in FFmpeg executable paths (e.g., .exe extension on Windows).
Example use with change:
with audioread.audio_open(os.path.realpath(path), backends=backends,ffmpeg_path=ffmpeg_path) as input_file: sr_native = input_file.samplerate n_channels = input_file.channels
We can ignore the
ffmpeg_path
argument if doesn't have custom ffmpeg path, cause it will detect it from environment variablesPATH
.So now it is compatible with both with
ffmpeg_path
and without it both at the same time.