OP25 op25 and liquidsoap and broadcastify

Status
Not open for further replies.

ervfc288

Member
Feed Provider
Joined
Jan 22, 2015
Messages
85
Location
Culpeper, VA
I have been tinkering with op25 for the past few weeks and I am at the point where I am ready to use it to replace my BCD996P2 for streaming my local p25 phase 2 system. I have everything setup and I can see an established connected between my ubuntu server and the audio1.broadcastify.com server, but no audio is passing through. Can someone help me troubleshoot what is going on? I have local audio playing through the computer, but nothing on the broadcastify side.

I am also having trouble locating the liquidsoap log file... i am running as a non privileged user and cannot find the proper way to write the log file to a location this user has access to.

Here is my op25.liq file
Bash:
#!/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.5 -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, window = 1.0)

# 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="audio1.broadcastify.com", port=80, mount="redacted", password="redacted", mean(input))
 

ervfc288

Member
Feed Provider
Joined
Jan 22, 2015
Messages
85
Location
Culpeper, VA
Looks like an issue with the sockaudio.py ... i am see an error saying that the socket is already in use and the input.external.rawaudio_9129 process exits.

Code:
2021/03/13 00:06:39 >>> LOG START
2021/03/13 00:06:39 [main:3] Liquidsoap 1.4.1
2021/03/13 00:06:39 [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/03/13 00:06:39 [gstreamer.loader:3] Loaded GStreamer 1.16.2 0
2021/03/13 00:06:39 [dynamic.loader:3] Could not find dynamic module for fdkaac encoder.
2021/03/13 00:06:39 [lang.deprecated:2] WARNING: "input.external" is deprecated! Please use "input.external.rawaudio".
2021/03/13 00:06:39 [frame:3] Using 8000Hz audio, 25Hz video, 8000Hz master.
2021/03/13 00:06:39 [frame:3] Frame size must be a multiple of 320 ticks = 320 audio samples = 1 video samples.
2021/03/13 00:06:39 [frame:3] Targetting 'frame.duration': 0.04s = 320 audio samples = 320 ticks.
2021/03/13 00:06:39 [frame:3] Frames last 0.04s = 320 audio samples = 1 video samples = 320 ticks.
2021/03/13 00:06:39 [sandbox:3] Sandboxing disabled
2021/03/13 00:06:39 [video.converter:3] Using preferred video converter: gavl.
2021/03/13 00:06:39 [threads:4] Created thread "gstreamer_main_loop" (1 total).
2021/03/13 00:06:39 [audio.converter:3] Using samplerate converter: ffmpeg.
2021/03/13 00:06:39 [threads:4] Created thread "generic queue #1" (1 total).
2021/03/13 00:06:39 [threads:4] Created thread "generic queue #2" (2 total).
2021/03/13 00:06:39 [threads:4] Created thread "non-blocking queue #1" (3 total).
2021/03/13 00:06:39 [threads:4] Created thread "non-blocking queue #2" (4 total).
2021/03/13 00:06:39 [clock:4] Currently 1 clocks allocated.
2021/03/13 00:06:39 [clock.wallclock_main:4] Starting 1 sources...
2021/03/13 00:06:39 [source:4] Source output.icecast_9134 gets up.
2021/03/13 00:06:39 [source:4] Source mean_9133 gets up.
2021/03/13 00:06:39 [mean_9133:4] Content kind is {audio=1;video=0;midi=0}.
2021/03/13 00:06:39 [source:4] Source mksafe gets up.
2021/03/13 00:06:39 [source:4] Source input.external.rawaudio_9129 gets up.
2021/03/13 00:06:39 [input.external.rawaudio_9129:3] Starting process
2021/03/13 00:06:39 [input.external.rawaudio_9129:4] Activations changed: static=[], dynamic=[mksafe:mean_9133:/redacted:/redacted].
2021/03/13 00:06:39 [source:4] Source safe_blank gets up.
2021/03/13 00:06:39 [safe_blank:4] Content kind is {audio=2;video=0;midi=0}.
2021/03/13 00:06:39 [safe_blank:4] Activations changed: static=[], dynamic=[mksafe:mean_9133:/redacted:/redacted].
2021/03/13 00:06:39 [mksafe:4] Activations changed: static=[mean_9133:/redacted:/redacted], dynamic=[].
2021/03/13 00:06:39 [mean_9133:4] Activations changed: static=[/redacted:/redacted], dynamic=[].
2021/03/13 00:06:39 [input.external.rawaudio_9129:5] Not ready: need more buffering (0/2000).
2021/03/13 00:06:39 [/zqftxs15k6ny:4] Activations changed: static=[/redacted], dynamic=[].
2021/03/13 00:06:39 [/zqftxs15k6ny:4] Enabling caching mode: active source.
2021/03/13 00:06:39 [/zqftxs15k6ny:3] Connecting mount /redacted for source@audio1.broadcastify.com...
2021/03/13 00:06:39 [input.external.rawaudio_9129:4] Using Python /usr/bin/python3

2021/03/13 00:06:39 [input.external.rawaudio_9129:4] audio device: stdout
Listening on 0.0.0.0:23456

2021/03/13 00:06:39 [/zqftxs15k6ny:3] Connection setup was successful.
2021/03/13 00:06:39 [threads:4] Created thread "wallclock_main" (2 total).
2021/03/13 00:06:39 [clock.wallclock_main:3] Streaming loop starts, synchronized with wallclock.
2021/03/13 00:06:39 [clock:4] Main phase starts.
2021/03/13 00:06:39 [mksafe:3] Switch to safe_blank.
2021/03/13 00:06:39 [safe_blank:4] Activations changed: static=[mksafe:mean_9133:/redacted:/redacted], dynamic=[mksafe:mean_9133:/redacted:/redacted].
2021/03/13 00:06:39 [input.external.rawaudio_9129:4] Traceback (most recent call last):
  File "./audio.py", line 70, in <module>
    audio_handler = socket_audio("0.0.0.0", options.wireshark_port, options.audio_output, options.two_channel, options.audio_gain, options.stdout)
  File "/home/jason/Desktop/op25/op25/gr-op25_repeater/apps/sockaudio.py", line 409, in __init__
    self.setup_sockets(udp_host, udp_port)
  File "/home/jason/Desktop/op25/op25/gr-op25_repeater/apps/sockaudio.py", line 509, in setup_sockets
    self.sock_a.bind((udp_host, udp_port))
OSError: [Errno 98] Address already in use

2021/03/13 00:06:39 [input.external.rawaudio_9129:3] Process exited with code 1
2021/03/13 00:06:39 [input.external.rawaudio_9129:3] Cleaning up process
 

ervfc288

Member
Feed Provider
Joined
Jan 22, 2015
Messages
85
Location
Culpeper, VA
Ok, pulled what hair I had left completely out... removed -U from my op25.sh startup command as it was using the audio port and that is how I was hearing audio from the computer.... once I did this I enabled local audio out via ALSA in the op25.liq file and now all is well.. next task is to figure out why alpha tags are not updating, hopefully this will help someone else out in the future :)
 

