[vlc-devel] isom ctts

Laurent Aimar fenrir at via.ecp.fr
Wed Oct 29 09:21:47 CET 2008


On Tue, Oct 28, 2008, David Flynn wrote:
> On 2008-10-28, Laurent Aimar <fenrir at via.ecp.fr> wrote:
> > On Tue, Oct 28, 2008, David Flynn wrote:
> >> >  I do not thing it is a problem (for example .mp4 specs does work like this).
> >> 
> >> btw, mp4 screwed up as well (see -ve ctts).
> >
> > MPEG4 ISO does not allow negative DTS inside mp4
> 
> ISOM defines the initial DT(0) to be zero (dt(n) is constructed from the
> stts table)
> 
> stts is a table containing offsets to apply to the dt(n) values to end up
> with CT(n).  Unfortunately, because they've normalized DT(0) = 0, any
> stream with reordering, can't produce a CT of zero.  (however, for the
> audio stream it is).  So you end up with the same old a/v sync fault and
> you have to work around it in a really horrible way (ie, other things
> need to be aware of the codec reordering delay in order to move the
> entire stream along the timeline.
 Of course not, that would be insane.
 You need to use edit list entry (edts/elst), simple and clean.

>  Whereas if it were done properly,
> it would be a non issue)
Using edit list entry works.

> In ISOM, sample_offset is unsigned -- so the above problem occurs.
> 
> In quictime, sample_offset is signed.
> 
> You *will* encounter mp4 files with signed sample_offset.  From when i
> last spoke to apple about it, there may be a move afoot to relax the
> restriction in isom/mp4, because it is broken by design and causes
> issues.
 Well having negative DTS strikes me as an ugly workaround to avoid
edit list.

-- 
fenrir




More information about the vlc-devel mailing list