2.4. Audio output devices

2.4.1. Audio/Video synchronization

Linux sound card drivers have compatibility problems. This is because MPlayer relies on an in-built feature of properly coded sound drivers that enable them to maintain correct audio/video sync. Regrettably, some driver authors don't take the care to code this feature since it is not needed for playing MP3s or sound effects.

Other media players like aviplay or xine possibly work out-of-the-box with these drivers because they use "simple" methods with internal timing. Measuring showed that their methods are not as efficient as MPlayer's.

Using MPlayer with a properly written audio driver will never result in A/V desyncs related to the audio, except only with very badly created files (check the man page for workarounds).

If you happen to have a bad audio driver, try the -autosync option, it should sort out your problems. See the man page for detailed information.

2.4.2. Troubleshooting

Some notes:

If you have ALSA version 0.5, then you almost always have to use -ao alsa5, since ALSA 0.5 has buggy OSS emulation code, and will crash MPlayer with a message like this:

DEMUXER: Too many (945 in 8390980 bytes) video packets in the buffer!

If the sound clicks when playing from CD-ROM, turn on IRQ unmasking as described in the CD-ROM section.