Monday, August 27, 2012

Command Line Pandora with Pianobar


I really enjoy living as much of my life in the CLI as possible. It takes up less memory and is arguably easier to use. For streaming music, I like to use Pandora radio. After searching around, I found a cool command line Pandora client called Pianobar.

As of Ubuntu 12.04 and the writing of this blog, the repository version of Pianobar doesn't work since Pandora has changed around its API. So, we have to compile it from source.

Install Dependencies

For Ubuntu, run the following in the terminal:
sudo apt-get install libao-dev libfaad-dev libmad0-dev libjson0 libjson0-dev libgnutls-dev
For OSX, install Homebrew and run:
brew install libao faad2 libmad json-c gnutls

Download and Compile Pianobar

The latest version of Pianobar as of the writing of this blog is version 2012.06.24. Save the file anywhere on your computer and navigate to that directory. You'll need to uncompress the file by running the following:
tar xvjf pianobar-2012.06.24.tar.bz2
Now, we are ready to compile. Navigate into the uncompressed directory and run:
make clean
make
This will create an executable pianobar. You can test it by running:
./pianobar

Install Pianobar

If everything works correctly, run:
make install
Now enjoy Pandora from the command line!

No comments:

Post a Comment