ervfc288

Member
Feed Provider
Joined
Jan 22, 2015
Messages
85
Location
Culpeper, VA
I did, and at first it was throwing metadata update errors then it stopped. But I don’t see alpha tags showing up on my phone when I listen to the feed.
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
921
Location
NE Wisconsin
Just to be clear, your meta.json mush have the same credentials you set in op25.liq in order to send the meta tags to BCFY. You should have created a tag file that get's pointed to in your trunk.tsv file and is used to drive the metadata process as well as to translate TGID's displayed in the
curses or http terminals to alpha tags.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
I did, and at first it was throwing metadata update errors then it stopped. But I don’t see alpha tags showing up on my phone when I listen to the feed.
Assuming everything is set up to send correctly, you also need to use a broadcastify client that displays metadata.
 

ervfc288

Member
Feed Provider
Joined
Jan 22, 2015
Messages
85
Location
Culpeper, VA
Thanks for the reply. I did use, and verify, the same credentials. Also have the tg file and the talk group names get mapped appropriately in the op25 webui. I was testing on the iPhone scanner radio app, I thought I recalled that it supported that. I’m on my phone now but will post my other config files once I get back to the house.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
Thanks for the reply. I did use, and verify, the same credentials. Also have the tg file and the talk group names get mapped appropriately in the op25 webui. I was testing on the iPhone scanner radio app, I thought I recalled that it supported that. I’m on my phone now but will post my other config files once I get back to the house.
The scannerradio app supports metadata on Android so I assume it does on iPhone too. You could also try VLC from linux.

If you turn your logging up to "-v 11" the actual meta updates will be included in the log file. It's going to generate a lot of protocol data as well but it might be worth wading through it to see what's going wrong. Use the keyword "meta" to search the logs.
 

