OP25 Multiple icecast broadcasts from single stream

Status
Not open for further replies.

bucket772

Member
Feed Provider
Joined
Oct 27, 2006
Messages
70
Background on the setup. RPi 3 running 2 instances op rx.py for two local sites. Successful local audio and I just got icecast2 setup to stream locally. My question is can I run icecast and push the feed to broadcastify (former firefighter and I like to provide the feed ) and also push it to the local where I can forward the port and monitor it myself with substantially less delay and better quality. I also like to remote in to the op25 web so I can lock active talkgroups during working fires and such. The broadcastify feed does not allow for that with the delay.

Thanks

Dave
KC2TWY
 

w2lie

New York DB Admin
Database Admin
Joined
Mar 2, 2004
Messages
1,626
Location
Long Island, NY
I've asked the broadcastify team to relay my icecast feeds. This allows me to feed the same info from my Icecast server to my own website and also to BCFY. From my Icecast side of the house, the BCFY feed just looks like another listener.
 

bucket772

Member
Feed Provider
Joined
Oct 27, 2006
Messages
70
any another question, can I do both feeds and both outputs from the same op25.liq file?
 

bucket772

Member
Feed Provider
Joined
Oct 27, 2006
Messages
70
they don’t go into your config. Broadcastify would be setup on their end to pull your feed as a relay instead of you pushing your feed as a source.
So I would need to give them the address to my private feed? sorry for all the questions. I also have it setup for me to monitor remotely via port forwarding. this seems like a security risk. am I wrong?

thanks
 

bucket772

Member
Feed Provider
Joined
Oct 27, 2006
Messages
70
We're really going to discourage you from asking us to relay your feeds. It's a PITA to manage.

You might have a look at liquidsoap to do this...
I do have liquidsoap running. I guess I need some guidance in how to set it up to push to two mountpoints.
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
903
Location
NE Wisconsin
You can direct separate mp3 streams out from liquidsoap using the same or a different input source. The example below assumes that you want to stream the same source to two different destinations. The first is your Icecast2 server and the second is broadcastify.com.

output.icecast(%mp3(bitrate=16, samplerate=22050, stereo=false), description="op25", genre="Public Safety", url="", fallible=false, icy_metadata="false", host="localhost", port=8000, mount="op25", password="hackme", mean(input))

output.icecast(%mp3(bitrate=16, samplerate=22050, stereo=false), description="op25", genre="Public Safety", url="", fallible=false, icy_metadata="false", host="audiox.broadcastify.com", port=80, mount="my_bcfy_mount", password="my_bcfy_password", mean(input))


Bill
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,316
Location
Talbot Co, MD
Liquidsoap can easily send a stream to two different destinations at the same time. Just add another "output" specified using the same stream name as the source.

Having said all that, an RPi3 isn't ideally suited to running multiple streams as it simply doesn't have the horsepower to do a good job of decoding multiple simultaneous TDMA voice sessions. The RPi4 is much better for those purposes.
 

bucket772

Member
Feed Provider
Joined
Oct 27, 2006
Messages
70
You can direct separate mp3 streams out from liquidsoap using the same or a different input source. The example below assumes that you want to stream the same source to two different destinations. The first is your Icecast2 server and the second is broadcastify.com.

output.icecast(%mp3(bitrate=16, samplerate=22050, stereo=false), description="op25", genre="Public Safety", url="", fallible=false, icy_metadata="false", host="localhost", port=8000, mount="op25", password="hackme", mean(input))

output.icecast(%mp3(bitrate=16, samplerate=22050, stereo=false), description="op25", genre="Public Safety", url="", fallible=false, icy_metadata="false", host="audiox.broadcastify.com", port=80, mount="my_bcfy_mount", password="my_bcfy_password", mean(input))


Bill
looks like that worked. Thanks
 

bucket772

Member
Feed Provider
Joined
Oct 27, 2006
Messages
70
Liquidsoap can easily send a stream to two different destinations at the same time. Just add another "output" specified using the same stream name as the source.

Having said all that, an RPi3 isn't ideally suited to running multiple streams as it simply doesn't have the horsepower to do a good job of decoding multiple simultaneous TDMA voice sessions. The RPi4 is much better for those purposes.
understood. I had tried to add 2 inputs in op25.liq but was only able to get one to work. thumbing through some old threads, it looks as though I need to add input_a and input_b in front of each separate line.

Thanks

Dave
 
Last edited:

boatbod

Member
Joined
Mar 3, 2007
Messages
3,316
Location
Talbot Co, MD
understood. I had tried to add 2 inputs in op25.liq but was only able to get one to work. thumbing through some old threads, it looks as though I need to add input_a and input_b in front of each separate line.

Thanks

Dave
For a second instance of op25 you need different wireshark udp ports (-u 23456 / -u 23466) and you generally need to pick a different udp port for the http terminal if you use that option. The same port numbers need to be used in the audio.py line of the liquid soap file too.
 

bucket772

