[FFmpeg-devel] [PATCH] lavf/ape: Fix last packet duration calculation

Michael Niedermayer michaelni at gmx.at
Mon Aug 27 06:26:34 CEST 2012


On Sun, Aug 26, 2012 at 10:28:25AM +0000, Paul B Mahol wrote:
> On 8/26/12, Paul B Mahol <onemda at gmail.com> wrote:
> > On 8/25/12, Michael Niedermayer <michaelni at gmx.at> wrote:
> [...]
> >> this causes a significant slowdown on slow media, as much more data
> >> will be read in the hope to find a valid PTS (that will not be found
> >> before EOF or max_analyze_duration)
> >
> > That is because of extremly big superframes in ape, I really doubt there
> > is real slowdown with this patch, because avformat reads whole packet
> > anyway.
> >>
> >> you can see this with -v 99
> >> with pts:
> >> All info found
> >> File position after avformat_find_stream_info() is 134672
> >>
> >> without pts:
> >> max_analyze_duration 5000000 reached at 5015510
> >> File position after avformat_find_stream_info() is 1048576
> >>
> >
> > I think this is unrelated bug, current packet duration caclulation is
> > wrong with ape.

fixing the duration is fine


> >
> > It have many frames in single packet and this does not work correctly at
> > all.
> 
> And I doubt that using ape on such slow media works at all.

I sadly dont have a gigabyte sized APE file
The largest ape file i have on my disk is 2mb

Before the patch:
Statistics: 274792 bytes read, 3 seeks

After the patch:
Statistics: 2073952 bytes read, 9 seeks

With just the duration fix:
Statistics: 274792 bytes read, 3 seeks

testing the timing via http:
time ./ffprobe https://ffmpeg.org/trac/ffmpeg/raw-attachment/ticket/452/SideA-small.ape
with PTS:
real    0m0.657s

without PTS:
real    0m3.103s

This is a normal internet connection via a cable modem and not some
slow 3G stuff

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120827/1c09836f/attachment.asc>


More information about the ffmpeg-devel mailing list