Music Player Daemon w/ lame Support in Debian

Trying to get my old Blackberry to stream from my mpd server, it turns out the built in http stream output is not compiled with lame encoder (mp3) support. Here are some instructions on building the source package with the lame encoder options compiled in for Debian Squeeze (6.0)

(as root)
Install libmp3lame0 and lame from http://debian-multimedia.org/
cd /tmp/
Get the build dependencies for mpd:
apt-get build-dep mpd
Get the mpd source package:
apt-get source mpd 
cd mpd-0.15.12 (your version may differ)
Edit the file debian/rules and remove --disable-lame
Build the binary:
./debian/rules binary
Build the .deb package:

cd .. 
dpkg-source -b mpd-0.15.12
Install the package:

dpkg -i mpd_0.15.12-1.1_amd64.deb
Lock the package in place so that updates won't blow away your change:
echo mpd hold | dpkg --set-selections
That's it! Then you can configure an audio output in /etc/mpd.conf:
audio_output {
        type            "httpd"
        name            "My HTTP Stream"
        encoder         "lame"
        port            "8000"
        quality         "5.0"     
        always_on       "yes"  #This option doesn't seem to work for me :(
}

Comments

Anonymous said…
Thanks Ernesto.
You may want to edit your configuration to set a "bitrate" rather than a "quality".
"quality" is an ogg vorbis option.
Unknown said…
Hi,
thanks for the great info! It was very helpful when I set up my server running squeeze earlier this year.
Today I upgraded to wheezy and came along your blog to compile the new version. I realized lame is enabled by default in mpd 0.16.7-2 so we cam use the provided package.

cheers
shyd

Popular posts from this blog

Dealing with Nested Documents in MongoDB and Talend (aka Baking a Cake)

Add sbin to user PATH in Debian

Batch convert Asterisk GSM WAV files to mp3