Boatbod OP25 GUI / no audio

Status
Not open for further replies.

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
1,035
Location
NE Wisconsin
Connect to the IP address of your Icecast Server, presumably on default port 8000. Click on Administration and login as admin using the password you entered when running the installer. Now click on Mountpoint List and look to see if the mountpoint specified in your
op25.liq file appears. I am guessing it likely will not.

Can you post your op25.liq file being careful to redact the password?

Bill
 

n8zuz

Member
Joined
Jul 17, 2004
Messages
61
Location
Windy WY
First, Thank you Bill for your help. EDIT:(this morning I forgot I closed all my terminals, now that I have all 3 going again) the mountpoint is /op25. On that same page when I click on "List Clients" it shows none, even though I am trying to connect to 10.1.4.189:8000 with Winamp. However, I don't find a way to add a password in Winamp. Is that something that needs done?

My op25.liq is:

#!/usr/bin/liquidsoap

# Example liquidsoap streaming from op25 to icecast
# (c) 2019-2021 gnorbury@bondcar.com, wllmbecks@gmail.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.25, channels=2, samplerate=8000, restart_on_error=false, "./audio.py -x 1.25 -s"))
# Consider increasing the buffer value on slow systems such as RPi3. e.g. buffer=0.25
# Longer buffer results in less choppy audio but at the expense of increased latency.

# OPTIONAL AUDIO SIGNAL PROCESSING BLOCKS
# Uncomment to enable
#
# 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)

# Compression
#input = compress(input, attack = 2.0, gain = 0.0, knee = 13.0, ratio = 2.0, release = 12.3, threshold = -18.0)

# Compand
input = compand(input, mu = 0.5)

# Normalization
#input = normalize(input, gain_max = 6.0, gain_min = -6.0, target = -16.0, threshold = -65.0)

# LOCAL AUDIO OUTPUT
# 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", genre="Public Safety", url="", fallible=false, icy_metadata="false", host="10.1.4.189", port=8000, mount="op25", password="my actual password", mean(input))
 
Last edited:

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
1,035
Location
NE Wisconsin
First, Thank you Bill for your help. You are correct. When I log into the icecast server there isn't anything in the mountpoint. My op25.liq is:

#!/usr/bin/liquidsoap

# Example liquidsoap streaming from op25 to icecast
# (c) 2019-2021 gnorbury@bondcar.com, wllmbecks@gmail.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.25, channels=2, samplerate=8000, restart_on_error=false, "./audio.py -x 1.25 -s"))
# Consider increasing the buffer value on slow systems such as RPi3. e.g. buffer=0.25
# Longer buffer results in less choppy audio but at the expense of increased latency.

# OPTIONAL AUDIO SIGNAL PROCESSING BLOCKS
# Uncomment to enable
#
# 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)

# Compression
#input = compress(input, attack = 2.0, gain = 0.0, knee = 13.0, ratio = 2.0, release = 12.3, threshold = -18.0)

# Compand
input = compand(input, mu = 0.5)

# Normalization
#input = normalize(input, gain_max = 6.0, gain_min = -6.0, target = -16.0, threshold = -65.0)

# LOCAL AUDIO OUTPUT
# 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", genre="Public Safety", url="", fallible=false, icy_metadata="false", host="10.1.4.189", port=8000, mount="op25", password="my actual password", mean(input))

Glad to help out!
Is Icecast running on the same machine as is liquidsoap? It so, then change the host address in your output.icecast() line pointing it to "localhost". IE: host="localhost", port=8000. Doing so will direct liquidsoap to establish a connection to Icecast where "localhost" is mapped to the network loopback port that lives at IP address of 127.0.0.1 via the /etc/hosts file.

/etc/hosts
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.1.1 raspberrypi-4B


Bill
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
1,035
Location
NE Wisconsin
Glad to help out!
Is Icecast running on the same machine as is liquidsoap? It so, then change the host address in your output.icecast() line pointing it to "localhost". IE: host="localhost", port=8000. Doing so will direct liquidsoap to establish a connection to Icecast where "localhost" is mapped to the network loopback port that lives at IP address of 127.0.0.1 via the /etc/hosts file.

/etc/hosts
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.1.1 raspberrypi-4B


Bill
Sorry! It looks like liquidsoap is talking to icecast. I need to learn to read everything before responding.

So from a browser or media player such as Winamp or VLC running on a PC connected to your home network, you would enter the URL to reach Icecast per the following example using the IP address of the machine running Icecast.

http://<IP Address of Icecast Machine>:8000/op25 and the browser or player should connect and start playing the stream.

Bill
 

n8zuz

Member
Joined
Jul 17, 2004
Messages
61
Location
Windy WY
OK, I feel dumb. I didn't put the /op25 at the end of my stream. Now that I did, I am getting audio with both winamp and vlc. However, I am not getting any metadata. In my terminal 3 I'm getting:
10/22/21 11:12:19.295104 voice update: tg(6571), freq(155820000), slot(-), prio(3)
10/22/21 11:12:19.400426 meta_server::send_metadata(): metadata update error: 400
errors
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
1,035
Location
NE Wisconsin
OK. You're getting there! If running rx.py then you must include the -M meta.json parameter on your rx.py command line and whereby your meta.json file contains the same information as your placed into op25.liq to instruct Liquidsoap how to connect to Icecast.

If your configuration uses multi_rx.py, then you'll find similar fields as found in meta.json under the metadata section of your op25 JSON file.
Of course, either configuration scheme requires a TAG file to have be crated that I assume has already been done.

Feel free to PM me and we can arrange chat offline via phone if that would help.

Bill
 

n8zuz

Member
Joined
Jul 17, 2004
Messages
61
Location
Windy WY
I tried to PM you but this was too large.

I'm close. I had the metadata working before I got the audio working (in the terminal it was working anyhow but now it doesn't) but I must have tweaked the wrong thing somewhere along the way.

My start string command I put in my first terminal is:
./rx.py --nocrypt --args "rtl=0" --gains 'lna:36' -S 57600 -q 0 -d 0 -v 1 -2 -T trunk.tsv -V -w -M meta.json 2> stderr.2 and it runs in the terminal like it should.

My trunk.tsv looks like:
"Sysname" "Control Channel List" "Offset" "NAC" "Modulation" "TGID Tags File" "Whitelist" "Blacklist" "Center Frequency"
"Wyolink" 155.505 "0x1a4" "cqpsk" "wyolink.tsv"
and my wyolink.tsv has my talkgroups working correctly in my first terminal running op25 as it shows the alpha tags I've given to my tgids.

