Software with minimal (or no) buffering for Icecast streams?

Status
Not open for further replies.

n5usr

Member
Joined
Aug 10, 2007
Messages
596
Reaction score
2
Location
Bethany, OK
I'm playing with Icecast / IceS (running on Linux) and my scanners. While doing this I was trying to reduce the delay imposed, and after much frustration finally realized my problem was Winamp, not Icecast. It seems in spite of turning off burst mode in Icecast, and running every buffer option I can find anywhere in Winamp to minimum or zero, every time I connect to the Icecast server Winamp sits and buffers some amount before playing. Since I've reduced the audio to 5kHz mono, that delay works out to about 45 seconds!

Anyone know of a Windows media player (for my work laptop) that has minimal or no buffering? I see on the Icecast page a couple other programs that are known to work: foobar2000 and Zinf. Never heard of either, will have to try them this weekend, anyone used them? Or know of any others?

As an alternate question, what sort of delay is common with streaming? I would rather have very little - indeed I was using the Win500 software to listen to my PSR-600 which does this nicely, but it keeps losing the audio after a while, not sure why, and requires I restart Windows on the server to get it back. (That is a less-than-ideal setup, Win2K inside a VMWare session on my Linux system, so plenty of opportunity for problems.) Thus why I'm working on a Linux-based alternative now.
 
Joined
Jul 23, 2007
Messages
580
Reaction score
7
Location
Edmonton, AB
/Edit - never mind. I reread the initial post and I see that they are trying to reduce the playing delay for the end user.

Does it make a difference if you run the feed at 24k? Or does it still have a long delay before it starts to play for the end user?
 
Last edited:

n5usr

Member
Joined
Aug 10, 2007
Messages
596
Reaction score
2
Location
Bethany, OK
If I run at a higher sample rate, the bitrate goes up of course, so whatever buffer Winamp is filling gets filled faster thus it starts sooner. However, even at 5kHz sample rate the audio sounds just fine and I'm trying to make the stream bandwidth as low as possible.

I played with things a bit today, and found Zinf has few options, buffers a lot, and CRASHES a lot. Foobar2000 actually came close - I was able to get it down to 5 seconds delay. At first. While it ran, the delay gradually grew until a half hour later or so it was a good 3-4 minutes behind!

On more research, it appears this sort of streaming isn't what I want to use for my application. I'd probably be better suited to something using RTP or another real-time VoIP type protocol. Of course, most of the packages I found are centered around phone calls thus adding a lot of unnecessary complexity.

What I'm really after is basically the Win500 remote access server but running on Linux! ;) Making a control panel applet isn't an issue, I've already cobbled together a Python script to grab the data from the scanner and (text) format it to look like the display. Sending data to the scanner is easy enough too. Getting the audio close enough to real-time that I'm not operating the scanner well after-the-fact is apparently the nifty trick...! (Doesn't do much good to hit "pause" to hold an interesting call channel if you're hearing the audio 30 seconds or more after it happened.)

I'll also check on what Scanamerica is doing, thanks!
 
Joined
Jul 23, 2007
Messages
580
Reaction score
7
Location
Edmonton, AB
I think I am starting to understand what you are trying to do. You are sitting at your computer and listening to your feed via the icecast server. But if you are sitting at your keyboard, why not just listen to the scanner audio thru your speakers instead of connecting to listen via the server? This way the delay that the end user would hear wouldn't change how you control your radio.
 

n5usr

Member
Joined
Aug 10, 2007
Messages
596
Reaction score
2
Location
Bethany, OK
Well, right now I'm sitting at the same desk as the scanner. But what I am doing this for (apart from just being bored and having something to play with) is so I can sit at the office, or wherever else, and do the same thing. Just listening to the stream is fine, and in most cases is all I care to do. But inevitably you have that one "hot call" that you really want to focus on and pause the scanner. Thus the remote control ability.

In order to easily make use of the remote control, though, I need near-real-time streaming. Otherwise, even if I do just note what frequency the call was on and manually set the scanner there, in the meantime I'll have 45 seconds or so of unrelated stuff where I may miss something.

The PSR-600 / PRO-197 allows for ridiculously easy remote control, the serial line protocol is even fairly decently described in the back of the manual. In an evening of hacking I had a rudimentary control program done, now I just need to get around to making it "pretty" and a little more user-friendly. I had hoped to use Icecast alongside my control app because it is easy to set up, and as a bonus I could let others listen in as well since the remote control wouldn't be part of the streaming app.

