[Libav-user] pts problem

Steffen.Roeber at hella.com Steffen.Roeber at hella.com
Fri Apr 12 12:04:19 CEST 2013

I read many hours to understand pts in libav. But it seems there is no 
common simple way to retrieve.
I used the method from http://dranger.com/ffmpeg/. 

I do something like:
avcodec_decode_video2 (codecContext, frame, &got_picture_ptr, &p);
        uint64 pts = p.dts;
        if(pts == AV_NOPTS_VALUE && frame->opaque)
          pts = *(uint64_t *)frame->opaque;
        if (pts == AV_NOPTS_VALUE)
          pts = 0;

This approach works in some videos. But in my .divx videos I get a pts of 
3 in the first displayable frame., which is confusing for users which work 
on frame level.
So, does anybody know a better approach?

Hella Aglaia Mobile Vision GmbH
Steffen Roeber
Firmware & Tools
Treskowstr. 14, D-13089 Berlin
Amtsgericht Berlin-Charlottenburg HRB 66976 B
Geschäftsführer: Kay Talmi

Fon:  +49 30 200 04 29– 412
Fax:  +49 30 200 04 29– 109
Mail: Steffen.Roeber at hella.com
URL: www.aglaia-gmbh.de

URL: www.mobilevision.de

Dieses Dokument ist vertraulich zu behandeln. Die Weitergabe sowie 
Vervielfältigung, Verwertung und Mitteilung seines Inhalts ist nur mit 
unserer ausdrücklichen Genehmigung gestattet. Alle Rechte vorbehalten, 
insbesondere für den Fall der Schutzrechtsanmeldung.
This document has to be treated confidentially. Its contents are not to be 
passed on, duplicated, exploited or disclosed without our express 
permission. All rights reserved, especially the right to apply for 
protective rights.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20130412/513df156/attachment.html>

More information about the Libav-user mailing list