Op25 liquidsoap question

Falcon4

Member
Joined
May 5, 2017
Messages
91
Location
Coatesville,PA
Hello everyone long time. I recently blew up my op25 build and started fresh. (New build looks great @boatbod I like how you can see all active TGs) Now that I have that down, I want to go down the liquidsoap path and take on another challenge. My goal is to stream op25 but not to broadcastify but have a personal server that I can log into and listen on my phone. First off is any of this possible? Secondly would I need dark ice? If someone would advise I would greatly appreciate it!!!

Falcon4
 

boatbod

Member
Joined
Mar 3, 2007
Messages
2,725
Location
Talbot Co, MD
Hello everyone long time. I recently blew up my op25 build and started fresh. (New build looks great @boatbod I like how you can see all active TGs) Now that I have that down, I want to go down the liquidsoap path and take on another challenge. My goal is to stream op25 but not to broadcastify but have a personal server that I can log into and listen on my phone. First off is any of this possible? Secondly would I need dark ice? If someone would advise I would greatly appreciate it!!!

Falcon4
Totally possible :)

1. Install op25 and liquidsoap
2. Install icecast2 package (an icecast server)
3. Set up op25 and liquidsoap to run headless (at boot under systemd control) and talk to your icecast server.

See the following files for hints and example scripts:
~/op25/README-rpi3-liquidsoap
~/op25/op25/gr-op25_repeater/apps/op25.liq
~/op25/op25/gr-op25_repeater/apps/op25-rx.service
~/op25/op25/gr-op25_repeater/apps/op25-liq.service
 

Falcon4

Member
Joined
May 5, 2017
Messages
91
Location
Coatesville,PA
Totally possible :)

1. Install op25 and liquidsoap
2. Install icecast2 package (an icecast server)
3. Set up op25 and liquidsoap to run headless (at boot under systemd control) and talk to your icecast server.

See the following files for hints and example scripts:
~/op25/README-rpi3-liquidsoap
~/op25/op25/gr-op25_repeater/apps/op25.liq
~/op25/op25/gr-op25_repeater/apps/op25-rx.service
~/op25/op25/gr-op25_repeater/apps/op25-liq.service
Thank you this will definitely keep me busy for a while!
 

perryw

Newbie
Premium Subscriber
Joined
Apr 24, 2021
Messages
1
I actually just setup OP25 with Icecast yesterday and today. I setup an Ubuntu VM on my little proxmox machine that also runs Home Assistant. I had first tried SDRTrunk and got Icecast working with it but it proved to be too much for the little computer. OP25 seems to be running just fine and I can connect from my desktop.

VLC on my iPhone seemed to make the phone run really warm so I'll try to find another app for connecting to the stream. Then do a port forward to the VM so I can connect away from home.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
2,725
Location
Talbot Co, MD
I actually just setup OP25 with Icecast yesterday and today. I setup an Ubuntu VM on my little proxmox machine that also runs Home Assistant. I had first tried SDRTrunk and got Icecast working with it but it proved to be too much for the little computer. OP25 seems to be running just fine and I can connect from my desktop.

VLC on my iPhone seemed to make the phone run really warm so I'll try to find another app for connecting to the stream. Then do a port forward to the VM so I can connect away from home.
Personally I try and avoid using Icecast because it requires use of the aloop kernel module which has issues (especially with RPi Raspbian). Liquidsoap is more flexible and doesn't require such a temperamental setup.
 

Falcon4

Member
Joined
May 5, 2017
Messages
91
Location
Coatesville,PA
Edit: found extra # in code I now have another error though I'm going to keep fighting until I got it fixed this op25.liq is wonky.
 
Last edited:

Falcon4

Member
Joined
May 5, 2017
Messages
91
Location
Coatesville,PA
Ok so it appears everything is running however I am getting strange error flushing buffer. I read in a previous thread that shouldn't be an issue. I have my shell file setup. Before I automate it how can I verify this is broadcasting on my network. I have vlc on my phone tried 10.0.0.xxx:8000 and http://10.0.0.xxx:8000 with no success I also set up a port forward for the pi. Any suggestions?
 

boatbod

