[Installation] Subsonic

Guides written by the community, for the community, and only guides!

[Installation] Subsonic

Postby devr » Fri Sep 16, 2011 1:20 am

Per the Subsonic web site, Subsonic is a free, web-based media streamer, providing ubiquitous access to your music. Use it to share your music with friends, or to listen to your own music while at work. You can stream to multiple players simultaneously, for instance to one player in your kitchen and another in your living room.

This guide goes over how to install subsonic and its dependencies

Java
First Java needs to be installed, and you have a choice to make; Open Java or Oracle Java. Initially I tried with Open java:
pacman -S openjdk6

The results that I observed was that subsonic was very, very, very slow. So then I went to Oracle's embedded java web site and downloaded their embedded java binary to try. You will need to know what basic type of ARM processor you have to be able to download the right version. Also, you have to submit your information (at a minimum email address) to download anything. Your choice, which Java you want to use. For me the Oracle embedded Java binary did perform faster, your mileage may vary.


Subsonic
The Subsonic installation documentation page pretty much provides you all you need to know to install. Presently my Java app needs are pretty simple, so I chose the "Stand-alone installation" route. Basically; download, uncompress, configure, and start it. To start subsonic, use the subsonic.sh script, and this script is alos where you can set some of the configuration parameters.

For those of you that use Oracle's embedded Java and don't have java bin directory defined in your path, edit the subsonic.sh script and add something like the following somewhere close to the top:
export JAVA_HOME=/opt/ejre1.6.0_25/



Transcoding
if you want subsonic to re-encode your music/videos on the fly you will need to install lame & ffmpeg (or a similar program). My experience has been that my ARM processors can not handle real-time encoding, when attempting such the music will play then pause over and over. But here is the info anyways, in my example I uncompressed subsonic to /opt/subsonic:
pacman -S lame ffmpeg
ln -s /usr/bin/ffmpeg /opt/subsonic/transcode/ffmpeg
ln -s /usr/bin/lame /opt/subsonic/transcode/lame



rc.d script
I basically just changed up an existing script and used for subsonic. if this is any help, here ya go:
Code: Select all
#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions

case "$1" in
  start)
    stat_busy "Starting Subsonic"
    /opt/subsonic/subsonic.sh --pidfile=/opt/subsonic/subsonic.pid &>/dev/null
    if [ $? -gt 0 ]; then
      stat_fail
    else
      add_daemon subsonic
      stat_done
    fi
    ;;
  stop)
    stat_busy "Stopping Subsonic"
    kill `cat /opt/subsonic/subsonic.pid`
    if [ $? -gt 0 ]; then
      stat_fail
    else
      rm_daemon subsonic
      rm -f /opt/subsonic/subsonic.pid
      stat_done
    fi
    ;;
  restart)
    $0 stop
    sleep 1
    $0 start
    ;;
  *)
    echo "usage: $0 {start|stop|restart}"
esac
exit 0
devr
 
Posts: 87
Joined: Wed May 11, 2011 12:22 am

Re: [Installation] Subsonic

Postby grizzlebee » Tue Jan 10, 2012 5:14 am

Hi --

I'm new to linux and am having trouble following your steps. Could you (or anyone else) help me out? Here's my situation:

I have a Pogoplug Pro running Arch. I went to the Oracle download site referenced above and picked up the JAVA "ARMv6/7 Linux - Headless" file. After I uncompressed (tar -xvf) the file in /opt, I was left with a new folder in /opt/ejre1.3.0_30/ containing what I assume are the files to run JAVA. Next I downloaded the standalone subsonic files referenced above and uncompressed (tar -xvf) them in /var/subsonic. I then added
Code: Select all
export JAVA_HOME=/opt/ejre1.6.0_30/
towards the top of subsonic.sh and verified that the correct music, podcast and playlist folders were referenced. Finally, I ran
Code: Select all
./subsonic.sh
and received the following output:
Code: Select all
Started Subsonic [PID 3231, /var/subsonic/subsonic_sh.log]
After all that, I opened up firefox on my windows pc and went to http://192.168.1.XXX:4040 but nothing happened--no subsonic webpage. I checked subsonic_sh.log, but the file was empty. Any idea what I might be doing wrong? Do I have the wrong version of JAVA? Am I uncompressing files in the wrong place?

