[Libav-user] 答复: How can i encode s16/s16p to acc

He Lei helei0908 at hotmail.com
Sat Dec 24 08:33:08 EET 2016


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:bowljoman at gmail.com>
发送时间: 2016年12月24日 7:38
收件人: This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter.<mailto:libav-user at ffmpeg.org>
主题: 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
Libav-user at ffmpeg.org<mailto:Libav-user at ffmpeg.org>
http://ffmpeg.org/mailman/listinfo/libav-user


use a sound wave resampler context from s16 to fltp at the same khz.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20161224/12b9c9d7/attachment.html>


More information about the Libav-user mailing list