Member
Feed Provider
Joined
Oct 27, 2006
Messages
70
For a second instance of op25 you need different wireshark udp ports (-u 23456 / -u 23466) and you generally need to pick a different udp port for the http terminal if you use that option. The same port numbers need to be used in the audio.py line of the liquid soap file too.
I have two different -u xxxxx ports setup as well as separate ports for the http terminal. I've had it working in the past reasonably well but forgot some of the stuff that I did. I have an older pi running op25 with darkice but now with all this time on my hands its time to get the new one up and running on liquidsoap and auto starting on reboot, etc.
 

bucket772

Member
Feed Provider
Joined
Oct 27, 2006
Messages
70
I have two different -u xxxxx ports setup as well as separate ports for the http terminal. I've had it working in the past reasonably well but forgot some of the stuff that I did. I have an older pi running op25 with darkice but now with all this time on my hands its time to get the new one up and running on liquidsoap and auto starting on reboot, etc.
so for proof of concept, how would I label the outputs in op25.liq?

input_A = mksafe(input.external(buffer=0.25, channels=2, samplerate=8000, restart_on_error=false, "./audio.py -x 2 -s -u 24680"))

input_B = mksafe(input.external(buffer=0.25, channels=2, samplerate=8000, restart_on_error=false, "./audio.py -x 2 -s -u 24690"))

output.icecast(%mp3(bitrate=16, samplerate=22050, stereo=false), description="", genre="", url="", fallible=false, icy_metadata="false", host="", port=8000, mount="", password="", mean(input))

output.icecast(%mp3(bitrate=16, samplerate=22050, stereo=false), description="", genre="Public Safety", url="", fallible=false, icy_metadata="false", host="audio3.broadcastify.com", port=80, mount="", password="", mean(input))

keeping in mind that I will be pushing one output locally and one to bcfy. So 2 streams and 4 outputs. I plan to upgrade the RPi to a 4, so this is just to see if I can get it working.

Thanks

Dave
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
903
Location
NE Wisconsin
Edit your two output..icecast lines to use the two new input labels: input_A & input_B in place of ….,mean(input)) and you should be good to go.
 

bucket772

Member
Feed Provider
Joined
Oct 27, 2006
Messages
70
Edit your two output..icecast lines to use the two new input labels: input_A & input_B in place of ….,mean(input)) and you should be good to go.
awesome. I'll give that a shot when I get home from work. I would have tried adding that in the begining, kinda like how its done on the input lines. Total Linux noob I am.

Thanks

Dave
 

bucket772

Member
Feed Provider
Joined
Oct 27, 2006
Messages
70
Having said all that, an RPi3 isn't ideally suited to running multiple streams as it simply doesn't have the horsepower to do a good job of decoding multiple simultaneous TDMA voice sessions. The RPi4 is much better for those purposes.
Figured I would try with the RPi3 until the 4 comes. So far it seems to be doing OK. I have 2 rx.py loading at startup. In liquidsoap I have the 2 feeds listed as input_A and input_B with different -U xxxxx numbers. I have 4 output entries. Each stream is going to broadcastify and icecast. I forwarded the port on icecast and I point VLC on iOS to that address. much lower latency the the broadcastify feed. I'll see how stable it is over the next few days.

Thanks all for the help.
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
903
Location
NE Wisconsin
Bucket772,

As a suggestion, increase the default buffer=0.02 option to buffer=0.25 on the input= line(s) in your op25.liq to allow a bit of buffering to overcome any noticeable choppiness in the audio streams. In particular, listen carefully to the start of voice transmissions for any indication
that the first word or syllable is missing or getting chopped off as an indication that you need to increase the buffer.

I routinely option mine for 0.25 as my default that dates back to my initial adoption of liquidsoap as a replacement for darkice on the
Raspberry Pi-3, 3B, and 3B+ SBC's. Although it's not necessary, I have continued to use this setting since adding a couple of the RPi-4's
to my Pi stack as a matter of uniformity.

input = mksafe(input.external(buffer=0.25, channels=2, samplerate=8000, restart_on_error=false, "./audio.py -x 2.5 -s"))

Bill
 

bucket772

Member
Feed Provider
Joined
Oct 27, 2006
Messages
70
Bucket772,

As a suggestion, increase the default buffer=0.02 option to buffer=0.25 on the input= line(s) in your op25.liq to allow a bit of buffering to overcome any noticeable choppiness in the audio streams. In particular, listen carefully to the start of voice transmissions for any indication
that the first word or syllable is missing or getting chopped off as an indication that you need to increase the buffer.

I routinely option mine for 0.25 as my default that dates back to my initial adoption of liquidsoap as a replacement for darkice on the
Raspberry Pi-3, 3B, and 3B+ SBC's. Although it's not necessary, I have continued to use this setting since adding a couple of the RPi-4's
to my Pi stack as a matter of uniformity.

input = mksafe(input.external(buffer=0.25, channels=2, samplerate=8000, restart_on_error=false, "./audio.py -x 2.5 -s"))

Bill
that is how I have mine set. So far it seems to be fine. I have been monitoring through VLC on both feeds and the audio quality is on point. The RPi has been running since the 11th and I haven't had to reboot once.
 
Status
Not open for further replies.
Top