Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Record streaming radio to MP3 [closed]

Background

My father has an old radio program that he loves. It is a series of recordings done 30-40 years ago, but now he has found out that they are sent now and then as a historical retrospects. He loves them and don't want to miss a single one. He is eager to record them so I found a little program called CoolRecord that can record from broadcast through web player. It works OK, but the problem is that there recording is done through audio card and when he uses Skype to talk to his grandchildren he always messes up sound settings and when the next recording session comes everything is chaos ....

Idea

Now I recently found out that it is possible to catch the radio stream BEFORE it passes through the audio card. This is great news! I searched and found the url to the broadcast. On http://www.listenlive.eu/sweden.html I found the following url that looks promising: http://sverigesradio.se/topsy/direkt/1602-hi-mp3.pls. It is an MP3 decoded stream with 192 kbps.

I searched the web and found several software for listening to radio and even record, but all Windows based software that I have found records audio stream after it has passed through the computer audio card .... I actually found a freeware for Mac who does the right thing. It is called FStream but it has no Windows version ;-)

My intention is therefore to build a VERY simple program that will always connect to the same radio station and catch the stream directly without going through the audio card.

I want to keep it dead simple to my father: All he needs to do is to push a big red record button when it is time for his favorite program! No hassle with confusing audio settings, just a file automatically saved to his audio directory.

Questions

I prefer to use C#. I guess the .Net class library has some useful methods that might help me on .... But I have never worked with radio streaming and broadcast technology. 1) How do I set up a "stream listener"? 2) Is it possible to detect program title and automate the recording start/stop? 3) How do I save the stream to a MP3 file? Do I need to add headers etc? 4) Do I need to take care of possible interrupts in the streaming?

like image 943
Jakob Lithner Avatar asked Dec 30 '11 11:12

Jakob Lithner


1 Answers

Have a look at streamripper. It seems to be doing what you're trying to achieve and is also available on windows. It also seems to be generating separate mp3s automatically using silent marks in the audio stream if you want to.

There also exists a "dead simple" frontend to streamripper, called SimpleRipper which might be just what you need.

like image 98
Stefan Paul Noack Avatar answered Nov 09 '22 03:11

Stefan Paul Noack