Thanks.
grizzlebee
 
Posts: 15
Joined: Sun Jan 01, 2012 4:59 am

Re: [Installation] Subsonic

Postby WarheadsSE » Tue Jan 10, 2012 6:21 pm

Try the v5 :) The pro does not have the VFP of some v6, nor all of the v7, so that could make a significant impact.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6730
Joined: Mon Oct 18, 2010 2:12 pm

Re: [Installation] Subsonic

Postby grizzlebee » Wed Jan 11, 2012 2:45 pm

Thanks for the help. I went ahead and tried the "ARMv5 Linux - Headless" version of Java SE for Embedded 7. It worked (i.e. I was able to bring up the subsonic web interface), but it was extremely slow. Next, I tried the "ARMv5 Linux - Headless" version of Java SE for Embedded 6. It worked again, and the responsiveness of the web interface was dramatically improved. However, the program/interface crashed when I tried to actually browse my library and play a song from my library. I'm wondering if the Pogoplug Pro just doesn't have enough juice to run subsonic.
grizzlebee
 
Posts: 15
Joined: Sun Jan 01, 2012 4:59 am

Re: [Installation] Subsonic

Postby WarheadsSE » Wed Jan 11, 2012 3:18 pm

Honestly, I've used not investigated the use of subsonic. There may be other factors at play.

That and Java is a memory eating-beast.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6730
Joined: Mon Oct 18, 2010 2:12 pm

Re: [Installation] Subsonic

Postby devr » Fri Jan 13, 2012 5:30 pm

@grizzlebee

I have used a few different versions of java on the following devices; Pogoplug v2 Pink, Pogoplug Pro, & lately TonidoPlug2. Though subsonic has never been what I would call speedy, I haven't had it crash like you are reporting. On startup I have seen it act a bit slower, whether it is caching or running indexes, don't know, but it should be responsive. Maybe it is a configuration issue causing the crash, anything in the logs ?

I agree with WarheadsSE, I would prefer a non java based app, I have yet to find anything though. It has been a while since I poked around to see what is out there.. maybe I will...
devr
 
Posts: 87
Joined: Wed May 11, 2011 12:22 am

Re: [Installation] Subsonic

Postby kmihelich » Fri Jan 13, 2012 8:51 pm

Just to throw this out there for an alternative, have any of you experimented with Ampache?
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1124
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinux-arm

Re: [Installation] Subsonic

Postby grizzlebee » Fri Jan 13, 2012 9:05 pm

@devr
I'll check the logs this evening and post them here just in case you have some suggestions.

@kmihelich
I haven't heard of Ampache, but I'll also check it out this evening. Any experience running it on a Pogoplug Pro?
grizzlebee
 
Posts: 15
Joined: Sun Jan 01, 2012 4:59 am

Re: [Installation] Subsonic

Postby WarheadsSE » Fri Jan 13, 2012 10:15 pm

There are a few AUR packages.

http://ampache.org

Runs on xAMP (LAMP for us) Apache/MySQL/PHP
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6730
Joined: Mon Oct 18, 2010 2:12 pm

Re: [Installation] Subsonic

Postby grizzlebee » Sat Jan 14, 2012 1:35 pm

Not sure if this helps, but here's the error log that was generated by subsonic.

# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x40208454, pid=1044, tid=1290359920
#
# JRE version: 6.0_30-b12
# Java VM: Java HotSpot(TM) Client VM (20.5-b03 mixed mode linux-arm )
# Problematic frame:
# V [libjvm.so+0x60454]
grizzlebee
 
Posts: 15
Joined: Sun Jan 01, 2012 4:59 am

Next

Return to Community Guides

Who is online

Users browsing this forum: No registered users and 1 guest