Friday, December 30, 2005

Using The New MPlayer With ALSA Support

New versions of the Linux mplayer can now play RealMedia files in addition to the various DVD and Windows audio and video streams. As an added bonus, mplayer can be built to use ALSA ---(note that default RPMs available on the Web still default to OSS as of December 2006). This, with the additional support for newer RealMedia formats has finally caused me to switch away from trplayer a---a command line RealPlayer that was built against RealPlayer 8.0

Note that building mplayer from source to include ALSA support, and locating all the codecs you need will require a few Google searches. Specifically, to play NPR streams, you will need to grab avisynth.dll from the SourceForge project of the same name. But once this is done, mplayer will happily play multiple streams of audio without requiring multichannel support from the sound card. For Emacspeak users this means that you get auditory icons, and more importantly software TTS while listening to audio streams.

To use software TTS while mplayer is playing audio streams requires that you use a TTS server that uses ALSA; the default Emacspeak servers still use OSS. To build a TTS server for IBM ViaVoice TTS, obtain Emacspeak sources from CVS, and follow the instructions in file servers/linux-outloud/ALSA.

As of a few weeks ago, The Emacspeak CVS repository has been updated so that all access to streaming media goes through mplayer by default. Make sure to configure your mplayer with a smaller cache size if you use it exclusively for streaming audio; by default it uses a rather large cache, and streaming realaudio often takes a long time to start before the cache is configured to be something smaller; I use a cache size of 64kb on my laptop.