It is currently Sat May 25, 2013 2:22 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Configuring the Andromeda php mp3 player on a tonidoplug
PostPosted: Wed Apr 06, 2011 1:10 am 
Super Tonidoid
Super Tonidoid
Joined: Thu Feb 24, 2011 4:53 am
Posts: 38

What is Andromeda php? An easy to use php script that allows you to stream mp3s very easily. They stream very cleanly (no choppiness on my lan) and with very low cpu usage (can't see it on top).
Visit the developer's site at:
http://www.turnstyle.com/andromeda/gettingstarted.asp

How to install it on a plug:
I tried putting the script in a folder hosted by websharepro, but the php script would not execute. I thought it would work after reading this post (but I couldn't get it to work):
http://www.codelathe.com/blog/index.php/2010/10/10/announcing-php-support-in-tonido/
So plan B was to install lighttpd and php5.
I followed this post:
http://tonidouser.com/doku.php?id=advanceduses:installing_lighttpd_php_mysql_on_tonidoplug

"Installation:
SSH into your plug:
$ ssh root@<ipaddress>
# mkdir -p /var/cache/apt/archives/partial
# apt-get install lighttpd
On Ubuntu (which the TonidoPlug runs), the default web directory is /var/www, and the configuration file is /etc/lighttpd/lighttpd.conf.
Install PHP: Issue the following command as root to install a FastCGI-enabled version of PHP:
# apt-get install php5-cgi
After PHP is installed, open up /etc/php5/cgi/php.ini in your favorite text editor and add the following line to the bottom of the file:
cgi.fix_pathinfo = 1
Next:
# chmod 777 /tmp
# lighttpd-enable-mod fastcgi
# /etc/init.d/lighttpd restart
Access the file using a web browser pointed to <ipaddress>/info.php, where <ipaddress> is the internal IP address of your TonidoPlug.
# /etc/init.d/lighttpd restart
"
Next add the andromeda.php to your root mp3 folder. You can then do a symbolic link to that folder in /var/www/ to host the file:
/var/www# ln -s /path_to_mp3_folder mp3

Next open up your web browser and type in ip address:
http://ipaddress/mp3

To listen on a song, just click on it. You can add songs to a playlist and play them in a m3u compatible audio player. I can not see any cpu usage by andromeda.php in top. Cpu for the client is low too, about 25% on Mac OS X using firefox.

I'm pretty excited about this setup. I've been using andromeda for years, works great. I have a couple workstations that don't run flash so I couldn't access the tonidoplug jukebox. I have an audrey internet appliance that plays mp3/oggs using a nfs mount. I have a laptop which I didn't want to install nfs-common (due to security) and I didn't want to mess with configuring samba on the tonidoplug. Setting up lighttpd, php5, and andromeda was a breeze, which imo is what the tonidoplug is all about. As an alternate I considered installing mpd and icecast onto the tonidoplug, but the dpkg that in the ubuntu repository does not have the shout plugin compiled. I read of someone who was able to compile it, but complained of high cpu usage by mpd.
Comment: I don't recommend installing software onto your plug. Instead, I recommend installing the flash image onto a usb drive, booting off that, and installing custom software on to that.


Offline
 Profile  
 Post subject: Re: Configuring the Andromeda php mp3 player on a tonidoplug
PostPosted: Wed Apr 06, 2011 10:34 am 
Tonido MVP
Tonido MVP
User avatar
Joined: Sun Sep 05, 2010 6:21 pm
Posts: 501

Pretty cool. I think installing lighthttpd and another PHP sever is a bit overkill since the plug has a PHP server already for serving up PHP scripts. In this scenario, you would be having two PHP servers to bog down your plug and essentially two http servers. Since it is just one script, it can probably be packaged as a simple plugin and use the default Tonido PHP environment. The down side is, the process could be shared here, but no one could release an actual plugin due to licensing.

I do see you tried to get it running via a plugin; I was speaking generally. I could get it running myself, but I just can't release it due to licensing.

Anyways, very cool. Thanks for sharing.

_________________
My Tonido Plugins:


Offline
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours [ DST ]


 Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: