[Libav-user] How to treat pts using ffmpeg libs

Rafael Lúcio rafael at inova.in
Wed Mar 11 15:40:00 CET 2015


Im having some hard time figuring out where to find about this..

Im building a simple recorder to learn about this video compression
universe and Im facing some weird behaviors..

Before all I need to explain the scenario...

Its very simple... everytime I call av_read_frame( input_context,
input_packet )  I save the pts into the last_pts variable...

So...

Whats bothering me is the fact that about 10% of my calls to av_read_frame
I get
input_packet.pts > last_pts

Resulting in a error message from the encoder when I try to do it...
Having it in mind I decided to just drop those frames when it happens....

I think it is not a good idea to just drop frames because if I get them,
its needed somehow...

So... what to do when last_pts > current_pts ?

-- 
-----------------------------------------------------------------
Rafael Lúcio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20150311/2a52f226/attachment.html>


More information about the Libav-user mailing list