yansheng.wang

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年7月16日

摘要: MP3帧体的大小由MPEG版本号、比特率、抽样率和填充位4个因素确定。计算公式为:帧大小= ((MPEG版本号== 1?144:72) * 比特率)/抽样率 + 填充位位率为64kbps,采样频率为44.1kHz,padding(帧长调节)为1时,帧长为210字节。位率为128kbps,采样频率为44.1kHz,padding(帧长调节)为0时,帧长为418字节。以下是简单示例:#include <stdio.h> #include <stdlib.h> #include "lame.h" #define BUF_SIZE 512 #define I 阅读全文
posted @ 2012-07-16 18:01 小小程序员001 阅读(1723) 评论(0) 推荐(0) 编辑

摘要: #include <stdio.h> #include <stdlib.h> #include <time.h> #ifdef __cplusplus extern "C" { #endif #include <libavcodec/avcodec.h> #include <libavformat/avformat.h> #ifdef __cplusplus }; #endif uint8_t inbuf[AVCODEC_MAX_AUDIO_FRAME_SIZE * 100]; int main() { // 注册 阅读全文
posted @ 2012-07-16 17:42 小小程序员001 阅读(581) 评论(0) 推荐(0) 编辑