[MPlayer-dev-eng] Strange behavior with audio delayed video files
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Fri Feb 21 20:31:48 CET 2014
On Fri, Feb 21, 2014 at 12:02:04PM +0100, wm4 wrote:
> On Fri, 21 Feb 2014 09:03:08 +0100
> Reimar Döffinger <Reimar.Doeffinger at gmx.de> wrote:
>
> > I forgot a few things:
> > a) delaying audio by more than a few frames or video by more than a few seconds will always cause performance issues. Either through breaking interleaving, through excessive buffering or by delaying highly CPU intensive initialization until the middle of playback. While convenient, that makes it a bad solution technically
>
> The excessive buffering could be avoided by detecting this situation
> (similar to coverart with mp3/id3v2/libavformat), and by starting
> decoding only when an audio packet is actually in reach. In any case,
> the demuxer code already explicitly sets a hard upper limit on packet
> buffering.
You may notice that I mentioned 3 variants you can decide between.
Your suggestion just replaces my point 2 "excessive buffering"
by my point 3 "delaying highly CPU intensive initialization until the
middle of playback".
I cannot see any of these to be generally more desirable than
the other, it depends on the use-case.
More information about the MPlayer-dev-eng
mailing list