[MPlayer-users] Audio sync issues with -udp-master/slave

F. A. Nnt fannt at web.de
Sun Feb 2 00:06:30 CET 2014


Hello,

(hope I won't double post this since I send the first one when I was not
subscribed to the list)

for a recent project I have to play three different audio files
synchronized to each other on three devices (each Raspberry Pi),
connected by wireless LAN.
After being not very satisfied with my first solution of ntp and
cronjob-synchronized playback, I tried the mplayer-functions -udp-master
and -udp-slave.

I converted the audio files to video with ffmpeg by using a small black
jpg as video input. In mplayer I use -vo null because I don't need the
video. The files seem to work fine in mplayer.

For testing purposes, I used two Raspberry Pis, several video formats
and -ao sdl.
At the beginning it starts with a very low a/v sync error. But sometimes
it crackles, maybe because of a non-optimal wireless-lan-connection
(would also be okay) but the a/v sync error gets higher every time it
cracks. The master is perfectly in a/v sync.

For me the main thing is that the sync between master and slave should
be maximum 300ms.

I also tried -framedrop, -hardframedrop, different -ao, -forceidx, that
did not help a lot. Only when i jump to another position, The sync is
near to perfect again for a while.
with -autosync >0 it sounds like the same difference, but it's not
displayed in the command line anymore.

while playing the same files, only the slave shows that it had to
correct a/v sync, for example with a *.mpg file:
A: 122.1 V: 122.7 A-V: -0.576 ct: 12.176 3046/3046  9%  0%  6.4% 2999 0
or with a *.mp4 file:
A: 163.4 V: 164.3 A-V: -0.835 ct: 16.428   0/  0  1%  0%  7.7% 4041 0

Another thing that I observed is that the udp-slave starts to play after
30s even without udp-master. That does not matter a lot to me, I just
did not read about that behaviour yet so I wonder if it's a bug or a
feature.

How can I set options to have the best possible audio sync?
Is there anything you can recommend to get it work properly?

If the full output of mplayer is needed, please give a note.

Thanks a lot,
Martin


More information about the MPlayer-users mailing list