[vlc-devel] isom ctts
davidf+nntp at woaf.net
Wed Oct 29 00:44:03 CET 2008
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 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. Whereas if it were done properly,
it would be a non issue)
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
More information about the vlc-devel