I have been trying to convert mp3 audio to wav file using subprocess. I have installed ffmpeg and libav using home-brew. However whenever I run my code.
import subprocess
subprocess.call(['ffmpeg', '-i', 'input.mp3',
'output.wav'])
I get this error
FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg': 'ffmpeg'
- I have tried to use pydub but always get ffprobe errors
- I have tried using os.system alternatively
For reference I am using macOS Mojave, python 3.7
Edit:
Instead of using ['ffmpeg', '-i', 'input.mp3', 'output.wav']
Use ['path/to/ffmpeg', '-i', 'input.mp3', 'output.wav']
Ways to find the path to ffmpeg-----------------------
Unix(Linux, Mac): find ffmpeg
Windows: Where ffmpeg