HOWTO: StreamTuner + StreamRipper
I don't know how many music albums I have but it's never enough! I always need new music and I'm sure many of you need it too!
So here I want to give you some tips (for whoever didn't already know) about how to get some good quality music, and legally, as it's legal to record a TV program and then watch it when you come home.
Let's start with Streamtuner. "streamtuner is a stream directory browser. Through the use of a plugin system, it offers an intuitive GTK+ 2.0 interface to Internet radio directories such as SHOUTcast and Live365." In addition it can catalogue all your local music files for a fast access to them.
Ok, let's install it. Enable the "universe" in your repository and type:
sudo apt-get install streamtuner
Ok, it should create an entry in your menu under Applications -> Sound & Video. If it doesn't, immediately refresh the Gnome Panel by opening a terminal and issuing:
Since you have it installed let's teach it to open your favorite music player everytime you want to listen one of the listed radios. In streamtuner open;
Edit -> Preferences.
In the Application tab you will see a table. In the right column you will see "xmms %q" (I think it's the default setting), replace "xmms" with your favorite player but don't forget "%q" at the end of the string. In my case it is set to "beep-media-player %q".
Now you can listen to a lot of radio stations, many of them broadcasting at a very good bitrate.
Now, wouldn't it be cool to record your favorite ones in your hard disk? Let's go.
To rip streaming radios we'll use "streamripper".
sudo apt-get install streamripper
Now, let's tell Streamtuner how to use Streamripper properly. Again, open Edit -> Preferences.
In the same table as before we'll edit the last row of the table, where it says "Record a stream". Here we will delete the right column cell and replace it with this:
x-terminal-emulator -e streamripper %q -d /mnt/Data01/Ripped -r -q
Where "/mnt/Data01/Ripped" is the location where you want all the mp3s to be stored.
The "-r" option means Streamripper will create a relay server. In other words, if you don't do it you will be downloading the ripped version twice, once by streamripper and once by your media player. You might not care if you have broadband but you will otherwise. The "-r" option, as we said, will create the relay using by default the 8000 port but, in case it's busy (video streaming, others) it will continue searching for the next open port. Usually, if 8000 is busy 8001 won't.
You found a nice radio. You tune it, your player opens it and you hear it. You like it and decide to start ripping it. You press the Record button. A console will open and streamtuner will start doing its job. Now, you can listen at whatever you want with your media player (other streaming radios, local files, etc) that streamripper will keep doing it's job. But if you want to listen what is being ripped, instead of connecting to the streaming radio you can connect to the relay created by streamripper. To do so, just open with your media player http://localhost:8000/ (or http://localhost:8001/, etc).