Опасная зона

Опасная зона

Wednesday, March 9, 2011

Ripping Online Radio Streams

At work and at home I listen to online radio streams a lot (headphone of course, in order not to annoy my fellow office mates). Countless of tools exist which can save the audio stream to disk (i.e. ripping). This is perfectly legal in most countries as long as it is for private use, according to wikipedia.

A very good tool I can recommend is streamripper which can be used from command line in Linux (there are multiple windows front ends, though).
Streamripper is really "set and forget" and comes without a bloated GUI. Once you have the URL of the station you want to rip, the command line is simply:

streamripper http://www.di.fm/mp3/chillout.pls -s

The "-s" option should always be at the end. Streamripper will properly split and save the "DI Chillout" stream in individual mp3 encoded tracks. The mp3 filenames are fomatted as "Artist - Title.mp3" and to some extend the ID tags are set. The very first track will logically be stored in a folder named "incomplete" and the subsequent files will be saved at the location where you invoked the command. Very nice.

There are thousands of internet radio stations out there, these are currently my favourite ones:

http://streamer-mtc-aa04.somafm.com:80/stream/1032 - Drone Zone (Ambient)
http://www.di.fm/mp3/chillout.pls - DI Chillout
http://www.di.fm/mp3/trance.pls - DI Trance (it's crap, yet very good if office gets too noisy + coffee substitute)
http://www.di.fm/mp3/spacemusic.pls - DI SpaceMusic
http://www.dradio.de/streaming/dlf_hq_ogg.m3u - DeutschlandFunk
http://c13010-ls.i.core.cdn.streamfarm.net/dwworldlive-live/13010dwrde64.mp3 - Deutsche Welle
http://edge.live.mp3.mdn.newmedia.nacamar.net/klassikradio128/livestream.mp3 - KlassikRadio (only good in small doses)
http://www.tv-radio.com/station/france_musique_mp3/france_musique_mp3-128k.m3u - France Musique

and last, but not least:

mms://mms.online.ru/c12_1_128 - Music from 50-70ies Soviet Russia

A note about the last link: streamripper did not like the encoding or protocol of the stream - it just idles. (Right. In Soviet Russia, you don't rip stream - stream rips you.)
What works is to use (hungarian, eh?) mplayer instead:

mplayer -dumpstream -dumpfile stream.wmv mms://mms.online.ru/c12_1_128

which will save the stream into stream.wmv. But mplayer does not split the stream into individual songs, this must be done manually. I use audacity, but audacity is not always happy with the .wmv format. Mplayer can convert the wmv file to something more convenient, here I do .wav because I want to do some post-processing:

mplayer -ao pcm:file=filename.wav stream.wmv

and after importing and editing in audacity you can export the final file to mp3.

Here is an except [foo.mp3] from the very same station, which was also my motivation for going through all this. I heard this piece at a concert in the deepest Russia some years ago, and I had trouble to stop giggling while listening. Later I was told it's a very sad song about a dying swan and I was certainly not supposed to giggle, probably offending my neighbors. (I've still not identified what it is, but that should be easy to find out.)
Anyway, plenty of patriotic songs, balalaika stuff and ballades are to be found here, much of it resembles the french chanson genre. It is something refreshingly different which is to be enjoyed silently, late at night.

--- Update ---
it's Лебединая верность

lyrics here:

Спасибо, Oksana. :-)

No comments:

Post a Comment