Hey Andy,Thanks for your help.^_^

Doing that can also;

Can I understand like this:
AAC Encoder auto resample is not supported?

And………………………………Merry Christmas ………………………………………

发件人: Andy Shaules<mailto:[email protected]>
发送时间: 2016年12月24日 7:38
收件人: This list is about using libavcodec, libavformat, libavutil, libavdevice 
and libavfilter.<mailto:[email protected]>
主题: Re: [Libav-user] How can i encode s16/s16p to acc

On 12/23/2016 3:53 AM, He Lei wrote:
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!!






_______________________________________________
Libav-user mailing list
[email protected]<mailto:[email protected]>
http://ffmpeg.org/mailman/listinfo/libav-user


use a sound wave resampler context from s16 to fltp at the same khz.
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to