Hi, I have some questions about extracting the time stamps:
1. Given a packet, I have AVPacket.pts and also AVFrame.pts and AVFrame.pkt_pts. I noticed that every few frames (about 1 in 3) AVPacket.pts is different from AVFrame.pts and AVFrame.pkt_pts - after avcodec_decode_video2(). Which one should I be using to do fps dropping? How do I access the correct timestamp (is there a function instead of direct access?) and how do I measure the difference in msec? Thanks, Adi On Tue, Jul 30, 2013 at 1:34 PM, Alex Cohn <[email protected]>wrote: > On Tue, Jul 30, 2013 at 12:35 PM, Adi Shavit <[email protected]> wrote: > > Hi Mike, > > > > > > On Tue, Jul 30, 2013 at 11:13 AM, mikeversteeg <[email protected]> > wrote: > >> Check the PTS of each frame and use that to decide whether to throw it > out or > >> not. > > > > Ah, thanks. > > These will give me the play-timestamps, right? > > > >> That way there is no need to decode frames you won't be using. > > Do you mean, no need to PROCESS, not decode. > > Don't I have to decode all frames? > > If I could not-decode (via the decoder) some of the frames that would > > be great and further save cpu. Can I do that, just skip some encoded > > frames? Wouldn't that mess up the following frames? > > > > Thanks, > > Adi > > You must decode all frames, or skip to the next IDR frame, if you want > to avoid artiifacts. Yes PTS is play timestamp. The units may depend > on your stream format, and are generally expressed in terms of the > timebase. > > BR, > Alex Cohn > _______________________________________________ > Libav-user mailing list > [email protected] > http://ffmpeg.org/mailman/listinfo/libav-user >
_______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