But the process of creating the system is a large part of the fun for me, more an excuse for something to keep my brain engaged. I'll come up with something that works eventually! :)
 

GordonE

Scanner Radio App Developer
Feed Provider
Joined
Dec 18, 2002
Messages
575
Reaction score
52
I'm playing with Icecast / IceS (running on Linux) and my scanners. While doing this I was trying to reduce the delay imposed, and after much frustration finally realized my problem was Winamp, not Icecast. It seems in spite of turning off burst mode in Icecast, and running every buffer option I can find anywhere in Winamp to minimum or zero, every time I connect to the Icecast server Winamp sits and buffers some amount before playing. Since I've reduced the audio to 5kHz mono, that delay works out to about 45 seconds!
Try running your Icecast server with:

<burst-on-connect>1</burst-on-connect>
<burst-size>16384</burst-size>

specified in the <limits> section of the configuration file.

I use these values for the ScanAmerica.us Icecast servers and (for me) Winamp starts playing immediately (as do other players).

The majority of my feeds are encoded at a bitrate of 16kbps with a sample rate of 22050Hz. You should choose a sample rate that is a multiple of 11025Hz to ensure the encoding of your feed is compatible with most media players. If you want a higher bitrate than 16kbps, 24kbps is a good choice.
 

n5usr

Member
Joined
Aug 10, 2007
Messages
596
Reaction score
2
Location
Bethany, OK
Try running your Icecast server with:

<burst-on-connect>1</burst-on-connect>
<burst-size>16384</burst-size>

specified in the <limits> section of the configuration file.

I use these values for the ScanAmerica.us Icecast servers and (for me) Winamp starts playing immediately (as do other players).
Okay, I'll try that. I had turned it off completely, but perhaps that doesn't work well with Winamp for some reason.

The majority of my feeds are encoded at a bitrate of 16kbps with a sample rate of 22050Hz. You should choose a sample rate that is a multiple of 11025Hz to ensure the encoding of your feed is compatible with most media players. If you want a higher bitrate than 16kbps, 24kbps is a good choice.

I was actually trying for a *smaller* stream than that! I'm currently running 5kHz (actually 5512) sampling rate which gives me a bitrate of 11k or so according to Winamp. Perhaps using a more "standard" sampling rate will help too.

I'm also now wondering if perhaps Winamp doesn't support Ogg quite as well as they do MP3 - are you using MP3 format streams? I "defaulted" to Ogg since the IceS version I installed is 2, which only does Ogg. Perhaps I'd have better luck with MP3...

More playing to do!
 

webstar22

RenfrewCountyScanner.com
Premium Subscriber
Joined
Dec 21, 2003
Messages
1,044
Reaction score
175
Location
Ontario, Canada
Try running your Icecast server with:

<burst-on-connect>1</burst-on-connect>
<burst-size>16384</burst-size>

specified in the <limits> section of the configuration file.

I use these values for the ScanAmerica.us Icecast servers and (for me) Winamp starts playing immediately (as do other players).

The majority of my feeds are encoded at a bitrate of 16kbps with a sample rate of 22050Hz. You should choose a sample rate that is a multiple of 11025Hz to ensure the encoding of your feed is compatible with most media players. If you want a higher bitrate than 16kbps, 24kbps is a good choice.

These are the settings I use also.

If you don't have a burst size setup on the server Winamp will use it's default which I think may be 64k but not 100% sure.
 

GordonE

Scanner Radio App Developer
Feed Provider
Joined
Dec 18, 2002
Messages
575
Reaction score
52
are you using MP3 format streams? I "defaulted" to Ogg since the IceS version I installed is 2, which only does Ogg. Perhaps I'd have better luck with MP3...
I use MP3 only since many players don't support Ogg.
 

jasongi

Member
Joined
Feb 3, 2007
Messages
5
Reaction score
0
What I'm really after is basically the Win500 remote access server but running on Linux! ;) Making a control panel applet isn't an issue, I've already cobbled together a Python script to grab the data from the scanner and (text) format it to look like the display. Sending data to the scanner is easy enough too.

any luck with this?
 
Status
Not open for further replies.
Top