Jump to content

Issues with streaming to local host


Recommended Posts

Hi!

 

To give you an insight to the problem I have been experiencing. I run an encoder from SAM Broadcaster over my local LAN to another PC. On this PC I am installed Icecast and am streaming from the Icecast server to Winamp on the same PC. I have my FM transmitter connected to this PC and I am running RDS software that takes the song title & artist and updates the RDS signal when the song changes, I also can administer the FM transmitter from the PC. Another reason for this setup is that the server is in the studio downstairs and the FM transmitter is upstairs in the attic and the PC is located near this transmitter. I am streaming 192K from SAM to the Icecast server and then to the local instance of Winamp. I also do my post processing & pre-emphasis to the FM broadcast on this PC.

 

Now to prevent the network stream from buffering, I have removed the network buffers on the MPEG encoder due to the low latency of the Icecast server and Winamp being on the same PC. I have experimented with the DirectSound & WaveOut outputs device buffers and eventually settled with a Kernel output plug-in as the other two were buffering on the machine and causing pops & clicks on the FM broadcast; after a period of time when the device buffers would get exhausted. I will still get the occasional stutter from the Kernel Output plug-in but not that often. Sometimes the player thread will go to sleep and then the stuttering will get a bit more noticeable. Restarting the player always reloads the buffer and then it stops until the thread goes to sleep.

 

I have tried streaming OGG to the Icecast server with the same results. I also have adjusted the device buffers in quite a few configurations and cannot get rid of the stutter in the broadcast. :retard: I would think with the low latency of the streaming and playing to the local machine you wouldn't need so much of a buffer on the device? It is a multi-core CPU with heaps of RAM.

 

Has anyone ever attempted streaming from a server directly to the localhost? If so, did you experience these issues? What did you do to resolve them?

Reverend Aquaman | Station Manager | andHow.FM

Where it's *ALL* about the music!

A world-class, always eclectic, commercial-free, alternative, modern, retro, indie rock radio station.

Jamming the free world, one person at a time since 1998. Got Indie?

Link to comment
Share on other sites

  • 2 months later...
  • Replies 56
  • Created
  • Last Reply

UPDATE.

 

I have installed a Shoutcast server and am streaming to the localhost to Winamp. Still having the buffering problems. Listened to a local commercial FM station that appears to have the same problems. I did a Google search for some insight to this problem and now this forum request is coming up in the search! I am working to tweak the MPEG Audio Decoder settings to make the gaps as small and as infrequent as possible.

 

Anyone who could add some insight to this issue?

Reverend Aquaman | Station Manager | andHow.FM

Where it's *ALL* about the music!

A world-class, always eclectic, commercial-free, alternative, modern, retro, indie rock radio station.

Jamming the free world, one person at a time since 1998. Got Indie?

Link to comment
Share on other sites

UPDATE.

 

I have installed a Shoutcast server and am streaming to the localhost to Winamp. Still having the buffering problems. Listened to a local commercial FM station that appears to have the same problems. I did a Google search for some insight to this problem and now this forum request is coming up in the search! I am working to tweak the MPEG Audio Decoder settings to make the gaps as small and as infrequent as possible.

 

Anyone who could add some insight to this issue?

 

Who has tested for buffering?

 

You do know when you listen to a source and it's you streaming the source, you will most likely get some buffering problems? I have had numerous clients say oh its buffering, well yes your the streamer and your tuning in, it happens.

 

No one else had the issue but them.

 

Have you got anything we can look at and test for you?

BoxSRV - SHOUTcast, SHOUTcast resellers, shared hosting, domains and more!
Link to comment
Share on other sites

This is all on an internal LAN and does not require a streaming host. The SAM server has an encoder that streams across a 1GB LAN to an FM broadcast machine. On that machine we are running Shoutcast server and streaming directly to and from the localhost to an instance of Winamp. Again, the FM PC is way over spec'd for purpose, just to ensure the quality of the signal. We have tested this setup extensively for the past couple of years with different audio players, streaming servers, etc. This is the most stable and reliable configuration that we have been able to create. The only problem is the short underrun pre-buffering on occasion. We can stretch out the time frame that the underruns happen, but the pre-buffer has to be increased or the stream will begin to stutter during the underruns. Currently we are using a 512MB buffer and a pre-buffer of about 5-10% of that. It will last a couple of hours and then a short prebuffer while underrunning. Then that will occur a few times and then it will be happy for about an hour or so. Then the prebuffer occurs again.

 

