Unused Cycles

June 7, 2010

All of your music anytime, anywhere, with Android and Ampache

Filed under: Ampache, Android, GNU/Linux — Kevin @ 10:44 pm

I recently bought an Android-powered phone (Motorola Droid) and love it to death. I’ll love it even more-so during the fourth quarter when the next version of Android (FroYo, or Frozen Yogurt) comes out. Google’s promised the ability to access your entire music library anytime and anywhere in the new version.

Well, I’m an impatient person, and I’ve got enough music to fill up my 16 GB micro-SD card and then some. I’ve used Ampache in the past to stream music from my laptop at home into the lab in which I was working at the time, so I figured I’d search for “android ampache”. Lo and behold, there are programs in the app market (Amdroid and Lullaby) that are able to connect to Ampache servers.

First, install and configure Ampache. If you’re running Ubuntu, instructions can be found here. If you’re running Windows, the installation may be different, but the configuration should be the same.

Next, install either Amdroid or Lullaby from the Marketplace. I prefer Lullaby, because Amdroid seemed slow and buggy to me. Enter the IP address of your Ampache server as well as your username and password where appropriate in the settings.

If you’re behind a router and you want to set up streaming outside of your LAN, you’ll have to set up port forwarding. If your ISP has you on a dynamic IP address, you may also want to check out a service like DynDNS.

Finally, if you’re on a limited data plan, you may want to set up transcoding to a lower bitrate (and you’ll have to if parts of your library are encoded in OGG or FLAC). To do this, I edited ampache.cfg.php (in /etc/ampache) to hold this information (it may already be in there, you just need to uncomment it):

transcode_m4a           = true
transcode_m4a_target    = mp3
transcode_flac          = true
transcode_flac_target   = mp3
transcode_mp3           = true
transcode_mp3_target    = mp3
transcode_ogg           = true
transcode_ogg_target    = mp3
transcode_cmd_flac      = "flac -dc %FILE% | lame -b %SAMPLE% -S - - "
transcode_cmd_m4a       = "faad -f 2 -w %FILE% | lame -r -b %SAMPLE% -S - -"
transcode_cmd_mp3       = "mp3splt -qnf %FILE% %OFFSET% %EOF% -o - | lame --mp3input -q 3 -b %SAMPLE% -S - -"
transcode_cmd_ogg       = "oggsplt -qn %FILE% %OFFSET% %EOF% -o - | oggdec -Q -o - - | lame -S -q 3 -b %SAMPLE% -S - -"

On Ubuntu, I had to install the following packages to get transcoding working properly: vorbis-tools, mp3splt, faad, lame.

That should be it.  I know it’s not as in depth as my guides usually are, but I’m strapped on time. Enjoy!

UPDATE: iPhone users can have fun too, because I’ve found out that there’s an iPhone app called iAmpache that does the same thing. I’ve tried it out on my iPod Touch and it works great over a LAN, although I can’t comment on how it’ll work on an iPhone over AT&T’s 3G.


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: