[Libav-user] programmatic frame rate control?
Ulrich Teichert
ulrich.teichert at axiontech.de
Fri Dec 23 09:33:53 EET 2016
Hi,
> I’m studying this right now:
> http://stackoverflow.com/search?q=libav+pts+dts
>
> The top result looks promising. Getting timecodes right look like a challenge...
This highly depends on your video source. For instance, some cameras are setting proper
presentation time stamps in their streams, most don't. In encoded files the timestamps
are somewhat better, I believe.
My solution was to have an external clock source, as Eric Lee has suggested already:
> > On Dec 22, 2016, at 10:13 AM, Eric Lee <erclee2 at gmail.com> wrote:
> >
> > You could try using an external timer and parameters from the AVFrame
> and AVCodecContext such as pts, duration, and framerate to control the
> presentation of decoded frames.
.. but when you don't have presentation time stamps in you frames, or you can't rely
on them, you can try to compute how "long" a frame you have decoded should be
shown on the screen, which normally leads to non-perfect video, as this may totally
differ from the proper presentation time for the frame.
HTH,
Uli
Ulrich Teichert
Diplominformatiker
Resarch & Development
Axion Technologies GmbH
Oderstr. 47
24539 Neumünster
Germany
Phone: + 49- (0) 4321-75455-0
Fax: + 49- (0) 4321-75455-10
E-Mail: ulrich.teichert at axiontech.de
Web: www.axiontech.de
Geschäftsführer: Avi Zisman, Carl Cassista, Claus Bjerno
Amtsgericht Kiel, HRB 1612 NM
StNr.:2029810446 Ust.-ID-Nr.: DE201063418
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
FOCON/Axion Technologies GmbH will be closed for Christmas Holidays from December 24th to January 1st, both days included.
More information about the Libav-user
mailing list