[MPlayer-dev-eng] Strange behavior with audio delayed video files

Dan Oscarsson Dan.Oscarsson at tieto.com
Fri Feb 21 09:53:01 CET 2014


fre 2014-02-21 klockan 09:03 +0100 skrev Reimar Döffinger:

> >>>> So, is the first playback with immediate audio a MPlayer bug?
> >>
> >>> MPlayer always plays audio right from the start.
> >>> I guess you could call that a bug, [...]
> >>
> >>I would do so, if audio timestamps say that it should play only later.
> >
> >That is a feature that is rarely used, and in general rarely useful,
> >and in some ways misguided since silence audio packets cost little and
> >for many formats could be easily prepended.
> >Thus a quite frequent cause of "timestamps say" is broken initial
> >timestamps. Ignoring them allows them to "change their mind", if you
> >just wait you won't even discover that.
> 
> 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

In my patched mplayer I have used this for many years without problem. I
have one movie where the sound starts 13 seconds after video and it
plays without problems. Though there might be media where where
interleaving results in much buffering, but all modern systems has so
much memory that that should normally not be a problem.

> b) there is a semantic question that starts to matter for long delays:
> is delayed audio the same as extra silence? If you play an audio file
> before, should it end when video starts or when audio starts? What if
> desktop sounds are set to disable when MPlayer plays, should they be
> disabled during the delay time?

I would assume that when I start to play a movie, any video or audio
change in the system should occur at first audio or video sample as that
is the moment the movie starts for me. It does not matter if first video
frame is 10 seconds after audio starts or the other way around.
If I have configured my system to block all audio if a video is started,
I would expect audio to be blocked even when I play a video without any
audio at all.

   Dan



More information about the MPlayer-dev-eng mailing list