OP25 Experiments with op25 and liquidsoap

Status
Not open for further replies.

boatbod

Member
Joined
Mar 3, 2007
Messages
3,410
Location
Talbot Co, MD
Also @boatbod off topic, is it at all possible with the software if I added another sdr, does the software support the ability for me to listen to two different talkgroups much like the dispatcher consoles do? I'm not expecting it to, but was just wondering.
op25 does not presently support multiple sdr for P25 Trunked (rx.py). You can do multiple radios for the multi-protocol receiver (multi_rx) but that doesn't do P25 trunking.

That said, it's entirely possible to run multiple instances of op25 on the same machine with multiple sdr hardware. Configuration gets interesting, but it's feasible and something that I do for streaming multiple feeds.
 

djshadowxm81

Member
Premium Subscriber
Joined
May 5, 2010
Messages
79
op25 does not presently support multiple sdr for P25 Trunked (rx.py). You can do multiple radios for the multi-protocol receiver (multi_rx) but that doesn't do P25 trunking.

That said, it's entirely possible to run multiple instances of op25 on the same machine with multiple sdr hardware. Configuration gets interesting, but it's feasible and something that I do for streaming multiple feeds.

I kinda figured that and was slightly afraid of that. But I can understand the logic would be a nightmare to do that.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,410
Location
Talbot Co, MD
I kinda figured that and was slightly afraid of that. But I can understand the logic would be a nightmare to do that.

It probably wouldn't be awful, but in my opinion it would require a significant rewrite of the trunking module in order to make it work properly.
 
Joined
Dec 19, 2002
Messages
61
I have been testing the liquidsoap setup on my spare rpi 3b and have a couple of observations:
First, the audio level is lower than I would like and the -x parameter in the rx.py command line appears to have no effect.
Second, there is a high frequency component in the audio that makes it sound tinny.
I am running darkice on my main rpi and have a lowpass filter set in the configuration file, but have not found a similar setting for liquidsoap.

You are correct that the -x parameter won't help on the rx.py command line because the audio processing is happening outside of rx.py. Try putting the -x parameter on the ./audio.py command line in your .liq script instead.

Sorry, can't help on the high frequency noise. I've noticed that with my RPi3 as well (doesn't happen on other types of hardware) and I suspect it is something to do with either the power supply or simply poor hardware design of the audio circuit. Perhaps you could use a USB sound card?

Following up on this subthread, I did find a way to put a lowpass filter into liquidsoap. I also added a highpass filter to reduce the bass that some mics produce.

Code:
#!/usr/bin/liquidsoap

# Example liquidsoap streaming from op25 to icecast
# (c) 2019, gnorbury@bondcar.com
#

set("log.stdout", true)
set("log.file", false)
set("log.level", 1)

# Make the native sample rate compatible with op25
set("frame.audio.samplerate", 8000)

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

#High pass filter
input = filter.iir.butterworth.high(frequency = 200.0, order = 4, input)

#Low pass filter
input = filter.iir.butterworth.low(frequency = 3250.0, order = 4, input)

# LOCAL AUDIO
# Uncomment the appropriate line below to enable local sound
#
# Default audio subsystem
#out(input)
#
# PulseAudio
#output.pulseaudio(input)
#
# ALSA
#output.alsa(input)


# ICECAST STREAMING
# Uncomment to enable output to an icecast server
# Change the "host", "password", and "mount" strings appropriately first!
# For metadata to work properly, the host address given here MUST MATCH the address in op25's meta.json file
#
output.icecast(%mp3(bitrate=16, samplerate=22050, stereo=false), description="op25", name="Onondaga County Public Safety", fallible=false, icy_metadata="false", host="audio#.broadcastify.com", port=80, mount="************", password="********", mean(input))
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,410
Location
Talbot Co, MD
I am wondering what @boatbod thinks about the nrj compression mentioned in this linked forum? Liquidsoap example script for smart playlist (kind of) - Airtime Support Discussions on Sourcefabric Forum

How could you incorporate that into the .liq file? Would it just be
Code:
 input = nrj(input)
on its own line after the mksafe line?

I've not personally used compression, but I know people that have and like it. From a configuration standpoint I think what you defined should work but the best way to find out is by trying it!
 

sqlgeek

Member
Joined
Jun 21, 2014
Messages
33
Location
Griffin, GA
I've not personally used compression, but I know people that have and like it. From a configuration standpoint I think what you defined should work but the best way to find out is by trying it!

I added it to the .liq last night. I also added the high and low pass filters suggested in the other post. I am noticing a little difference, but it sounds more like the high pass filter is doing its job than the compression. I think I really need a limiter so I can bring up the volume on some of the low transmissions but tone down some of those that are clipping. Maybe you can listed to the archives from yesterday around lunch time as compared to today and see if you can tell the difference.
 
Status
Not open for further replies.
Top