Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

[How To] Install Subsonic 4.8 on FreeNAS 9.1.1

Western Digital Drives - The Preferred Drives of FreeNAS and TrueNAS CORE

the_tox

Member
Joined
Oct 1, 2013
Messages
150
Update 12/25/2013:
I just want to let everyone know that I upgraded to FreeNAS 9.2 via the GUI upgrade process and all is well with Subsonic etc....
Thanks for taking the leap! Downloading 9.2 now...
Also, 4.9beta4 was just released... looks like 4.9 is going to bring some serious changes. Maybe he should just call it 5.0 since the GUI is overhauled as well.
 

the_tox

Member
Joined
Oct 1, 2013
Messages
150
Aaaand 4.9 is out! Who's going to be the brave little guinea pig?
 

anika200

Member
Joined
Mar 18, 2013
Messages
112
will be doing a 9.2 fresh install along with the 4.9 subsonic.. will post results later
Hey I really like that idea, let us know how it goes. If you find any shortcuts etc... can you make note please....
I am going to do an update here (no fresh install) next week (sooner if I can get away from work) and then post an update.
 

DrumNBisco

Junior Member
Joined
Nov 5, 2013
Messages
15
just upgraded from 4.8 to 4.9 on FreeNAS 9.2. So far so good, now I just need to do some testing. My steps were as follows:

1.Backup the /usr/home/sonic/subsonic folder ( i copied mine to my workstation using winscp)
2.kill subsonic.sh, (mine isn't set to startup automatically so I just stopped and started the jail.)
2. download subsonic 4.9 and copy it to jails/subsonic/tmp
3. untar it using the command from the initial install "tar xvzf /tmp/subsonic-4.9-standalone.tar.gz -C /home/sonic/subsonic/standalone"
4. copy over subsonic.properties, subsonic.sh, and the db folder from my backup to the new installation
5. start subsonic with ./subsonic.sh

I was able to log into 4.9 interface and everything else was still there!

If you run into issues, you can roll back to 4.8 by stopping subsonic.sh and copying your backed up subsonic folder.

I referenced this thread regarding what to copy over after the install
http://forum.subsonic.org/forum/viewtopic.php?f=2&t=5941&p=23012&hilit=upgrade standalone#p23012
 

the_tox

Member
Joined
Oct 1, 2013
Messages
150
Just to revisit this thread (since it seems like the appropriate place), has anyone upgraded their packages in the subsonic jail? My flac->mp3 transcoding mysteriously stopped working (no changes made to the system), so I'm wondering if something got corrupted and could perhaps benefit from an update or recompile.
 

the_tox

Member
Joined
Oct 1, 2013
Messages
150
Please click the like button if you find this useful, it keeps me motivated and lets me know how useful this post was to users. Thanks
Update: 12/12/2013
They renamed some ports and also added ffmpeg 2 :cool: to the ports tree. I have made a small change to the instructions and am compiling it now to see how it works. --- Tested and is working good streaming to my linux box. You can check what version you are using with
Code:
# ffmpeg --version

To upgrade to ffmpeg 2.x
log into your sonic jail as root user and run
Code:
# portsnap fetch update
this will take a little while. When that is done
Code:
# cd /usr/ports/multimedia/ffmpeg
Code:
# make
Make sure the LAME section is checked and AAC if you want it.
Code:
# make install clean
When that is done we want to remove the old link in subsonic folder and create another one for the new ffmpeg version
Code:
# rm /home/sonic/subsonic/transcode/ffmpeg
Code:
# ln /usr/local/bin/ffmpeg /home/sonic/subsonic/transcode/ffmpeg
Verify your new link is owned by your regular user and not root
Code:
ls -l /home/sonic/subsonic/transcode/ffmpeg

That is it, we can now take advantage of all the new version 2 features and bug fixes.

Update 2:
It appears that the configure step already has Lame support turned on.:) This is great news because we should just be able to use pkg to install ffmpeg instead of compiling from scratch.
It does not appear to be packaged yet so that will have to wait.
In an attempt to fix my problem, I've tried upgrading to the latest version of ffmpeg, but I'm having a very strange and frustrating problem.... I seem to have all of the packages necessary, but when I try to "make install clean" I get the following:
Code:
root@subsonic:/usr/ports/multimedia/ffmpeg # make install clean
===>  Installing for ffmpeg-2.2.4_3,1
===>   ffmpeg-2.2.4_3,1 depends on shared library: libaacplus.so - found (/usr/local/lib/libaacplus.so.2)
===>   ffmpeg-2.2.4_3,1 depends on shared library: libass.so - found (/usr/local/lib/libass.so.5)
===>   ffmpeg-2.2.4_3,1 depends on shared library: libfaac.so - found (/usr/local/lib/libfaac.so.0)
===>   ffmpeg-2.2.4_3,1 depends on shared library: libfontconfig.so - found (/usr/local/lib/libfontconfig.so.1)
===>   ffmpeg-2.2.4_3,1 depends on shared library: libfreetype.so - found (/usr/local/lib/libfreetype.so.9)
===>   ffmpeg-2.2.4_3,1 depends on shared library: libgnutls.so - found (/usr/local/lib/libgnutls.so.26)
===>   ffmpeg-2.2.4_3,1 depends on shared library: libmp3lame.so - found (/usr/local/lib/libmp3lame.so.0)
===>   ffmpeg-2.2.4_3,1 depends on shared library: libopencv_imgproc.so - found (/usr/local/lib/libopencv_imgproc.so.2.3.1)
===>   ffmpeg-2.2.4_3,1 depends on shared library: libschroedinger-1.0.so - found (/usr/local/lib/libschroedinger-1.0.so.11)
===>   ffmpeg-2.2.4_3,1 depends on shared library: libtheora.so - found (/usr/local/lib/libtheora.so.0)
===>   ffmpeg-2.2.4_3,1 depends on shared library: libvorbisenc.so - found (/usr/local/lib/libvorbisenc.so.2)
===>   ffmpeg-2.2.4_3,1 depends on shared library: libvpx.so - found (/usr/local/lib/libvpx.so.1.1.0)
===>   ffmpeg-2.2.4_3,1 depends on shared library: libx264.so - found (/usr/local/lib/libx264.so.136)
===>   ffmpeg-2.2.4_3,1 depends on shared library: libxvidcore.so - found (/usr/local/lib/libxvidcore.so.4)
===>   ffmpeg-2.2.4_3,1 depends on shared library: libiconv.so.3 - found (/usr/local/lib/libiconv.so.3)
===>  Checking if multimedia/ffmpeg already installed
===>   Registering installation for ffmpeg-2.2.4_3,1
pkg-static: Invalid manifest format: could not find expected ':'
*** [fake-pkg] Error code 74

