ffmpeg的转码问题

//ffmpeg的转码问题

如果将pcm数据转码为mp3数据时需要设置

//AVSampleFormat sample_fmt

//即AVCodecContext->sample_fmt

//这个值对于mp3的话要设置为

// AV_SAMPLE_FMT_U8P,         ///< unsigned 8 bits, planar

// AV_SAMPLE_FMT_S16P,        ///< signed 16 bits, planar

// AV_SAMPLE_FMT_S32P,        ///< signed 32 bits, planar

// AV_SAMPLE_FMT_FLTP,        ///< float, planar

// AV_SAMPLE_FMT_DBLP,        ///< double, planar

// 因为ffmpeg的最新版本做了更新 有些编码设置sample_fmt 需要加上

// p属性(平面的意思)


你可能感兴趣的:(ffmpeg的转码问题)