[Libav-user] How to foce h264 encoder to duplicate the same frame into the stream?
Aleksei Komarov
abkomarov at gmail.com
Wed May 11 14:23:45 EEST 2022
Hi,
I'm encoding VFR frame sequence to Constant Frame Rate output stream (in
real-time)
E.g. to maintain 60 fps I have to DUPLICATE frames from 30 fps stream (or
any VFR video streams).
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)
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?
I've seen this type of video ( generated by OBS ) where MANY frames were
really duplicated, where pkt_size=48 or lower!
With best regards,
Alex K
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20220511/c197e582/attachment.htm>
More information about the Libav-user
mailing list