Stop in /usr/ports/multimedia/ffmpeg.
*** [install] Error code 1

Stop in /usr/ports/multimedia/ffmpeg.


This is driving me nuts... I have no idea what could be causing it. I've already done pkg upgrade and portsnap fetch update and everything is up to date. Clearly from the output above, all the necessary packages are there...
 

the_tox

Member
Joined
Oct 1, 2013
Messages
150
Whew... that was a long and painful affair.
Fixed my issue, fortunately, and in case anyone else comes across the same problem:

Technically, the solution was to update/reinstall ffmpeg. However, you need to have pkg (aka. pkgng) up to date in order to effectively build the new version. Basically, get your pkg up to date and update everything you can (involves setting the pkg repo up correctly: http://forums.freenas.org/index.php?threads/keeping-the-jails-up-to-date.20062/ as well).
It might take a few iterations to resolve conflicts, but finally go to the ffmpeg directory and "make install clean" as the instructions state in this post.

IMPORTANT: For whatever reason, "pkg upgrade" wants to reinstall ffmpeg with different settings after you've built ffmpeg yourself. I don't know what settings it updates, but once you do that it no longer transcodes for subsonic properly. Maybe this will be corrected in the future, but update everything first, THEN build ffmpeg, and then leave it alone :)
 

anika200

Member
Joined
Mar 18, 2013
Messages
112
Whew... that was a long and painful affair.
IMPORTANT: For whatever reason, "pkg upgrade" wants to reinstall ffmpeg with different settings after you've built ffmpeg yourself. ---------- update everything first, THEN build ffmpeg, and then leave it alone :)
Good post, thanks.
The reason ffmpeg does not work after an upgrade with pkg-ng is because pkg-ng and ports are two totally different ways of installing/upgrading software. We are pulling our ffmpeg from ports so we can compile it with the needed options but the ffmpeg from pkg-ng comes compiled already without the needed options as you found out.

I would also suspect that having ffmpeg from ports already installed was the source of the error you posted earlier but I am not positive.
 
Last edited:

anika200

Member
Joined
Mar 18, 2013
Messages
112
Finally upgraded to 4.9 today, it was super easy.
The way I have mine set up (same as the first post) I just download the standalone version and then extract the contents to /home/sonic/subsonic/standalone overwriting all. Then I/you still have to adjust the lines in "/home/sonic/subsonic/standalone/subsonic.sh" to reflect where your music library and where subsonic is installed, see lines 9,16-18.


Code:
#!/bin/sh

###################################################################################
# Shell script for starting Subsonic.  See http://subsonic.org.
#
# Author: Sindre Mehus
###################################################################################

