c语言开源库lame实现pcm转aac

作者: ttdiOS | 来源:发表于2017-09-01 11:01 被阅读235次

c语言开源库lame实现pcm转aac

之前一直想用ffmpeg实现pcm转aac,经过尝试后提示pcm文件不支持,有编译的带mp3lame的ffmpeg结果还是不行,于是就转变方法用了mp3lame这个库去单独实现pcm转aac

编译mp3lame的脚本:https://github.com/wuqiong/mp3lame-for-iOS

##Usage:

just runs the commands in the shell:

git clone https://github.com/wuqiong/mp3lame-for-iOS.git

cd mp3lame-for-iOS

./build-lame-framework.sh

编译后是这样的:

lame.framework

后直接将lame.framework拖拽到自己的工程里

导入#import<lame/lame.h>

贴出demo:

工程demo:https://github.com/mrzhao12/mp3lame

使用了iOS自带的AVFoundation-AVAudioRecorder录音pcm,然后用mp3lame将pcm转aac,最后AVFoundation-AVAudioPlayer播放转码后的mp3音频,工程demo:https://github.com/mrzhao12/AVAudioRecorde_lame_pcm_aac

更多资源学习交流群:群号:224110749

相关文章

网友评论

    本文标题:c语言开源库lame实现pcm转aac

    本文链接:https://www.haomeiwen.com/subject/qhphjxtx.html