Member
Joined
Mar 3, 2007
Messages
2,725
Location
Talbot Co, MD
Ok so it appears everything is running however I am getting strange error flushing buffer. I read in a previous thread that shouldn't be an issue. I have my shell file setup. Before I automate it how can I verify this is broadcasting on my network. I have vlc on my phone tried 10.0.0.xxx:8000 and http://10.0.0.xxx:8000 with no success I also set up a port forward for the pi. Any suggestions?
The "strange error" thing can generally be ignored.

What mount point are you using to stream to your icecast server?
Basically the way to listen to it locally is "http://youripaddress:8000/mountpoint

Can you access the icecast server at "http://youripaddress:8000/admin/"?
 

Falcon4

Member
Joined
May 5, 2017
Messages
91
Location
Coatesville,PA
Ok im back at it now that the draft is over. It looks like I'm getting a connection error. Everything matches up I checked my Meta.Json file,icecast2.xml. here is my rx.py and the error im getting any thoughts would be greatly appreciated as always. 20210501_184423.jpg20210501_184551.jpg
 

Falcon4

Member
Joined
May 5, 2017
Messages
91
Location
Coatesville,PA
As in all things sometimes it's good to start from the top. I'm going to eat my Wheaties tomorrow and try again. I'm also going to read over the several threads on here see if I missed something. The Readme is pretty straight forward instead of making passwords I'm going to leave everything default and see if that helps.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
2,725
Location
Talbot Co, MD
Looks like liquidsoap cannot connect to the icecast server.
Is the server running?
Code:
sudo systemctl start icecast2
ps -ef | grep icecast
icecast2  484565       1  0 21:47 ?        00:00:00 /usr/bin/icecast2 -b -c /etc/icecast2/icecast.xml
gnorbury  484602  484546  0 21:48 pts/4    00:00:00 grep --color=auto icecast


sudo systemctl status icecast2

● icecast2.service - LSB: Icecast2 streaming media server
     Loaded: loaded (/etc/init.d/icecast2; generated)
     Active: active (running) since Sat 2021-05-01 21:47:21 EDT; 54s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 484560 ExecStart=/etc/init.d/icecast2 start (code=exited, status=0/SUCCESS)
      Tasks: 4 (limit: 18982)
     Memory: 2.3M
     CGroup: /system.slice/icecast2.service
             └─484565 /usr/bin/icecast2 -b -c /etc/icecast2/icecast.xml

May 01 21:47:21 yoga2 systemd[1]: Starting LSB: Icecast2 streaming media server...
May 01 21:47:21 yoga2 icecast2[484560]:  * Starting streaming media server icecast2
May 01 21:47:21 yoga2 icecast2[484560]:    ...done.
May 01 21:47:21 yoga2 systemd[1]: Started LSB: Icecast2 streaming media server.
May 01 21:47:21 yoga2 icecast2[484565]: [2021-05-01  21:47:21] WARN CONFIG/_parse_root Warning, <location> not configured, using default value ">
May 01 21:47:21 yoga2 icecast2[484565]: [2021-05-01  21:47:21] WARN CONFIG/_parse_root Warning, <admin> contact not configured, using default va>
lines 1-16/16 (END)
 

Falcon4

Member
Joined
May 5, 2017
Messages
91
Location
Coatesville,PA
Looks like liquidsoap cannot connect to the icecast server.
Is the server running?
Code:
sudo systemctl start icecast2
ps -ef | grep icecast
icecast2  484565       1  0 21:47 ?        00:00:00 /usr/bin/icecast2 -b -c /etc/icecast2/icecast.xml
gnorbury  484602  484546  0 21:48 pts/4    00:00:00 grep --color=auto icecast


sudo systemctl status icecast2

● icecast2.service - LSB: Icecast2 streaming media server
     Loaded: loaded (/etc/init.d/icecast2; generated)
     Active: active (running) since Sat 2021-05-01 21:47:21 EDT; 54s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 484560 ExecStart=/etc/init.d/icecast2 start (code=exited, status=0/SUCCESS)
      Tasks: 4 (limit: 18982)
     Memory: 2.3M
     CGroup: /system.slice/icecast2.service
             └─484565 /usr/bin/icecast2 -b -c /etc/icecast2/icecast.xml

