使用 python 和 ffmpeg 转换任何声音文件
from subprocess import check_call
ok = check_call(['ffmpeg','-i','input.mp3','output.wav'])
if ok:
with open('output.wav', 'rb') as f:
wav_file = f.read()
注意:
- http://superuser.com/questions/507386/why-would-i-choose-libav-over-ffmpeg-or-is-there-even-a-difference
- ffmpeg,libav 和 avconv 之间有什么区别和相似之处?