[Libav-user] Audio frames and resampling

Michael IV explomaster at gmail.com
Wed Mar 14 19:58:00 EET 2018


Thanks for the tip.Will look into it.



On Wed, Mar 14, 2018 at 6:48 PM Gonzalo Garramuño <ggarra13 at gmail.com>
wrote:

>
>
> El 14/03/18 a las 09:03, Michael IV escribió:
> > Hi.I have the following case:
> > I am receiving audio stream which consist
> >  of 2 channel float 32 (non planar) audio frames. Then I am trying to
> > convert those into
> > AV_SAMPLE_FMT_FLTP in order to encode with AAC codec. The problem is
> > that I receive that data as packets of size different from what my
> > AVFrame has. AVFrame for
> > this codec has 2 buffers,each 1024 samples,which is 4096 bytes per
> > channel (32bit sample size),right? So it looks like I have to fill the
> > frame with all 4096 bytes before pushing it into encoder?Is it
> > possible to submit 'custom' frames,with different amount of data from
> > what I am getting in codec context?
>
> No.  You need to buffer the data.  Look at the av_audio_fifo* set of
> functions for a simple way of doing it.
>
> --
> Gonzalo Garramuño
>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20180314/a9b2dbdd/attachment.html>


More information about the Libav-user mailing list