From ConShell
Jump to navigation Jump to search


In late 2006 I came across a server application called mt-daapd. Despite the terrible name, the app looked promising as a way to stream music files (namely .mp3 and .ogg) from my home music library to iTunes, Amarok and so on.

Soon it was revealed that mt-daapd was reborn as Firefly Media Server and was in part supported by Roku (which makes the Soundbridge lines of wireless network audio receivers). By the time christmas rolled around I found myself the lucky possessor of the M1000 unit.

Update (2007-Nov-27): I am now the proud maintainer of the mt-daapd (Firefly) port on FreeBSD. Update (2009-Mar-21): Use the newer audio/firefly port on FreeBSD instead of audio-mt-daapd which is now deprecated.


The main configuration file is /etc/mt-daapd.conf

I make the following changes from defaults:

mp3_dir = /share2/music
extensions = .mp3,.m4a,.m4p,.ogg,.url
scan_type = 1
rescan_interval = 1800 <-- agressive, so be it
debuglevel = 5  <-- for some wordy logs
process_m3u = 1 <-- this ensures the Soundbridge get's playlists, might handy

Web Access

To access the firefly server using a browser, hit http://turing:3689/ (my server is running on the host named turing).

The password is set in /etc/mt-daapd.conf (mt-daapd by default). No username is req'd. To ensure configuration can be updated using the browser, make sure the perms on /etc/mt-daapd.conf are setup correctly, e.g. writable by the nobody user


I made the decision a long time ago to use Ogg Vorbis format for ripping my music because of the better compression vs. mp3 and also variable bitrate encoding (VBR). Support for .ogg format is hit-n-miss but luckily firefly offers the ability to to transcoding to mp3 format from ogg, flac. This is wonderful as it allows my other family members who use iTunes to enjoy the music stored in .ogg format without having direct support. To properly support ogg -> wav transcoding, ensure the following:

  • extensions in the configuration must contain .ogg
  • mt-daapd must have been built (compiled) with --enable-oggvorbis flag
  • ssc_codectypes in configuration must list ogg
  • ssc_prog in configuration must point to valid script to perform the transcoding (e.g. /usr/bin/

Note that I also had to adjust some paths in (it needs WAVSTREAMER, OGGDEC at a minimum)


So you can see it also supports FLAC format.

Streaming playlist (Internet Radio)

My next endeavour was to be able to play Internet radio stations. The M1000 supports a handful of preselected stations out of the box, but we get crappy reception for some local stations where I live, including KEXP, KPLU and so forth. This procedure is documented somewhat in the Firefly wiki and forum, but I'll recount the steps here for future use.

1. Turn on m3u processing. This is the flag shown above. 1a. Add .url to the filetypes above. 2. Create a file /share2/music/iradio/kexp.m3u


3. Create the /share2/music/iradio/kexp-128.url file

128,KEXP Radio,

Note, the URL in the file above gleaned from the website.

4. Restart mt-daapd and use the 'Browse Playlists' function from the M1000 to see the kexp listing, followed with KEXP Radio


FreeBSD specifics

added requirement os /usr/local/include/vorbis/codec.h: to BUILD_DEPENDS

/etc/rc.conf: 108 lines, 3650 characters.
root@franco:/usr/ports/audio/firefly>/usr/local/etc/rc.d/mt-daapd start
Starting firefly.
plugins/plugin_dir not specified

See some hints about building for FBSD 7

Basically the fix is to link to

mdf@franco:/usr/local/lib/mt-daapd/plugins>ln -s

(added some time later)... while your at it, create similar links for the other two libraries. Here is what my plugins folder looks like.

root@franco:/usr/local/lib/mt-daapd/plugins>ls -al *\.so
lrwxrwxr-x  1 root  wheel  18 Sep 23 21:48 ->
lrwxr-xr-x  1 root  wheel  13 Sep 21 14:07 ->
lrwxrwxr-x  1 root  wheel  20 Sep 23 21:50 ->

Now I get a new error...

008-09-21 14:07:54 (08101100): Opening database
2008-09-21 14:07:54 (08101100): Error opening db: No backend database support fo
r type: sqlite

root@franco:/usr/local/lib/mt-daapd/plugins>ldd /usr/local/sbin/mt-daapd
/usr/local/sbin/mt-daapd: => /usr/local/lib/ (0x280dc000) => /lib/ (0x281d1000) => /usr/local/lib/ (0x281e4000) => /lib/ (0x281f7000) => /usr/local/lib/ (0x28209000) => /usr/local/lib/ (0x2826d000) => /usr/local/lib/ (0x28275000) => /usr/local/lib/ (0x2829d000) => /lib/ (0x282d6000) => /usr/local/lib/ (0x282eb000) => /lib/ (0x282f0000)

Solution: use --enable-sqlite and make sure libsqlite2 is installed. This is taken care of by the firefly port.