I am trying to convert a test.mp4 file to test.wav from python code using avconv. I am able to convert the test.mp4 to test.wmv using cmd line but when i run the same command from python its giving me following error :
line 103, in get_message_audio subprocess.call(cmdline) FileNotFoundError: [WinError 2] The system cannot find the file specified
The code i am using from python file is :
cmdline = ['avconv', '-i', 'test.mp4', '-vn', '-f', 'wav', 'test.wav']
subprocess.call(cmdline)
But when i run the same command from cmd it successfully runs and save the test.wav file.
cmd line = avconv -i test.mp4 -f wav test.wav
Note: I have added avconv to system variable. The python file and test.mp4 is in the same directory. I am running the cmd from the same directory as well.