My meta.json file looks like:
{
"icecastPass": "mypassword",
"icecastMountpoint": "/op25", <--I'm not sure this is correct.
"icecastServerAddress": "10.1.4.189:8000", <-----where my op25/liquid soap and icecast are running.
"delay": "0.0", "icecastMountExt": ".m3u",
"meta_format_idle": "[idle]",
"meta_format_tgid": "[%TGID%]",
"meta_format_tag": "[%TGID%] %TAG%"

My 2nd terminal looks like:
jd@TechLaptop:~/op25/op25/gr-op25_repeater/apps$ ./op25.liq
2021/10/22 13:54:40 >>> LOG START
2021/10/22 13:54:40 [main:3] Liquidsoap 1.4.1
2021/10/22 13:54:40 [main:3] Using: bytes=[distributed with OCaml 4.02 or above] pcre=[unspecified] sedlex=2.1 menhirLib=20200123 dtools=0.4.1 duppy=0.8.0 cry=0.6.4 mm=0.5.0 xmlplaylist=0.1.3 lastfm=0.3.2 ogg=0.5.2 vorbis=0.7.1 opus=0.1.3 speex=0.2.1 mad=0.4.4 flac=0.1.5 flac.ogg=0.1.5 dynlink=[distributed with Ocaml] lame=0.3.2 shine=0.2.0 gstreamer=0.3.0 frei0r=0.1.0 theora=0.3.1 gavl=0.1.5 ffmpeg=0.4.1 bjack=0.1.4 alsa=0.2.3 ao=0.2.0 samplerate=0.1.2 taglib=0.3.1 ssl=0.5.9 magic=0.7.3 camomile=[unspecified] yojson=[unspecified] faad=0.4.0 soundtouch=0.1.7 portaudio=0.2.1 pulseaudio=0.1.2 ladspa=0.1.4 sdl=0.9.1 camlimages=4.2.0 lo=0.1.2 gd=1.0a5
2021/10/22 13:54:40 [gstreamer.loader:3] Loaded GStreamer 1.16.2 0
2021/10/22 13:54:40 [dynamic.loader:3] Could not find dynamic module for fdkaac encoder.

My op25.liq file is:
#!/usr/bin/liquidsoap

# Example liquidsoap streaming from op25 to icecast
# (c) 2019-2021 gnorbury@bondcar.com, wllmbecks@gmail.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.25, channels=2, samplerate=8000, restart_on_error=false, "./audio.py -x 1.25 -s"))
# Consider increasing the buffer value on slow systems such as RPi3. e.g. buffer=0.25
# Longer buffer results in less choppy audio but at the expense of increased latency.

# OPTIONAL AUDIO SIGNAL PROCESSING BLOCKS
# Uncomment to enable
#
# 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)

# Compression
#input = compress(input, attack = 2.0, gain = 0.0, knee = 13.0, ratio = 2.0, release = 12.3, threshold = -18.0)

# Compand
input = compand(input, mu = 0.5)

# Normalization
#input = normalize(input, gain_max = 6.0, gain_min = -6.0, target = -16.0, threshold = -65.0)

# LOCAL AUDIO OUTPUT
# 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", genre="Public Safety", url="", fallible=false, icy_metadata="false", host="localhost", port=8000, mount="op25", password="mypassword", mean(input))

In my 3rd terminal, I get errors when I run
jd@TechLaptop:~/op25/op25/gr-op25_repeater/apps$ tail -f stderr.2
10/22/21 13:55:46.125941 meta_server::send_metadata(): metadata update error: 400
10/22/21 13:55:47.598040 voice update: tg(1010), freq(155820000), slot(-), prio(3)
10/22/21 13:55:47.659424 meta_server::send_metadata(): metadata update error: 400

So it appears this 3rd terminal is calling for something I don't have set right that I screwed up along the way. Perhaps there is another file I've screwed up not listed above.

Thanks again for the help. It's close!
 

n8zuz

Member
Joined
Jul 17, 2004
Messages
61
Location
Windy WY
I have everything up and going like it should. I have audio and TGIDs being broadcast from my icecast server to winamp. I had put my server's IP instead of "localhost" in some files. Once I went back to "localhost" and restarted everything, it appears it's all working. Thanks again for the help.
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
1,035
Location
NE Wisconsin
I have everything up and going like it should. I have audio and TGIDs being broadcast from my icecast server to winamp. I had put my server's IP instead of "localhost" in some files. Once I went back to "localhost" and restarted everything, it appears it's all working. Thanks again for the help.
Gland to be able to help. Enjoy!
 

DP1947

Member
Premium Subscriber
Joined
Sep 29, 2005
Messages
22
Location
Indiana
Sorry for jumping in. I've been pulling my hair out for several days wi the no-audio problem. I've read this post so many times and I'm just not having any luck. I have icecast running with a mount point. OP25 and liquidsoap with meta data. I can stream seemingly ok, with meta tags working. I just have no audio. I suspect it's my use of the pi's ip address instead of localhost. ie: I'm not listening to the audio from op25. But I just can't find it. A kick in the right direction would be much appreciated.
ps: I did modify audio.py to use the local ip, but now when I put it back to 0.0.0.0, sockaudio says address is in use. the only way I can get it to run is to use the pi's ip.
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
1,035
Location
NE Wisconsin
Dan,

Can you post your rx.py command line or JSON if using multi_rx.py along with your op25.liq configuration files? I suspect there is a conflict among your configuration files but it would be most helpful to see what you have.

Bill
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,414
Location
Talbot Co, MD
ps: I did modify audio.py to use the local ip, but now when I put it back to 0.0.0.0, sockaudio says address is in use. the only way I can get it to run is to use the pi's ip.
You need to remove the '-U' command line option or the address will always be in use.
 

DP1947

Member
Premium Subscriber
Joined
Sep 29, 2005
Messages
22
Location
Indiana
Eureka! Thanks Bill. I removed the -U, changed audio.py back to 0.0.0.0 and it worked immediately.
I can't thank you enough.
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
1,035
Location
NE Wisconsin
Eureka! Thanks Bill. I removed the -U, changed audio.py back to 0.0.0.0 and it worked immediately.
I can't thank you enough.
Thank @boatbod. I was going there with the -U but wanted to see your configs before jumping to any conclusions.
Anyway, you have it working that that is all that matters.

Have fun and enjoy!

Bill
 

n8zuz

Member
Joined
Jul 17, 2004
Messages
61
Location
Windy WY
WGBecks and Boatbod have been extremely helpful in getting my system going. I understand it a lot better as I work with it but it's a bit of a leap at first. My system is running well now that it's tweaked well.
 
Status
Not open for further replies.
Top