Book Image

Beaglebone Media Center

By : David Lewin
Book Image

Beaglebone Media Center

By: David Lewin

Overview of this book

Table of Contents (15 chapters)
BeagleBone Media Center
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Ideas to Improve Your Server
Index

Subsonic


Here is another server application that is able to support a very large range of clients (for Android, iPhone, Windows Phone, BlackBerry, Roku, Chumby, Sonos, and so on), but the most interesting feature is that a lot of media formats are available as Subsonic support is able to manage on the fly conversions. It is available at http://www.subsonic.org, and you will be intrigued by its simplicity; this simplicity doesn't avoid Subsonic to be secure and it can propose different security protocols such as HTTPS/SSL encryption and authentication capability with LDAP or Active Directory (check the documentation for more details).

You can access the subsonic online demonstration at http://demo.subsonic.org/index.view.

Installing Subsonic

Like MiniDLNA, Subsonic is really easy to install and simple to configure. Before the installation itself, you need to retrieve a small but needed prerequisite:

debian@arm:~$ install openjdk-6-jre

Then perform the following steps to install Subsonic:

  1. Click on the Download button from the website or directly go to http://www.subsonic.org/pages/download.jsp.

  2. Select the Debian/Ubuntu installer, which will redirect you to the nearest SourceForge site with the latest stable release.

  3. Copy the provided URL and paste it in the BeagleBone command line on PuTTY:

    debian@arm:~$ Wget http://sourceforge.net/projects/subsonic/files/subsonic/4.9/subsonic-4.9.deb/download?use_mirror=netcologne -O subsonic.deb
    debian@arm:~$ sudo dpkg -i subsonic.deb
    

Administering Subsonic

Note that the installer configures your system to start Subsonic automatically when booting. After the installation, open the Subsonic web page at http://localhost:4040.

Changing users

The Subsonic process is run with the root user in the provided default configuration. Therefore, you should the server as a dedicated user with fewer privileges. You can specify these rights by setting the SUBSONIC_USER variable in /etc/default/subsonic:

SUBSONIC_USER=debian

Note that nonroot users are by default not allowed to use ports below 1024 then use ports above that. Also, make sure to grant write permissions to the user in the music directories, otherwise changing the album art and tags will fail.

This can be done using the following command:

debian@arm:~$ sudo chown debian:debian /var/music

The music directory is the one defined in the configuration, as explained in the next section. For more details, check out the documentation at http://www.subsonic.org/pages/getting-started.jsp#1.

Restarting the service to apply changes

When you modify a configuration, as we did before, consider restarting the service (no need to reboot) so that the changes are applied.

To restart Subsonic, execute the following command:

debian@arm:~$ sudo service subsonic restart

Accessing configuration settings

Back to the web view, from Settings on the home page, you'll be able to access most of the settings that any network application can propose:

Advanced configuration

To change the port number, Java memory settings, or other startup parameters, edit the SUBSONIC_ARGS variable in /etc/default/subsonic.

Troubleshooting

You have all the logs at

debian@arm:~$ nano /var/subsonic/subsonic_sh.log

This is a good place to look when things are not working as they should.

For example, an issue with a music file might be coming from the transcoder (a software responsible for transforming your files) configuration. Check this in Setting/players.