1
humiaozuzu 2013-09-13 13:47:49 +08:00
你需要七牛。。。
|
2
sqbing 2013-09-13 13:51:29 +08:00
try ffmpeg
|
4
geew OP @humiaozuzu 七牛是啥
|
5
geew OP 顶上去, 求解答.
话说有人装过pyffmpeg不, 死活装不上啊 |
7
johnnyb 2013-09-15 19:25:14 +08:00
为何要 pyffmpeg,直接调原生 ffmpeg 就好了:
https://github.com/soimort/you-get/blob/master/src/you_get/processor/ffmpeg.py |
8
timonwong 2013-09-15 19:49:23 +08:00
前一阵写过转spx的,给你参考吧,直接调用的是 ffmpeg binary:
https://gist.github.com/timonwong/6570051/raw/3f37034dfbcf38007cae75e2b2d23f12b3c76a35/gistfile1.py |
9
geew OP 不要那么复杂了 这样就行 放到rq执行就是了
def amr2mp3(amr_path, mp3_path=None): """ convert amr to mp3 just amr file to mp3 file """ path, name = os.path.split(amr_path) if name.split('.')[-1] != 'amr': print 'not a amr file' return 0 if mp3_path is None or mp3_path.split('.')[-1] != 'mp3': mp3_path = os.path.join(path, name + '.mp3') error = subprocess.call(['ffmpeg', '-i', amr_path, mp3_path]) if error: logging.error('[Convert Error]:Convert file-%s to mp3 failed' % amr_path) return 0 return mp3_path |
11
humiaozuzu 2013-09-18 16:11:09 +08:00
|