[Ffmpeg-devel] Possible bug in reading PTS/DTS

Michel Bardiaux mbardiaux
Mon Apr 23 15:31:18 CEST 2007

Michael Niedermayer wrote:
> Hi
> On Mon, Apr 23, 2007 at 12:20:17PM +0200, Michel Bardiaux wrote:
>> Luca Abeni wrote:
>>> Hi Michel,
>>> Michel Bardiaux wrote:
>>> [...]
>>>>> (If the problem really is in the user application, I can prepare and 
>>>>> send a patch fixing ffmpeg.c and ffserver.c)
>>>>> Or maybe the problem is in my (mis)understanding of this issue?
>>>> I'm not sure the problem is in decoding. I find it rather strange that 
>>>> the first frame, which is a keyframe, does not have PTS=DTS.
>>> I do not know... I see that for containers that store both PTS and DTS, 
>>> ffmpeg generally generates
>>> DTS = PTS - frame period
>>> for video (I am not using B frames, to simplify the testing). Is this 
>>> wrong? If yes, then I think there is something to fix in the encoding / 
>>> muxing side.
>> I think so too. My reading of the spec is that in the absence of 
>> B-frames, the DTS are not even necessary; I'm afraid there is something 
>> very wrong in the MPEG muxer. 
> nonsense, dts==pts for mpeg1/2/4 b frames _always_ and pts>dts for i/p frames
> unless the stream is low delay but this is rare
You're right, I have been using LOW_DELAY in my code for so long I had 
forgotten it was there. Preliminary question: I take it you dont 
recommended that?

Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles

More information about the ffmpeg-devel mailing list