[Libav-user] Audio buffer to AVFrame

Denis Gottardello info at denisgottardello.it
Wed May 6 18:04:43 EEST 2020

Perfect, have you got an example for me or do you know where I can find an example on 
how to fill the buffer of the frame?

In data mercoledì 6 maggio 2020 16:18:29 CEST, Attila Krüpl ha scritto:

Hi Denis,

When encoding you want to fill your AVFrame with the raw audio data. 
You need to initialize AVFrame and set a buffer size. 
Then you need to fill it's buffer with that size of data.
You can split your own input buffer manually to fill AVFrame's buffer and then encode it 
(avcodec_send_frame) frame by frame.

Best Regards,


On Wed, 6 May 2020 at 15:56, Denis Gottardello <info at denisgottardello.it[1]> wrote:

Hi, I'm studying the encode_audio.c example.
I have a buffer
const uchar* data, int Length
that represent a stereo audio source in 44100, can someone suggest me how to fill an 
AVFrame or AVPacket?

Skype: mrdebug
_______________________________________________Libav-user mailing list

Libav-user at ffmpeg.org[4]
libav-user-request at ffmpeg.org[6] with subject "unsubscribe".

Skype: mrdebug

[1] mailto:info at denisgottardello.it
[2] http://www.labcsp.com
[3] http://www.denisgottardello.it
[4] mailto:Libav-user at ffmpeg.org
[5] https://ffmpeg.org/mailman/listinfo/libav-user
[6] mailto:libav-user-request at ffmpeg.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20200506/1b2dfb23/attachment.html>

More information about the Libav-user mailing list