[MPlayer-dev-eng] Smooth sync w/ network audio (and broken audio drivers!)
Sidik Isani
lksi at cfht.hawaii.edu
Fri Sep 20 11:49:34 CEST 2002
Hello -
I like the way mplayer synchronizes the video presentation to audio.
It works very well with my "es1371" OSS drivers, and not as well
with some of the other drivers... it's right to say these drivers
just need to be finished to accurately support measuring how much
sound is still in the pipeline. But what do we do in a case where
there is naturally a lot of jitter on this measurement that cannot
be helped? Take a look at xntpd ... it manages to very accurately
synchronize the system clock to other clocks far away on the network.
I'm not suggesting we implement something like xntpd in mplayer, ...
The basic concept is just one of _sampling_ and _averaging_.
I may just have re-invented a bit shorter version of -dapsync here
(but -dapsync didn't work for me). Mine's only a few lines and it
averages the corrections to the frame delay which "Arpi's A/V sync"
effectively applies. It makes all of the movies I've tested play
as smoothly as they do with -nosound ... even with broken audio drivers,
and at *no penalty to the good audio drivers*, ... and even with
network audio (which is really what motivated me to explore this
method.) A/V remains perfectly in sync because the averaging has
the effect of gently slewing the frame rate when the delay gets off
instead of making an instant correction based on a noisy measurement.
The patch is very simple, but I want to test it a bit more because
there must have been endless debates on A/V sync before, and I
want to make sure I nail it ;-) Three different sync models would
be too much. I guess there are still people out there who think
they need -dapsync? Maybe they could help me test my patch to see
if it solves their problem as well as or better than -dapsync?
Be seeing you,
- Sidik
More information about the MPlayer-dev-eng
mailing list