<div dir="ltr">Thanks, but the AVFrame is not encoded data. Maybe your idea was to copy the packet data? Than I`ll have to increment dts/pts counters manually in this case... I don't know how... </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">ср, 11 мая 2022 г. в 15:03, Gustav González <<a href="mailto:xtingray@gmail.com">xtingray@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">On Wed, May 11, 2022 at 6:24 AM Aleksei Komarov <<a href="mailto:abkomarov@gmail.com" target="_blank">abkomarov@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div>I'm encoding VFR frame sequence to Constant Frame Rate output stream (in real-time)</div><div>E.g. to maintain 60 fps I have to DUPLICATE frames from 30 fps stream (or any VFR video streams).<br>To do this I`m copying the same frame binary data and feed it to avcodec_receive_packet() once again. (It works but is not optimal)<br>What is the proper way to tell the encoder that the new frame is the same as the last one besides timestamp data (PTS/DTS). In other words how to duplicate last frame in the stream without reencoding the frame again?<br></div><div>I've seen this type of video ( generated by OBS ) where MANY frames were really duplicated, where pkt_size=48 or lower! <br></div></div></blockquote><div><br></div>I'm just shooting in the dark, but what if you don't focus on the AVFrame data but on saving a copy of the AVPacket of the previous frame after it is encoded? In that way, you could avoid calling the whole encoding process again. Just guessing.<br clear="all"></div><br><div dir="ltr"><div dir="ltr"><div>--<br> Gustav Gonzalez<br> <a href="mailto:xtingray@gmail.com" target="_blank">xtingray@gmail.com</a><br><br></div></div></div></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".<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">С уважением Алексей Комаров.<br></div>