[Libav-user] Audio buffer to AVFrame

Attila Kr├╝pl krupl.attila at gmail.com
Wed May 6 17:18:29 EEST 2020


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,

Attila


On Wed, 6 May 2020 at 15:56, Denis Gottardello <info at denisgottardello.it>
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?
>
>
>
>
> --
>
> +39.347.4070897
>
> http://www.labcsp.com
>
> http://www.denisgottardello.it
>
> GMT+1
>
> Skype: mrdebug
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/libav-user
>
> To unsubscribe, visit link above, or email
> libav-user-request at ffmpeg.org with subject "unsubscribe".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20200506/b172d786/attachment.html>


More information about the Libav-user mailing list