[Ffmpeg-devel] Re: [PATCH] PKT_FLAG_B

Michael Niedermayer michaelni
Mon Jul 31 19:10:37 CEST 2006


Hi

On Mon, Jul 31, 2006 at 05:48:25PM +0200, Baptiste Coudurier wrote:
> Hi
> 
> Uoti Urpala wrote:
> > On Mon, 2006-07-31 at 17:25 +0200, Baptiste Coudurier wrote:
> >> Uoti Urpala wrote:
> >>> If the mov stts atom is supposed to represent dts in the sense "the pts
> >>> of the output frame (if any) that the decoder will output when fed this
> >>> input frame, assuming standard buffering behavior in the decoder" then
> >>> you need to create separate ctts atoms when the decoder will delay the
> >>> stream, even if there are only P frames. You can determine this by
> >>> checking whether pts != dts for any of the frames. If you're currently
> >>> doing this then I think the behavior is most likely correct.
> >>>
> >>> If it's OK to omit separate ctts atoms as long as pts are monotonous (I
> >>> doubt this is the intended semantics) then you can check directly for
> >>> that condition.
> >> Can you read mov/mp4/3gp specs, please ?
> > 
> > No, I don't intend to read all of them. Some spec I looked at seemed to
> > support the first alternative. Do you have reason to believe that
> > something in the specs would mean neither of the alternatives I gave
> > would be appropriate, or that something in them would require PKT_FLAG_B
> > functionality?
> 
> Somehow history has proved me to read the specs before talking, but well...

fully agree here


> 
> I also said I would be really OK for a better alternative and I asked
> you to propose one...

looking at the mov/qt specs i cant find any hits for ctts, do you have 
anything more recent which describes ctts?
my feeling though strongly suggests stts == dts, ctts == pts no matter
what frame type

14496-1: ------------
ISO/IEC 14496 composition time (CT) and decoding time (DT) are derived  from
the Time to Sample Atoms of which there are two types.   The  decoding  time
is derived in the Decoding Time to Sample Atom decoding time deltas  between
successive decoding  times.   The  composition  times  are  derived  in  the
Composition Time to Sample Atom as composition time  offsets  from  decoding
time.  If the composition times and decoding times are identical  for  every
sample in the  track,  then  only  the  Decoding  Time  to  Sample  Atom  is
required.
---------------------

so for .mp4 ctts==pts and stts==dts no matter which frame type

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list