ervfc288

Member
Feed Provider
Joined
Jan 22, 2015
Messages
85
Location
Culpeper, VA
Seeing result 200 in the logs when its sending metadata to broadcastify. Which I gather means its working ok. Perhaps the iOS version of ScannerRadio just doesnt do alpha tags, strange because I thought it did years ago.

Code:
03/15/21 15:18:23.320990 do_metadata state=1: [None] None
03/15/21 15:18:23.393375 metadata update: "http://audio1.broadcastify.com:80/admin/metadata?mount=/zqftxs15k6ny&mode=updinfo&song=[idle]"
03/15/21 15:18:23.520364 metadata result: "200"
03/15/21 15:19:00.807001 do_metadata state=0: [2101] Culp SO Disp-2101
03/15/21 15:19:00.863609 metadata update: "http://audio1.broadcastify.com:80/admin/metadata?mount=/zqftxs15k6ny&mode=updinfo&song=[2101]+Culp+SO+Disp-2101"
03/15/21 15:19:00.996549 metadata result: "200"
03/15/21 15:19:05.261091 do_metadata state=0: [2101] Culp SO Disp-2101
03/15/21 15:19:10.896794 do_metadata state=1: [None] None
03/15/21 15:19:10.920420 metadata update: "http://audio1.broadcastify.com:80/admin/metadata?mount=/zqftxs15k6ny&mode=updinfo&song=[idle]"
03/15/21 15:19:11.044254 metadata result: "200"
03/15/21 15:19:22.171142 do_metadata state=0: [2101] Culp SO Disp-2101
03/15/21 15:19:22.227687 metadata update: "http://audio1.broadcastify.com:80/admin/metadata?mount=/zqftxs15k6ny&mode=updinfo&song=[2101]+Culp+SO+Disp-2101"
03/15/21 15:19:22.350979 metadata result: "200"
03/15/21 15:19:42.353927 do_metadata state=1: [None] None
03/15/21 15:19:42.447622 metadata update: "http://audio1.broadcastify.com:80/admin/metadata?mount=/zqftxs15k6ny&mode=updinfo&song=[idle]"
03/15/21 15:19:42.566133 metadata result: "200"
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
Seeing result 200 in the logs when its sending metadata to broadcastify. Which I gather means its working ok. Perhaps the iOS version of ScannerRadio just doesnt do alpha tags, strange because I thought it did years ago.

Code:
03/15/21 15:18:23.320990 do_metadata state=1: [None] None
03/15/21 15:18:23.393375 metadata update: "http://audio1.broadcastify.com:80/admin/metadata?mount=/zqftxs15k6ny&mode=updinfo&song=[idle]"
03/15/21 15:18:23.520364 metadata result: "200"
03/15/21 15:19:00.807001 do_metadata state=0: [2101] Culp SO Disp-2101
03/15/21 15:19:00.863609 metadata update: "http://audio1.broadcastify.com:80/admin/metadata?mount=/zqftxs15k6ny&mode=updinfo&song=[2101]+Culp+SO+Disp-2101"
03/15/21 15:19:00.996549 metadata result: "200"
03/15/21 15:19:05.261091 do_metadata state=0: [2101] Culp SO Disp-2101
03/15/21 15:19:10.896794 do_metadata state=1: [None] None
03/15/21 15:19:10.920420 metadata update: "http://audio1.broadcastify.com:80/admin/metadata?mount=/zqftxs15k6ny&mode=updinfo&song=[idle]"
03/15/21 15:19:11.044254 metadata result: "200"
03/15/21 15:19:22.171142 do_metadata state=0: [2101] Culp SO Disp-2101
03/15/21 15:19:22.227687 metadata update: "http://audio1.broadcastify.com:80/admin/metadata?mount=/zqftxs15k6ny&mode=updinfo&song=[2101]+Culp+SO+Disp-2101"
03/15/21 15:19:22.350979 metadata result: "200"
03/15/21 15:19:42.353927 do_metadata state=1: [None] None
03/15/21 15:19:42.447622 metadata update: "http://audio1.broadcastify.com:80/admin/metadata?mount=/zqftxs15k6ny&mode=updinfo&song=[idle]"
03/15/21 15:19:42.566133 metadata result: "200"
Yup, looks like op25 is sending correctly. If you kill liquidsoap but leave op25 running these meta updates will start failing because the feed will be marked down.
 
Status
Not open for further replies.
Top