[MPlayer-dev-eng] A strange A-V sync problem of MPlayer-1.0-pre5 ported on ARM920

Ed Wildgoose lists at wildgooses.com
Wed Sep 22 15:35:17 CEST 2004


Xu Guangyi wrote:

>Hi all:
>     I have just finished a porting of MPlayer-1.0pre5 on Motorola DragonBall MX1 ADS ,the MPU is ARM920 core, with arm-linux-2.4.18 as kernel.
>     I use libmad build for ARM-optimize as the MP3 decode, and ffmpeg's libavcodec as the video decoder.
> 
>     But, When I use the command like this to play a MP3 file on my board: 
> "$mplayer testMP3.mp3 "
>     the sound I hear from my speaker was so fast than normal speed...
>     but when I add "-quiet" after it, the speed is OK.
>     Why ??  the '-quiet' argument is so strange that the speed of MP3 play will "obey it" ????
>


Hi, it sounds like your audio driver is possibly stuck at the wrong
rate. Mplayer basically sends the audio to the soundcard as fast as the
card wants it (assuming that the card is doing the rate that was
requested), and then we display the video frame after every X audio
samples have been consumed.

This algorithm means that the video is always shows in sync with the
audio even if the audio speed is slightly adrift from the real rate
(which is common with audio cards). In your case you seem to have an
audio card which is waaaayyy off and hence the whole thing rockets through.

(Oh, and --quiet removes the audio and the video is then clocked based
on the PC clock not the audio rate, hence it works again)

Put some debugging statements in the audio driver around the attempt to
change sample rate. Also, note the rates of the files which work and
which don't work. Your MP3 might be 44Khz, for example and the AVI at
48Khz. The audio card might be locked at 48Khz only, hence your problem.
You can work around this by adding "-srate 48000" to your command line

Hope that gives you some ideas

Ed W




More information about the MPlayer-dev-eng mailing list