Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Custom FFmpeg Path Support for FFMPEG Backend #142

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HemantKArya
Copy link

@HemantKArya HemantKArya commented Mar 4, 2024

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 variables PATH.
So now it is compatible with both with ffmpeg_path and without it both at the same time.

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