WMA on Linux:
First make sure that you have both FFMpeg and LAME installed. These may come pre-packaged and configured for your particular flavour of Linux, or else they can be compiled from source from the individual projects' websites.
Once you have those installed and are sure they are available in your path, create, or add the following lines to, the convert.conf file:
- usually: /usr/local/squeezecenter/squeezecenter-convert.conf (path is your installation path for slimserver)
- Ubuntu: /etc/squeezecenter/squeezecenter-convert.conf
- Gentoo: /etc/squeezecenter/convert.conf (most of the time this mod is done by default in the ebuild)
Most distributions will not overwrite this file upon upgrades to slimserver.
wma mp3 * * [ffmpeg] -v 0 -i $FILE$ -f wav - | [lame] -x -m s -r -S -q 5 -s 44.1 - -
After doing this, I still was only getting alot of click click click sounds when I played the WMA files. I 'downgraded' my version of ffmpeg and it worked fine after that. Unfortunately I did not keep track of which version worked and which didn't. Keep this in mind if you have similar symptoms.
Lossless WMA is not currently supported on Linux. But it is possible to get it to work, see below.
Alternative with mplayer
I could never make the above method work with mms://-urls. I wrote the following wrapper-script around mplayer instead:
#!/bin/bash FIFO=`mktemp -u` mkfifo $FIFOmplayer $1 -really-quiet -vo null -vc null -ao pcm:fast:file=$FIFO > /tmp/mplayer.out 2>&1 & cat $FIFOrm $FIFO
I named it mplayer-fifo, put it in /usr/local/bin/ and added the following to convert.conf:
wma wav * * [mplayer-fifo] $FILE$
I can now listen to streaming wma via mms://-url on my Squeezebox.
Alternative with mplayer without wrapper
wma wav * * [mplayer] -really-quiet -vc null -vo null -cache 64 -af volume=0,resample=44100:0:1,channels=2 -ao pcm:nowaveheader:file=/dev/fd/4 $FILE$ 4>&1 1>/dev/null
AlienBBC might be required
Getting WMA Lossless working on Linux
With a little bit of effort it's possible to get this to work. We use a combination of the above with an extra plugin for mplayer that allows it to playback WMA lossless. All this is done on SC 7.6, with a SB 3, running on Ubuntu Oneiric Ocelot.
The instructions differ depending on whether you are running Ubuntu 64 bit (amd64) or 32bit (i386). Other architectures will not work with this method.
This is nice and easy, we will be using the provided packages
Start with making sure that mplayer is installed. On Debian/Ubuntu this should be as simple as:
sudo apt-get install mplayer
and answering yes.
We are now going to need to install the Win32 DMO decoder dlls. Again, on Ubuntu 32 bit this is easy, we're going to get them from medibuntu, here:
Add the repository:
sudo wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list && sudo apt-get --quiet update && sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring && sudo apt-get --quiet update
and then just run:
sudo apt-get install w32codecs
This should allow mplayer to playback wma lossless. So go ahead and check. Running:
mplayer -ao null -vo null file.wma
Should result in something that looks like
MPlayer SVN-r29237-4.4.1 (C) 2000-2009 MPlayer Team Playing 01 La Femme d'Argent.wma. ASF file format detected. [asfheader] Audio stream found, -aid 1 Clip info: name: La Femme d'Argent author: Air ========================================================================== Opening audio decoder: [dmo] Win32/DMO decoders AUDIO: 44100 Hz, 2 ch, s16le, 1152.0 kbit/81.63% (ratio: 144000->176400) Selected audio codec: [wma9dmo] afm: dmo (Windows Media Audio 9 DMO) ========================================================================== AO: [null] 44100Hz 2ch s16le (2 bytes per sample) Video: no video Starting playback... A: 10.2 (10.2) of 434.0 (07:14.0) 16.3%
You won't hear anything, as we're using null outputs here, but the presence of the dmo lines should indicate that it works.
A workaround is required. Have a look at the instructions at:
for how to get 32 bit mplayer, and the codecs, onto a 64 bit system.
Both 32 and 64 bit
Next we need to add some lines to:
I went ahead and commented all lines containing wmal so that my mapping was always used, and added:
wmal pcm * * [mplayer] -really-quiet -vc null -vo null -cache 64 -af volume=0,resample=44100:0:1,channels=2 -ao pcm:nowaveheader:file=/dev/fd/4 $FILE$ 4>&1 1>/dev/null
Note that we are using pcm here and now wav as above, for some reason wav didn't work for me. If you're using the above 64 bit instructions the mplayer command will also need to be changed to mplayer32
And that's it, a restart of the server software and everything works :) I'm sure this can be improved, as I don't think things like skipping currently work, but otherwise my entire library of losless WMA is now accessible.