On 2012-11-26 10:46:27 +0100, Janne Grunau wrote:
> On 2012-11-25 23:10:26 +0000, Måns Rullgård wrote:
> > Janne Grunau <janne-li...@jannau.net> writes:
> > 
> > > Although sample count and delta are in ISO 14496-12 specified as
> > > unsigned files exists were interpreting it as signed integer makes
> > > more sense (see mp4-negative-stts-problem.mp4).
> > 
> > Can someone _please_ explain how a negative duration can ever many any
> > sense at all?  Or count, if that's the one that's causing problems.
> 
> It looks as if the video frames in mp4-negative-stts-problem.mp4 are
> stored in presentation order and the negative stts sample duration is
> required to deduce the dts correctly. WTF!

-ENOTENOUGHCOFFEE, strike that.

It's actually the audio stream, which I completely missed due to a
stray -an in the command line. The file seems to be produced by camera.
There are unfortunately no hints of brand or model in the metadata.

It looks like ithere is a bug in the stts writing code:

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2c476a0]  0: sample_count=2, sample_duration=1023
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2c476a0]  1: sample_count=1, sample_duration=2362
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2c476a0]  2: sample_count=2, sample_duration=1023
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2c476a0]  3: sample_count=1, sample_duration=157
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2c476a0]  4: sample_count=3, sample_duration=1023
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2c476a0]  5: sample_count=1, sample_duration=1338
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2c476a0]  6: sample_count=2, sample_duration=1023
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2c476a0]  7: sample_count=1, sample_duration=2362
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2c476a0]  8: sample_count=3, sample_duration=1023
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2c476a0]  9: sample_count=1, sample_duration=-866
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2c476a0] 10: sample_count=2, sample_duration=1023
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2c476a0] 11: sample_count=1, sample_duration=2362
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2c476a0] 12: sample_count=3, sample_duration=1023
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2c476a0] 13: sample_count=1, sample_duration=-866
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2c476a0] 14: sample_count=2, sample_duration=1023
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2c476a0] 15: sample_count=1, sample_duration=2362
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2c476a0] 16: sample_count=2, sample_duration=1023

The sample duration is only used to deduce dts which is still
monotonically increasing.

Janne
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to