OP25 (boatbod) -> Liquid Soap -> Ice Cast: Very high latency

xtraorange

Newbie
Joined
Mar 5, 2025
Messages
2
Hello all-

I was able to successfully setup my RTL-SDR Blog v4 on a VM (hosted by proxmox on my small server cluster), feeding through liquidsoap to IceCast on another VM using docker. Resource wise nothing is pegging, so I don't think I'm choking anything.

Everything is working well now, except that I cannot seem to squash down the latency. It's running pretty consistantly around 30 seconds delay from the live broadcast.

I am 100% new to this, so I'm not sure what to expect here. I'm hoping for a near-live (within a second or two?) performance, but is that unrealistic? Because it's running from a VM, I've been having a hard time determining where the delay originates (since I can't listen to it live) before it's fed through the pipeline. I've done a fair amount of searching and experimenting with settings on liquidsoap and icecast, but I'm wondering if the problem is originating in OP25.

I can post configs or whatever else would be helpful - would love any wisdom you can provide here, even if it's just to reduce my expectations.
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
1,065
Location
NE Wisconsin
The approximate 30 second delay is inherent in the design of the Icecast server. You may be able to shave off a few seconds by disabling
burst-on-connect, but it's probably not worthwhile. You'll have to explore other technology options if it's your intent to reduce latency
to a minimum.
 

xtraorange

Newbie
Joined
Mar 5, 2025
Messages
2
The approximate 30 second delay is inherent in the design of the Icecast server. You may be able to shave off a few seconds by disabling
burst-on-connect, but it's probably not worthwhile. You'll have to explore other technology options if it's your intent to reduce latency
to a minimum.
Thank you so much - ChatGPT mislead me here. Any recommendations?

You might try routing your audio to Sonobus? I've had good luck with this.

That looks like it would be perfect, except I'm really trying to establish an end point on a browser. The use case is that I'm developing a small web page to capture audio, display meta data, and give me some controls over OP25. I'd really like it all on the same page if possible so that I'm not having to juggle apps (and it makes it easy to share or whatever).
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,466
Location
Talbot Co, MD
As noted by wgbecks, the latency is an inherent issue with Icecast. OP25 streams it's udp pcm to liquidsoap in real time and anything that happens after that is largely out of your or my control. I'm not familiar with SonoBus , but will take a look at that when I get a spare couple moments.
 

dispatchgeek

Control channel goes "brrrrr"
Joined
Feb 29, 2004
Messages
362
Location
Between the cornfields and the pastures, Michigan.
For the good of the order, Sonobus is really designed for musicians to jam together remotely. My specifc use case is routing low latency audio to my Iphone that can mix with other apps using audio. I use this to listen to Apple Music and stream my scanner through the car stereo speakers at the same time.

I haven't found any way to send alpha tags through it, but I can run it with the ProScan self hosted webpage up on my phone. The audio syncs well with the virtual display. I am positive that it would also sync well with the OP25 WebUI.

Another option is GitHub - eshaz/icecast-metadata-js: Browser and NodeJS packages for playing and reading Icecast compatible streaming audio with realtime metadata updates. (@boatbod- This may be more worth your time to investigate as it would feel a bit more native to OP25)

I believe this is what ProScan uses for his webserver application. It is speedy and web based, so this may fall in line more with xtraorange's plan. It's also used on dsmrad.io. Icecast-metadata-js does a good job of syncing meta data with the audio stream.

Here is a discussion on Stackoverflow between a user and the icecast-metadata-js developer; I am not proficient in coding so it's a bit above my head. Streaming Icecast Audio & Metadata with Javascript and the Web Audio API
 
Top