[FFmpeg-user] libavcodec aac encoding with AV_SAMPLE_FMT_FLT

Roger Pack rogerdpack2 at gmail.com
Fri Aug 31 15:11:01 CEST 2012


> I am using libavcodec within a cpp project. Basically the program runs
> without any problem, as long as i can use AV_SAMPLE_FMT_S16 for the audio
> encoding part.
> Now when it comes to aac, the aac codec only supports the FLT Sample format
> and here comes the problem: at S16, the frame_size of the audio codec is
> automatically set to bitrate/framerate.
> At 8000 Samples/sec input this means for S16 a framesize of 320. (dec)
> The initial frame_size for AV_SAMPLE_FMT_FLT a framesize of 1024.
> I tried setting the framesize to 320, but this didnt work. So the question
> is: why is the initial framesize of FMT_FLT 1024, i mean 1024 has nothing to
> do with my Sample Rate of 8000, nor with any other known sample rate usually
> used.

I think it's just some default.

> After Resampling the S16 to FLT, the number of samples did not increase, so
> what is the catch here?

You may get more help from the libav-user group.
As a note I recently used the asetnsamples filter to force a specific
sample size, if that helps at all.
Cheers!
-r


More information about the ffmpeg-user mailing list