[Libav-user] How can i encode s16/s16p to acc
He Lei
helei0908 at hotmail.com
Fri Dec 23 13:53:26 EET 2016
FFMpeg codes is clone from git, that is version 3.0
I cross Compile to the win32 platform;
And enabled these encoders/decoders:
aac,s16be,s16le,s16be_planar,s16le_planar
Enabled muxers/demuxers:
s16be,s16le,s16be_planar,s16le_planar
None of the other.
But, I found aac encoder only support fltp;
My src:
m_pCodec = avcodec_find_encoder(AV_CODEC_ID_AAC); //only fltp in m_pCodec->sample_fmts
m_pCodecCtx = avcodec_alloc_context3(m_pCodec);
avcodec_get_context_defaults3(m_pCodecCtx, m_pCodec);
m_pCodecCtx->bit_rate = 6400;
m_pCodecCtx->sample_fmt = AV_SAMPLE_FMT_S16S
m_pCodecCtx->sample_rate = 44100;
m_pCodecCtx->channel_layout = AV_CH_LAYOUT_STEREO;
m_pCodecCtx->channels = av_get_channel_layout_nb_channels(m_pCodecCtx->channel_layout);
iRet = avcodec_open2(m_pCodecCtx, m_pCodec, NULL); //return -22!!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20161223/fa211cd9/attachment.html>
More information about the Libav-user
mailing list