SUBSONIC_HOME=/home/sonic/subsonic
SUBSONIC_HOST=0.0.0.0
SUBSONIC_PORT=4040
SUBSONIC_HTTPS_PORT=0
SUBSONIC_CONTEXT_PATH=/
SUBSONIC_MAX_MEMORY=150
SUBSONIC_PIDFILE=
SUBSONIC_DEFAULT_MUSIC_FOLDER=/music
SUBSONIC_DEFAULT_PODCAST_FOLDER=/music/Podcast
SUBSONIC_DEFAULT_PLAYLIST_FOLDER=/music/playlists
 
Last edited:

sousaj

Neophyte
Joined
Dec 7, 2013
Messages
4
Any advantages/disadvantages to setting it up this way as opposed to using the PBI? I have done it both ways and have not noticed anything crazy, but just want to be sure.
 

anika200

Member
Joined
Mar 18, 2013
Messages
112
Any advantages/disadvantages to setting it up this way as opposed to using the PBI? I have done it both ways and have not noticed anything crazy, but just want to be sure.
PBI? o_O Never knew one exitsted. I guess the advantage to this method/thread is that it walks a user through the whole process of creating shared storage, jail creation, ports installation and use, compiling configuration, etc..... I guess that could be seen as disadvantage too.;)

Does the PBI version do transcoding?
 

sousaj

Neophyte
Joined
Dec 7, 2013
Messages
4
It used to, but I just tested and it does not. I did have to reinstall recently, so not sure if I messed something up. Oh well, looks like I will be installing again following these instructions - thanks!
 

anika200

Member
Joined
Mar 18, 2013
Messages
112
Whew... that was a long and painful affair.
:)
I just started this and what a pita, turns out our pkg is outdated and has some update bug and then other fiddling needs done. Crossing my fingers in hopes it turns out well, next time I am sticking with the -- if it ain't broke don't fix it -- adage.

Basically what I did,
1) update ports with portsnap
2) update pkg with ports /usr/ports/ports-mgmt/pkg >> make install
3) you will get errors -- look over this thread and delete the old pkg stuff as indicated
4) update pkg with ports again and reinstall
5) run pkg2ng
6) back to ffmpeg with ports and compile install etc....

Update:
This was not the end of the update because after all that pkg refused to work anyway so no update to packages like flac, libvorbis etc....
So I compiled /usr/ports/ports-mgmt/portmaster and then used it to upgrade everything with portmaster -a and had to exclude a few problem packages with -x.
In the end, 4-6 hrs later and 112 packages were updated and everything is working good. I even think I notice a small performance boost in Subsonic.
Update2:
It seems I am having a few issues now with random play cutting out, google image lookup does not seem to work and there may be other things I still have not noticed, trying to track down the issues.

Obviously this probably has nothing to do with FreeNAS exactly so I will probably head over to Subsonic forums to see what is up.
 
Last edited:

sousaj

Neophyte
Joined
Dec 7, 2013
Messages
4
Wish I had seen your post before deleting my setup and following the guide - could you update the first post to help others just starting out? I ran into the same issues you did and tried to fix it the same way, but gave up after more than an hour of tinkering. I have a PBI with 4.9 installed now, but no transcoding working so looking forward to everything being fixed up.
 

anika200

Member
Joined
Mar 18, 2013
Messages
112
Wish I had seen your post before deleting my setup and following the guide - could you update the first post to help others just starting out? I ran into the same issues you did and tried to fix it the same way, but gave up after more than an hour of tinkering. I have a PBI with 4.9 installed now, but no transcoding working so looking forward to everything being fixed up.
I do not understand your post, If you started from scratch then you have a brand new updated jail and in that case just following the general setup in the op should work fine.
There is no need to update a current jail if you have installed from 9.2. In may case my jail had been hanging around since 9.1 so I felt it was time.
 

sousaj

Neophyte
Joined
Dec 7, 2013
Messages
4
I am running 9.1 and deleted my old Subsonic jail, created a new jail, followed your instructions and ran into a ton of roadblocks - similar to the ones you describe.
 

anika200

Member
Joined
Mar 18, 2013
Messages
112
I am running 9.1 and deleted my old Subsonic jail, created a new jail, followed your instructions and ran into a ton of roadblocks - similar to the ones you describe.
Oh ok thanks for clarification, hopefully you got through it ok. I did see a thread somewhere that showed how to download and install a new jail template into and existing system that would be up to date, this might be helpful in your case or in any case where a new jail is created on an old system. If I need to start a jail all over again I would definitely try that first.
 

DrumNBisco

Junior Member
Joined
Nov 5, 2013
Messages
15
Just wanted to update that I was able to use my previous steps to upgrade from 4.9 standalone to 5.0 standalone on FreeNAS 9.2.1.6. I have not upgraded any of my associated packages though. I'll report back if I have issues. I also haven't tried using the plugin version yet either, given that everything is working the way I want it to right now, I don't know when I will.
 
Top