Example --> Sam Server Encoder --> 1GB Local LAN --> FM PC running Shoutcast Server --> Winamp --> Output to Sound card over localhost connection. The only latency I can imagine that there would be of consideration is across the NIC to the Motherboard to the Sound card.

 

If it is a matter of tweaking the configuration, that would be of great assistance. I am always looking for something that I may not have already tried.

Reverend Aquaman | Station Manager | andHow.FM

Where it's *ALL* about the music!

A world-class, always eclectic, commercial-free, alternative, modern, retro, indie rock radio station.

Jamming the free world, one person at a time since 1998. Got Indie?

Link to comment
Share on other sites

Yes, I have when we tested the configuration with Icecast. It did not make really any difference. There is not a burst size configuration on Shoutcast V1.

Reverend Aquaman | Station Manager | andHow.FM

Where it's *ALL* about the music!

A world-class, always eclectic, commercial-free, alternative, modern, retro, indie rock radio station.

Jamming the free world, one person at a time since 1998. Got Indie?

Link to comment
Share on other sites

Cool.

 

Lame. I can set the buffer to 2048 or higher and the prebuffer takes a few hours to show up. Then you can only set the prebuffer so low and I get a buffer of a sec or more on the signal.

 

It doesn't appear to be buffering between SAM and SC server. It is the SC server to Winamp on the local machine.

Reverend Aquaman | Station Manager | andHow.FM

Where it's *ALL* about the music!

A world-class, always eclectic, commercial-free, alternative, modern, retro, indie rock radio station.

Jamming the free world, one person at a time since 1998. Got Indie?

Link to comment
Share on other sites

I've been trying to cause the same issue, but nothing on Gadi's comp. I know this is crazy questions to ask this late, But:

 

A) Does the backend of logs from the Shoutcast server indicate any issue during the "under-run"

 

B) Did you turn off all Microsoft update services on the "server" Im guessing its a Win OS? Did you turn off auto-backup/scanSecurity update along with the comps firewall filters?

KNSJ.org / 89.1 FM San Diego
Link to comment
Share on other sites

The Winamp is the output for the FM transmitter.

 

There is no 'stuttering' just the occasional pre-buffer silence while it catches up. It does not show up in the logs. I am trying to eliminate that completely if possible.

 

Yes, it is a stripped down, PC over-spec'd, running XP w/the transmitter RDS update app from Winamp song titles. It also post processes the signal to the FM broadcast, adding pre-emphasis, etc. with Stereo Tool. It also runs an instance of Shoutcast v1.9.8 & the latest flavour of Winamp. These processes consume very little resources, with the exception of the processing. The only listener is the Winamp with the output to the FM transmitter (an external device) via the soundcard. I can recreate the pre-buffer silence on just about every machine I have ever set this up on. With Icecast, Shoutcast, VLC, etc. I am trying to get my head around how something with such a tiny latency could have to pre-buffer at all or would do that process leading up to the live output and just seamlessly continue the output without the silence.

 

Maybe it is just the shortcomings of the technology I am using, I don't know. I just know I have put a lot of resources into trying to get around this issue for a couple of years now. I can make it so it doesn't happen very often, but then the pre-buffer has to be bigger (more silence) and you can only make it so small before you get a the "stutter" that you mentioned earlier.

 

Thanks for all of your efforts that you and your colleagues have put forth so far. Much appreciated.

Reverend Aquaman | Station Manager | andHow.FM

Where it's *ALL* about the music!

A world-class, always eclectic, commercial-free, alternative, modern, retro, indie rock radio station.

Jamming the free world, one person at a time since 1998. Got Indie?

Link to comment
Share on other sites

Capture5.JPG

 

Here are the buffer settings that give me about 2 hours before a pre-buffer silence. That lasts about a half-second. If I set the pre-buffer any smaller I get the stutter. The Shoutcast V1 is default settings.

Reverend Aquaman | Station Manager | andHow.FM

Where it's *ALL* about the music!

A world-class, always eclectic, commercial-free, alternative, modern, retro, indie rock radio station.

Jamming the free world, one person at a time since 1998. Got Indie?

Link to comment
Share on other sites

HOw is your bandwidth at the transmitting site? I think what you might want is to use Icecast and set the server-side buffer (I forget the exact setting at this moment) high and turn limits off. What this would do is let Winamp pull in data much faster than the stream rate to fill the buffer and get it playing faster. While still keeping the buffer amount in Winamp high.
Link to comment
Share on other sites

