<div dir="ltr"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div>Hi Denis,</div><div><br></div><div>When encoding you want to fill your AVFrame with the raw audio data. </div><div>You need to initialize AVFrame and set a buffer size. </div><div>Then you need to fill it's buffer with that size of data.</div><div>You can split your own input buffer manually to fill AVFrame's buffer and then encode it (avcodec_send_frame) frame by frame.</div><div dir="ltr"><br></div><div dir="ltr">Best Regards,<div><br></div><div>Attila</div></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 6 May 2020 at 15:56, Denis Gottardello <<a href="mailto:info@denisgottardello.it">info@denisgottardello.it</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>
<div style="font-family:"Noto Sans";font-size:10pt;font-weight:400;font-style:normal">
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">Hi, I'm studying the encode_audio.c example.</p>
<p style="margin:0px;text-indent:0px">I have a buffer</p>
<p style="margin:0px;text-indent:0px"><span style="color:rgb(128,128,0)">const</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">uchar</span>*<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">data</span>,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">Length</span></p>
<p style="margin:0px;text-indent:0px">that represent a stereo audio source in 44100, can someone suggest me how to fill an AVFrame or AVPacket?</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px"><br>-- </p>
<p style="margin:0px;text-indent:0px">+39.347.4070897</p>
<p style="margin:0px;text-indent:0px"><a href="http://www.labcsp.com" target="_blank"><span style="text-decoration:underline;color:rgb(41,128,185)">http://www.labcsp.com</span></a></p>
<p style="margin:0px;text-indent:0px"><a href="http://www.denisgottardello.it" target="_blank"><span style="text-decoration:underline;color:rgb(41,128,185)">http://www.denisgottardello.it</span></a></p>
<p style="margin:0px;text-indent:0px">GMT+1</p>
<p style="margin:0px;text-indent:0px">Skype: mrdebug</p></div>_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="https://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">https://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br>
To unsubscribe, visit link above, or email<br>
<a href="mailto:libav-user-request@ffmpeg.org" target="_blank">libav-user-request@ffmpeg.org</a> with subject "unsubscribe".</blockquote></div>