[Libav-user] Reducing the Frame-Rate of a Network Video Stream
adishavit at gmail.com
Wed Aug 7 16:32:12 CEST 2013
I have some questions about extracting the time stamps:
1. Given a packet, I have AVPacket.pts and also AVFrame.pts and
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?
On Tue, Jul 30, 2013 at 1:34 PM, Alex Cohn <alexcohn at netvision.net.il>wrote:
> On Tue, Jul 30, 2013 at 12:35 PM, Adi Shavit <adishavit at gmail.com> wrote:
> > Hi Mike,
> > On Tue, Jul 30, 2013 at 11:13 AM, mikeversteeg <mike at mikeversteeg.com>
> >> 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
> Alex Cohn
> Libav-user mailing list
> Libav-user at ffmpeg.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user