Have tried lowering the stream bitrate to winamp, maybe drop it to 125k for a while and see if it still does it. Have you tried another network switch to see if its that causing the buffer. 2 more things to check out and tick off the list.

RAG-FM 107.7 Raglan New Zealand & ragfm.com

........"Top Music Top of the Dial"

Click HERE to listen to the RAG-FM radio stream

Link to comment
Share on other sites

HOw is your bandwidth at the transmitting site? I think what you might want is to use Icecast and set the server-side buffer (I forget the exact setting at this moment) high and turn limits off. What this would do is let Winamp pull in data much faster than the stream rate to fill the buffer and get it playing faster. While still keeping the buffer amount in Winamp high.

 

Everything is on a 1GB LAN. I tried this method, ie. Icecast with altered burst settings with no improvement. As far as overstreaming, the only way I can describe it is that it filled the bowl with more than it could hold and the stream would stutter.

Reverend Aquaman | Station Manager | andHow.FM

Where it's *ALL* about the music!

A world-class, always eclectic, commercial-free, alternative, modern, retro, indie rock radio station.

Jamming the free world, one person at a time since 1998. Got Indie?

Link to comment
Share on other sites

Have tried lowering the stream bitrate to winamp, maybe drop it to 125k for a while and see if it still does it. Have you tried another network switch to see if its that causing the buffer. 2 more things to check out and tick off the list.

 

JC, I have also tried this. I upgraded the network switch, the core router, the network card, the PC, I even streamed in .ogg with Icecast at a much lower bitrate with no success. =(

Reverend Aquaman | Station Manager | andHow.FM

Where it's *ALL* about the music!

A world-class, always eclectic, commercial-free, alternative, modern, retro, indie rock radio station.

Jamming the free world, one person at a time since 1998. Got Indie?

Link to comment
Share on other sites

[ATTACH=CONFIG]1132[/ATTACH]

 

Here are the buffer settings that give me about 2 hours before a pre-buffer silence. That lasts about a half-second. If I set the pre-buffer any smaller I get the stutter. The Shoutcast V1 is default settings.

 

Just to add & clarify the symptoms, with this initial buffer setting it will pre-buffer with almost 60 seconds of stream, meaning the FM stream is delayed a minute or so from the live stream. After about an hour & half-2 hours, it will then pre-buffer for about a second or so and then continue to do so every hour or so. If I increase the initial buffer, which I have up to 4096KB, I get almost a 2 minute delay and about 3 hours before the stream starts to overrun, but the pre-buffer is about the same.

Reverend Aquaman | Station Manager | andHow.FM

Where it's *ALL* about the music!

A world-class, always eclectic, commercial-free, alternative, modern, retro, indie rock radio station.

Jamming the free world, one person at a time since 1998. Got Indie?

Link to comment
Share on other sites

....Drop the buffer. I was just thinking about it in my head. Call me crazy.

 

You got one client, on a local lan. If theirs no program interferrance, and one client? Drop that buffer. Just trust me on this. give it a few milli-secs, but thats it. Its un-neccessary.

KNSJ.org / 89.1 FM San Diego
Link to comment
Share on other sites

I will give that another try. I think I remember that the output buffer started to become the bottleneck and I would get stuttering. I can't recall doing that since I have switched to the SC server though.

 

Thanks for the brain refresh all the same! =D

Reverend Aquaman | Station Manager | andHow.FM

Where it's *ALL* about the music!

A world-class, always eclectic, commercial-free, alternative, modern, retro, indie rock radio station.

Jamming the free world, one person at a time since 1998. Got Indie?

Link to comment
Share on other sites

*UPDATE* after two hours the output buffer starts to stutter and it does not stop until I restart the stream. I have other output plug-ins, even direct kernel streaming but I will assume that the results will be similar to these as I was experiencing them with Icecast and others as well. Even my experiments with different encoding on the stream would all result in this same issue.

Reverend Aquaman | Station Manager | andHow.FM

Where it's *ALL* about the music!

A world-class, always eclectic, commercial-free, alternative, modern, retro, indie rock radio station.

Jamming the free world, one person at a time since 1998. Got Indie?

Link to comment
Share on other sites

The DNAS logs have nothing in them in relation to this error.

Reverend Aquaman | Station Manager | andHow.FM

Where it's *ALL* about the music!

A world-class, always eclectic, commercial-free, alternative, modern, retro, indie rock radio station.

Jamming the free world, one person at a time since 1998. Got Indie?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...