[Libav-user] Reducing the Frame-Rate of a Network Video Stream

Alex Cohn alexcohn at netvision.net.il
Tue Jul 30 12:37:16 CEST 2013


On Tue, Jul 30, 2013 at 10:20 AM, Adi Shavit <adishavit at gmail.com> wrote:
>>
>> Then you don't need avfilter, IMHO. When you receive a decoded frame
>> from avcodec, simply check if the last frame was received more than 40
>> ms ago.
>>
>
> Actually, I'm not sure how to do this for the following reason:
>
> I prefer to decode and process frames even before they would have been
> displayed in normal "playing-time".
> Thus, ideally I'd get ALL frames (encoded) before they should actually
> be displayed, and maybe wait for another chunk later.
> In this case checking the time delay between frames will actually drop
> more frames than I need (since I got a whole bunch ahead of time), or
> force me to decode in real play-time, both things I'd like to avoid.
>
> Adi

Well, when I wrote "40 ms ago" I actually mean 40 ms after the
previous frame. Often, you can use PTS for that measurement. But it
may also be not bad to register time of arrival of each frame, and
base your processing strategy on these timestamps.

Regards,
Alex


More information about the Libav-user mailing list