MikeyP.com MikeyP.com

MPlayer silent/stdout Patch

As the kitchen sink of media players (along with Xine and VLC), MPlayer could be the ultimate audio helper app on Linux, as it can convert from nearly any media format to any other format. But unfortunately, because it has no true "silent" output option and can't stream to stdout, it can't be used as a practical helper app in shell scripts.

Fortunately, Adrian on the SlimServer developer list created a patch for MPlayer that allows MPlayer to stream PCM audio to stdout, a key requirement for me to use it as a helper app in a Whole-House Music Storage server. The patch allows MPlayer to stream audio from any input format to stdout in PCM WAV format, which is supported by practically every audio device and software.

Adrian's patch works against an older CVS build of MPlayer, so I updated it slightly to work against the official MPlayer-1.0pre6a release.

Here's the patch: mplayer-s.patch

As with Adrian's original patch, this adds two new command line options to MPlayer:

'-silent' suppresses all text output
'-aofile -' sends pcm output to stdout when used with -ao pcm

(Sneak peek at future blog entry: using this patch and some other killer software, I now have iTunes on Windows playing WMA Lossless files streamed from my Linux box!)

Read more stories like this one...