Best way to record intermittent streaming music
August 29, 2016 9:46 AM   Subscribe

I am wanting to record the Internet stream of a radio broadcast for a certain dusty event happening now in Nevada. I'm finding it problematic to get a good recording as the stream cuts out frequently.

I've tried various streaming players and am currently using VLC for the stream player plus Piezo on the Mac to record the stream. The basic problem is that the stream cuts out at irregular intervals then does not resume. I can re-open the stream and get things going again but the irregular nature of the cut outs makes it impossible to manage effectively.
I'm not clear that the stream interruptions are related to my home Internet connection or other factors. It seems to me that the various players I've tried do not try to restart the stream after it lapses for one reason or another.
I really enjoy listening to the playa radio (BMIR) and would like to time shift the broadcast so I can listen to it later on. What set up might help me accomplish this?
posted by diode to Computers & Internet (5 answers total) 2 users marked this as a favorite
Best answer: Try the following command line in a Terminal window:

while true; do curl >>bmir.mp3; sleep 5; done

I think the cut-outs are probably due to the streaming server running out of bandwidth, so this little script gives it a 5 second holiday after each cut-out to give it a tiny bit of breathing space.
posted by flabdablet at 1:00 PM on August 29, 2016

If a station has a 50-slot streaming package, up to 50 listeners can connect but then listener 51 will get bounced.

What I observed when playing with this particular stream was that the download rate is usually around 12kB/s (about right, given that the codec information shows a 96kb/s stream rate) but would periodically droop to the point where the download was not keeping up with the audio, and that if this persisted for more than about fifteen seconds the connection would drop, after which I'd get 404s for a while until it came back.
posted by flabdablet at 4:11 AM on August 30, 2016

Response by poster: I tried asking the streamguys tech support about this. Their support chat said BMIR is having problems broadcasting from the playa (which happens every year) and suggested using software that attempts to reconnect when the stream drops but gave a null signal when I asked what software that would be. I tried the 'curl' terminal command this morning, which is cool, gives a nifty readout in the terminal of the data stream. Doesn't seem to resolve the problem as iTunes dropped the stream twice this morning so far in about 20 minutes of listening. So now I'm wondering if there is a player that is a bit more aggressive in reconnecting a stream when it drops than iTunes or VLC?
posted by diode at 6:55 AM on August 30, 2016

Once you've got that curl command loop running, you can just use VLC to play the growing bmir.mp3 file while curl keeps on tacking stuff onto the end.

The only way VLC is going to stop is if it hits the end of the file, which will only happen if the file is growing more slowly than VLC is consuming it, which will only happen if the stream slows down to the point where it's not keeping up with the MP3 bit rate and/or repeatedly drops. But if you leave curl running for an hour or so before you start VLC, you'll have plenty of buffered audio to be going on with.

Every now and then you'll notice a chunk of missing or repeated audio where the stream has dropped and curl has reconnected, but I'm not sure there's much that can be done about that.
posted by flabdablet at 11:05 AM on August 30, 2016

Response by poster: Okay, now I'm getting it. I found the .mp3 file in my home directory, opened it in VLC and Bob's your uncle.
posted by diode at 6:48 AM on August 31, 2016

« Older Best Bar Cookie Recipe needed   |   How do I sell a friend's car in AZ when friend is... Newer »
This thread is closed to new comments.