(This is not a direct answer to your question), but if you have several files to convert, you can try something like this: (put your script.py in the same folder)
import os import subprocess fileList = os.listdir("path") for name in fileList: command = 'ffmpeg -i' + ' ' + str(name) +' '+'-f mp3'+' '+ str(name)+'.mp3' p = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) output = p.communicate()[0]
Note the variable COMMAND
source share