May 01 21:47:21 yoga2 systemd[1]: Starting LSB: Icecast2 streaming media server...
May 01 21:47:21 yoga2 icecast2[484560]:  * Starting streaming media server icecast2
May 01 21:47:21 yoga2 icecast2[484560]:    ...done.
May 01 21:47:21 yoga2 systemd[1]: Started LSB: Icecast2 streaming media server.
May 01 21:47:21 yoga2 icecast2[484565]: [2021-05-01  21:47:21] WARN CONFIG/_parse_root Warning, <location> not configured, using default value ">
May 01 21:47:21 yoga2 icecast2[484565]: [2021-05-01  21:47:21] WARN CONFIG/_parse_root Warning, <admin> contact not configured, using default va>
lines 1-16/16 (END)
I'm starting fresh tomorrow morning. I have read several threads in the meantime. I did put a special character in my password and I was kind of distracted when I did my initial install. I blew it all up got op25 back on and im starting from the top tomorrow morning leaving everything default. 2nd time is always the charm. 😊
 

Falcon4

Member
Joined
May 5, 2017
Messages
91
Location
Coatesville,PA
I am happy to report everything is a success!!! I'm using VLC can hear it on my local network and on the go!! The added bonus is that I can see the calls that are coming in on my smartwatch 🤯 I wasn't expecting that at all. Salute to all who made this a possibility this setup is way better than any sds100 I couldve owned and is super discrete with my Bluetooth headphones. Just a couple of quick questions 1. I put the Pi in a DMZ and port forwarded it can outside sources infiltrate my network? 2. How many users could I share my feed to without bogging down the feed or the network not that I plan on releasing this to the world but I have a couple of buddies that would love this.
 

Falcon4

Member
Joined
May 5, 2017
Messages
91
Location
Coatesville,PA
One last question is it safe to assume the lower the sample rate the lower the latency? I already adjusted burst rate to 0. What's the lowest operating sample rate?
 

boatbod

Member
Joined
Mar 3, 2007
Messages
2,725
Location
Talbot Co, MD
I am happy to report everything is a success!!! I'm using VLC can hear it on my local network and on the go!! The added bonus is that I can see the calls that are coming in on my smartwatch 🤯 I wasn't expecting that at all. Salute to all who made this a possibility this setup is way better than any sds100 I couldve owned and is super discrete with my Bluetooth headphones. Just a couple of quick questions 1. I put the Pi in a DMZ and port forwarded it can outside sources infiltrate my network? 2. How many users could I share my feed to without bogging down the feed or the network not that I plan on releasing this to the world but I have a couple of buddies that would love this.
If would NOT RECOMMEND putting op25 in a DMZ because the web interface has zero security. If you must have it accessible from outside your network I would recommend either a VPN or an SSH tunnel.

One last question is it safe to assume the lower the sample rate the lower the latency? I already adjusted burst rate to 0. What's the lowest operating sample rate?
Latency is an issue with any icecast system. You can minimize it by setting burst-size to 0, but beyond that there isn't a lot you can do.
op25 sample rate really won't play much of a part in overall latency, but there typically isn't any point having the 'rate' parameter any larger than 1000000
 

Falcon4

Member
Joined
May 5, 2017
Messages
91
Location
Coatesville,PA
Thank you! SSH or VPN that opens a whole new can of worms. Hypothetically,couldn't I port forward port 8000 and configure my router to only accept my connection?
 

boatbod

Member
Joined
Mar 3, 2007
Messages
2,725
Location
Talbot Co, MD
Thank you! SSH or VPN that opens a whole new can of worms. Hypothetically,couldn't I port forward port 8000 and configure my router to only accept my connection?
You can do anything you feel comfortable allowing on your own network, but I'm cautioning that op25's http service has very limited error checking and it really wouldn't surprise me if it were possible to malform a request and cause malicious code to be injected. I personally would not open up a port without it being protected by additional security.
 

bucket772

Member
Feed Provider
Joined
Oct 27, 2006
Messages
34
If would NOT RECOMMEND putting op25 in a DMZ because the web interface has zero security. If you must have it accessible from outside your network I would recommend either a VPN or an SSH tunnel.
Can you point me to a "for dummies" for this? I don't have my Pi in a DMZ but I do have a port open to view the web interface and also icecast so I can use VLC from the mobile device.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
2,725
Location
Talbot Co, MD
 
Top