I am using the following system command in Python 2.7. I am able to execute the same command in terminal successfully whereas I am not able to run it in python(getting return code = 32512). The command basically converts a mp3 file into a wave file along with stereo to mono conversion. I am able to run the same command in terminal successfully.
Below is the command I'm trying out:
os.system("ffmpeg -i /Users/krish/audio.mp3 -acodec pcm_s16le -ar 16000 -ac 1 /Users/krish/converted_audio.wav")
I also tried using the subprocess command but it gave the same 32512 return code.
Could anyone help me out on what's wrong with this?
ffmpegin your $PATH. It should work if you use the full path to the ffmpeg executable in your command.