Subsonic streaming server on FreeNAS
Saturday, November 28th, 2009 | Author: Ozzik

Today I decided to share my experience of installing the Subsonic streaming server on FreeNAS.
Why Subsonic? Well, it’s nice looking, it’s free, it can play any format and it uses a web-based player.

Most of the info I took from this post.
Before I start, I wanna mention that I’m using the latest FreeNAS version, which is 0.7, based on FreeBSD 7. This is important, because I don’t know whether lame will work in other versions.

Enable SSH access to your FreeNAS: Web-interface->Services->SSH - enable, allow root.
OK, first you have to install some packages:

$ pkg_add -v -r xtrans
$ pkg_add -v -r xproto
$ pkg_add -v -r xextproto
$ pkg_add -v -r javavmwrapper
$ pkg_add -v -r mac
$ pkg_add -v -r lame
$ pkg_add -v -r flac

I mostly have mp3, flac and ape in my collection, so YMMV if you have other formats - look it up.
Regarding lame, I’m not sure if I installed it this way, because the installation did not go too smooth at first, so I might have used this:

pkg_add -r -v

Then we install java from here. You should choose the jre package according to your CPU architecture and FreeBSD version. Naturally I chose this one, having i386.

Next we install the Java package:

$ pkg_add -v diablo-jre-freebsd7.i386.

watch the version - don’t just copy/paste.

Now we install the Subsonic server itself. Download it from here.

mkdir /var/subsonic
mkdir /var/subsonic/standalone
tar xvzf subsonic-3.8-standalone.tar.gz

* Optionally configure the startup script /var/subsonic/standalone/
In the FreeNAS web interface, go to System > Advanced > Command scripts and add the following script (type: “PostInit”):


Now it’s time for some tweaks. You have to copy some codec files in order for this to work:

cp /usr/local/bin/lame /var/subsonic/standalone/transcode/
cp /usr/local/bin/flac /var/subsonic/standalone/transcode/
cp /usr/local/bin/mac /var/subsonic/standalone/transcode/

Naturally, if you installed some other codecs - do the same for them.

Reboot the FreeNAS and in your browser go to:

Now, for some tweaks from the web-interface.
Go to “Settings”. In “Users” change your password.
In “General” add all of your formats you’ll be playing.
In “Transcoding” you’ll see the execution commands for all kinds of formats. Add yours if you have to. Pay attention, on the right of the line there’s a checkbox for each format that you have to enable. Save and go to “Players”. Choose the right player (web player in my case) and enable the formats for it.

That’s about it for the basic use. You can set a lot of other options later.
The way it works is that it streams the mp3 without any problems to your player, but when you’re playing something other than mp3, it converts it on the fly to mp3 (you can choose the bitrate) and then streams. You won’t feel it while playing, but it pretty much kills the CPU when you’re playing ape, flac and probably some other formats. Of course I have a 1GHz CPU, so if you have the p4 or higher it could be not so bad.

Oh yeah, don’t forget to add your shares:) This is actually great, since my collection is a total mess when it comes to ID3 tags, so playing from shares was exactly what I needed.



VN:F [1.9.6_1107]
Rating: 9.0/10 (1 vote cast)
VN:F [1.9.6_1107]
Rating: 0 (from 0 votes)
Subsonic streaming server on FreeNAS, 9.0 out of 10 based on 1 rating