[FFmpeg-devel] Bug - MP3 Issues

Brian Brice bbrice
Wed Dec 5 23:44:02 CET 2007


elupus wrote:
> On Tue, 04 Dec 2007 18:29:46 -0600, Brian Brice wrote:
> 
>> Michael Niedermayer wrote:
> ...
>>> [3 quoted lines suppressed]
>> The loss of time in this case (next should be 6952 but is 6892) is when
>> the next audio chunk in the AVI file comes about.  Somehow, the parser's
>> generation of PTS values got ahead of what the AVI demux would return.
>>
>> I did try AVSTREAM_PARSE_FULL and AVSTREAM_PARSE_NONE, but just didn't
>> work unfortunately. :-(
>>
> 
> The issue looks very similar to what happend before
> AVSTREAM_PARSE_TIMESTAMPS was added when decoding ac3 in avi. Looks like
> the bitrate based timestamp correction isn't being applied properly. 
> 
> Could you post the output pts/dts/size/duration of the first packets from
> that avi file, both with standard AVSTREAM_PARSE_TIMESTAMPS and with
> AVSTREAM_PARSE_NONE (you have to edit the avi demuxer to disable it from
> start). 
> 

No problem!  The following is a dump of that information with the AVI
demux using AVSTREAM_PARSE_TIMESTAMPS.  Most of this audio is actually
stored in the first audio chunk.  The part where the PTS values start to
mess up is when the next chunk comes.

audio dts=0 pts=0 duration=316 size=336 [next_pts=316]
audio dts=316 pts=316 duration=316 size=336 [next_pts=632]
audio dts=632 pts=632 duration=316 size=336 [next_pts=948]
audio dts=948 pts=948 duration=316 size=288 [next_pts=1264]
audio dts=1264 pts=1264 duration=316 size=336 [next_pts=1580]
audio dts=1580 pts=1580 duration=316 size=288 [next_pts=1896]
audio dts=1896 pts=1896 duration=316 size=288 [next_pts=2212]
audio dts=2212 pts=2212 duration=316 size=336 [next_pts=2528]
audio dts=2528 pts=2528 duration=316 size=336 [next_pts=2844]
audio dts=2844 pts=2844 duration=316 size=288 [next_pts=3160]
audio dts=3160 pts=3160 duration=316 size=336 [next_pts=3476]
audio dts=3476 pts=3476 duration=316 size=336 [next_pts=3792]
audio dts=3792 pts=3792 duration=316 size=288 [next_pts=4108]
audio dts=4108 pts=4108 duration=316 size=288 [next_pts=4424]
audio dts=4424 pts=4424 duration=316 size=336 [next_pts=4740]
audio dts=4740 pts=4740 duration=316 size=288 [next_pts=5056]
audio dts=5056 pts=5056 duration=316 size=288 [next_pts=5372]
audio dts=5372 pts=5372 duration=316 size=288 [next_pts=5688]
audio dts=5688 pts=5688 duration=316 size=336 [next_pts=6004]
audio dts=6004 pts=6004 duration=316 size=288 [next_pts=6320]
audio dts=6320 pts=6320 duration=316 size=288 [next_pts=6636]
audio dts=6636 pts=6636 duration=316 size=336 [next_pts=6952]
audio dts=6892 pts=6892 duration=316 size=288 [next_pts=7208] *
...


The following is a dump with AVSTREAM_PARSE_NONE in place:

audio dts=0 pts=0 duration=0 size=6573 [next_pts=0] *
audio dts=6573 pts=6573 duration=526 size=526 [next_pts=7099]
audio dts=7099 pts=7099 duration=526 size=526 [next_pts=7625]
audio dts=7625 pts=7625 duration=526 size=526 [next_pts=8151]
audio dts=8151 pts=8151 duration=526 size=526 [next_pts=8677]
audio dts=8677 pts=8677 duration=525 size=525 [next_pts=9202]
audio dts=9202 pts=9202 duration=526 size=526 [next_pts=9728]
audio dts=9728 pts=9728 duration=526 size=526 [next_pts=10254]
...

Of course while trying to decode those packets, massive errors (even a
crash!) happened.


The following is using AVSTREAM_PARSE_FULL, just to be sure:

audio dts=0 pts=0 duration=316 size=336 [next_pts=316]
audio dts=316 pts=316 duration=316 size=336 [next_pts=632]
audio dts=632 pts=632 duration=316 size=336 [next_pts=948]
audio dts=948 pts=948 duration=316 size=288 [next_pts=1264]
audio dts=1264 pts=1264 duration=316 size=336 [next_pts=1580]
audio dts=1580 pts=1580 duration=316 size=288 [next_pts=1896]
audio dts=1896 pts=1896 duration=316 size=288 [next_pts=2212]
audio dts=2212 pts=2212 duration=316 size=336 [next_pts=2528]
audio dts=2528 pts=2528 duration=316 size=336 [next_pts=2844]
audio dts=2844 pts=2844 duration=316 size=288 [next_pts=3160]
audio dts=3160 pts=3160 duration=316 size=336 [next_pts=3476]
audio dts=3476 pts=3476 duration=316 size=336 [next_pts=3792]
audio dts=3792 pts=3792 duration=316 size=288 [next_pts=4108]
audio dts=4108 pts=4108 duration=316 size=288 [next_pts=4424]
audio dts=4424 pts=4424 duration=316 size=336 [next_pts=4740]
audio dts=4740 pts=4740 duration=316 size=288 [next_pts=5056]
audio dts=5056 pts=5056 duration=316 size=288 [next_pts=5372]
audio dts=5372 pts=5372 duration=316 size=288 [next_pts=5688]
audio dts=5688 pts=5688 duration=316 size=336 [next_pts=6004]
audio dts=6004 pts=6004 duration=316 size=288 [next_pts=6320]
audio dts=6320 pts=6320 duration=316 size=288 [next_pts=6636]
audio dts=6636 pts=6636 duration=316 size=336 [next_pts=6952]
audio dts=6573 pts=6573 duration=316 size=288 [next_pts=6889] *

The PTS values near the end is slightly different from the version using
AVSTREAM_PARSE_TIMESTAMPS, but it's still off.


-- 
Brian Brice




More information about the ffmpeg-devel mailing list