[MPlayer-dev-eng] [PATCH] A/V sync improvement for TV streams

Laurent laurent.aml at gmail.com
Mon Oct 27 21:57:42 CET 2008


On 10/26/08, Uoti Urpala <uoti.urpala at pp1.inet.fi> wrote:
> On Mon, 2008-10-20 at 19:23 -0400, Laurent wrote:
> > On 10/17/08, Uoti Urpala <uoti.urpala at pp1.inet.fi> wrote:
> > > If the condition is really only temporary then this shouldn't matter;
> > > playing video for a short while based on wallclock time rather than
> > > audio adjustments shouldn't make much difference. If the condition is
> > > not temporary but playback is really proceeding faster than data is
> > > received then this patch at most delays problems for a short period.
> >
> > In fact, when in this state, it happens that mplayer reads 100% of the
> > available audio buffers from the demuxer quite permanently.
> > As a result, the sync routines are never enabled, which causes a permant desync.
>
> If the status is permanent then this is not a good fix. A better simple
> workaround would be to pause playback for a while if there isn't enough
> data.
>
I would rather adjust the playspeed to compensate for the audio drift.
Though, this does not fix the sync issue.

> If you try to keep playing without enough audio you'll eventually get
> audio buffer underruns. Exactly what effect those have depends on the
> audio driver, but it's something that should be avoided.
>

In my case, at start, MPlayer buffers around 1 second of audio.
As the input/output audio drift is really small, it takes tens of
hours to reach a buffer underrun (at least during my tests).
However, during all those hours, MPlayer will loose sync, unless the
EOF issue is fixed.

Thanks,



More information about the MPlayer-dev-eng mailing list