• Effective immediately we will be deleting, without notice, any negative threads or posts that deal with the use of encryption and streaming of scanner audio.

    We've noticed a huge increase in rants and negative posts that revolve around agencies going to encryption due to the broadcasting of scanner audio on the internet. It's now worn out and continues to be the same recycled rants. These rants hijack the threads and derail the conversation. They no longer have a place anywhere on this forum other than in the designated threads in the Rants forum in the Tavern.

    If you violate these guidelines your post will be deleted without notice and an infraction will be issued. We are not against discussion of this issue. You just need to do it in the right place. For example:
    https://forums.radioreference.com/rants/224104-official-thread-live-audio-feeds-scanners-wait-encryption.html

OP25 and streaming to broadcastify on rpi3b+

Joined
Feb 21, 2019
Messages
20
#1
Followed the thread to setup OP25 to stream to broadcastify. I followed the config and am getting an error when launching darkice with the config. I am posting all of the config files. I am assuming that there is an issue with the sound card input/output on the Pi, just need verification from someone who has done it in the past.

The actual OP25 works fine and starts with both command and service with the following lines:
Code:
#! /bin/sh
cd /home/pi/op25/op25/gr-op25_repeater/apps
./rx.py -l http:127.0.0.1:8080 --args 'rtl' -N 'LNA:47' -O loop0 -S 960000 -f 773.84375e6 -x 25 -o 25000 -T trunk.tsv -V -2 -U 2> stderr-cspd.2
Code:
[b]/etc/modprobe.d/bcm2835.conf[/b]
softdep snd-bcm2835 post: snd-aloop
options snd-aloop enable=1 index=1 pcm_substreams=2
Code:
[b]/etc/asound.conf[/b]
# output device
pcm.loopout0 {
  type plug
  slave.pcm "hw:Loopback,0,0"
}

# input device
pcm.loopin0 {
  type dsnoop
  ipc_key 686592
  slave.pcm "hw:Loopback,1,0"
}

# duplex plug device
pcm.loop0 {
  type plug
  slave {
    pcm {
      type asym
      playback.pcm "loopout0"
      capture.pcm "loopin0"
    }
  }
}

# output device
pcm.loopout1 {
  type plug
  slave.pcm "hw:Loopback,0,1"
}

# input device
pcm.loopin1 {
  type dsnoop
  ipc_key 686593
  slave.pcm "hw:Loopback,1,1"
}

# duplex plug device
pcm.loop1 {
  type plug
  slave {
    pcm {
      type asym
      playback.pcm "loopout1"
      capture.pcm "loopin1"
    }
  }
}
Code:
[b]/etc/darkice-stream0.cfg[/b]
# sample DarkIce configuration file, edit for your needs before using
# see the darkice.cfg man page for details

# this section describes general aspects of the live streaming session
[general]
duration        = 0        # duration of encoding, in seconds. 0 means forever
bufferSecs      = 1         # size of internal slip buffer, in seconds
reconnect       = yes       # reconnect to the server(s) if disconnected

# this section describes the audio input that will be streamed
[input]
device          = loop0  # OSS DSP soundcard device for the audio input
sampleRate      = 22050  # sample rate in Hz. 22050 is the RR Standard
bitsPerSample   = 16     # bits per sample. 16 for mono feeds, 32 for stereo feeds
channel         = 1      # channels. 1 = mono, 2 = stereo

# this section describes a streaming connection to an IceCast server
# there may be up to 8 of these sections, named [icecast-0] ... [icecast-7]
# these can be mixed with [icecast2-x] and [shoutcast-x] sections
 
# If you want to send to your own icecast server, you basically copy
# this whole section and put in the values to point the feed to your own
# server instead of the RR information below
 
# Don't forget, the name [icecast2-0] needs to change to [icecast2-1]
# and 2 and 3 as you add more feed destinations.
 
[icecast2-0]
# The audio format to encode to, we're using mp3 here
format          = mp3

# The bit rate mode to use, the commented out lines are for a fixed bit
# rate "constant bit rate" at 16 bits.  I prefer the variable bit rate
# for the sound quality it has and the throughput is very similar on avg

#bitrateMode    = cbr (do not use vbr)
#bitrate        = 16 or 32 (16 for mono feeds, 32 for stereo feeds)

sampleRate      = 22050     # sample rate in Hz. 22050 is the RR Standard
bitrateMode     = cbr
bitrate        = 16

# Quality at .1, max is 1.0, but as you increase, so does the bandwidth
# used.  For mono scanner audio .1 is totally fine.
quality         = 0.1

# Takes the input and mixes it down to a mono output for the feed.
channel         = 1

# Cuts frequency response over 5kHz.  For scanner feed this mostly
# eliminates hiss and harshness on paging tones.  Saves a bunch of
# bandwidth as well.
lowpass         = 5000

# Server shown on your RR feed owner page that hosts your feed
# You need to log in to RR, go to Account -> My Live Audio Feeds ->
# click the feed owner page icon at the far right of your feed listing.
# Then you will see all this information.

# From Feed Technical Details, the "Server"
server          = SERVER.broadcastify.com

# From Feed Technical Details, the "Port"
port            = 80      # port of the IceCast server, usually 8000

# From Feed Technical Details, the Password exactly as shown
password        = PASSWORD

# From Feed Technical Details, the mount...remove the leading "/", it's
# not needed in this file.  So if it is /999999 make it just 999999
mountPoint      = MOUNTPOINT

# name of the stream
# On My Live Audio Feeds, it's the first part ending in a colon ":"
name            = Short name

# On My Live Audio Feeds, it's the part in parentheses in the Feed name
description     = Description

# I don't think this is really needed because RR takes care of links
url             = http://api.radioreference.com/js/?key=XXXXXXX&feedId=XXXX
genre           = Scanner
public          = yes
When running
Code:
/usr/bin/darkice -c /etc/darkice-stream0.cfg
directly in console I am getting the following:
Code:
DarkIce 1.3 live audio streamer, http://code.google.com/p/darkice/
Copyright (c) 2000-2007, Tyrell Hungary, http://tyrell.hu/
Copyright (c) 2008-2013, Akos Maroy and Rafael Diniz
This is free software, and you are welcome to redistribute it
under the terms of The GNU General Public License version 3 or
any later version.

Using config file: /etc/darkice-stream0.cfg
Using ALSA DSP input device: loop0
Using POSIX real-time scheduling, priority 4
ALSA lib pcm_direct.c:1605:(_snd_pcm_direct_get_slave_ipc_offset) Invalid value for card
DarkIce: DarkIce.cpp:1273: can't open connector [0]
Any insight would be appreciated.
 

boatbod

Member
Premium Subscriber
Joined
Mar 3, 2007
Messages
1,513
Location
Talbot Co, MD
#2
Darkice appears to be complaining about the alsa card:
ALSA lib pcm_direct.c:1605:(_snd_pcm_direct_get_slave_ipc_offset) Invalid value for card
Did you make sure the aloop kernel module is being installed at boot time?

As an aside, I no longer recommend using Darkice, especially on a RPi3. You get better results (smoother audio) with LiquidSoap.
 
Joined
Feb 21, 2019
Messages
20
#3
boatbod, do you have any directions for LiquidSoap handy? If not I will dig the forums here.

Code:
pi@raspberrypi:~/op25/op25/gr-op25_repeater/apps $ modinfo snd_aloop
filename:       /lib/modules/4.14.79-v7+/kernel/sound/drivers/snd-aloop.ko
license:        GPL
description:    A loopback soundcard
author:         Jaroslav Kysela <perex@perex.cz>
srcversion:     606E1695325096D8A7F1C22
depends:        snd-pcm,snd
intree:         Y
name:           snd_aloop
vermagic:       4.14.79-v7+ SMP mod_unload modversions ARMv7 p2v8
parm:           index:Index value for loopback soundcard. (array of int)
parm:           id:ID string for loopback soundcard. (array of charp)
parm:           enable:Enable this loopback soundcard. (array of bool)
parm:           pcm_substreams:PCM substreams # (1-8) for loopback driver. (array of int)
parm:           pcm_notify:Break capture when PCM format/rate/channels changes. (array of int)
 

boatbod

Member
Premium Subscriber
Joined
Mar 3, 2007
Messages
1,513
Location
Talbot Co, MD
#4
boatbod, do you have any directions for LiquidSoap handy? If not I will dig the forums here.

Code:
pi@raspberrypi:~/op25/op25/gr-op25_repeater/apps $ modinfo snd_aloop
filename:       /lib/modules/4.14.79-v7+/kernel/sound/drivers/snd-aloop.ko
license:        GPL
description:    A loopback soundcard
author:         Jaroslav Kysela <perex@perex.cz>
srcversion:     606E1695325096D8A7F1C22
depends:        snd-pcm,snd
intree:         Y
name:           snd_aloop
vermagic:       4.14.79-v7+ SMP mod_unload modversions ARMv7 p2v8
parm:           index:Index value for loopback soundcard. (array of int)
parm:           id:ID string for loopback soundcard. (array of charp)
parm:           enable:Enable this loopback soundcard. (array of bool)
parm:           pcm_substreams:PCM substreams # (1-8) for loopback driver. (array of int)
parm:           pcm_notify:Break capture when PCM format/rate/channels changes. (array of int)
Sure :)
If you go to the root of the op25 directory structure you should find a file called ~/op25/README-rpi3-liquidsoap and that contains the basic steps for setting up a streaming system on the RPI3. When I wrote it I performed each step on a freshly imaged Pi just to make sure I didn't miss anything.
 
Joined
Feb 21, 2019
Messages
20
#5
boatboad, not sure if the op25.liq is correct as I put in my broadcastify info (server, mount etc) there. So far I am up to #6 and when runnig op25.liq I am getting the following:
Code:
2019/03/14 14:32:17 >>> LOG START
2019/03/14 14:32:16 [protocols.external:3] Found "/usr/bin/wget".
2019/03/14 14:32:17 [main:3] Liquidsoap 1.1.1
2019/03/14 14:32:17 [main:3] Using: graphics=[distributed with Ocaml] pcre=7.0.4 dtools=0.3.1 duppy=0.5.1 duppy.syntax=0.5.1 cry=0.2.2 mm=0.2.1 xmlplaylist=0.1.3 lastfm=0.3.0 ogg=0.4.5 vorbis=0.6.1 opus=0.1.0 speex=0.2.0 mad=0.4.4 flac=0.1.1 flac.ogg=0.1.1 dynlink=[distributed with Ocaml] lame=0.3.2 shine=0.2.0 gstreamer=0.2.0 frei0r=0.1.0 voaacenc=0.1.0 theora=0.3.0 schroedinger=0.1.0 gavl=0.1.5 bjack=0.1.4 alsa=0.2.1 ao=0.2.0 samplerate=0.1.2 taglib=0.3.1 magic=0.7.3 camomile=0.8.4 inotify=1.0 faad=0.3.2 soundtouch=0.1.7 portaudio=0.2.0 pulseaudio=0.1.2 ladspa=0.1.4 dssi=0.1.1 sdl=0.9.1 camlimages=4.2.0 lo=0.1.0 yojson=1.2.3 gd=1.0a5
2019/03/14 14:32:17 [dynamic.loader:3] Could not find dynamic module for fdkaac encoder.
2019/03/14 14:32:17 [dynamic.loader:3] Could not find dynamic module for aacplus encoder.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/sdl.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/ladspa.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/ogg.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/dssi.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/vorbis.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/voaacenc.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/camlimages.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/lame.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/bjack.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/schroedinger.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/opus.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/flac.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/lo.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/pulseaudio.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/oss.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/shine.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/gavl.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/ao.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/speex.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/gstreamer.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/theora.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/flac_ogg.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/gd.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/xmlplaylist.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/alsa.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/soundtouch.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/portaudio.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/graphics.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/cry.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/faad.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/frei0r.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/mad.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/samplerate.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/lastfm.cmxs.
2019/03/14 14:32:17 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/taglib.cmxs.
audio device: stdout
strange error flushing buffer ...
strange error flushing buffer ...
2019/03/14 14:32:17 >>> LOG END
I think I am missing some codecs, but could find a clear description.
 
Joined
Feb 21, 2019
Messages
20
#7
Ok, here is what I got this time. Thank you and I'm so sorry for bothering you about this.

Code:
pi@raspberrypi:~/op25/op25/gr-op25_repeater/apps $ ./op25.liq
2019/03/15 13:16:20 >>> LOG START
2019/03/15 13:16:19 [protocols.external:3] Found "/usr/bin/wget".
2019/03/15 13:16:19 [main:3] Liquidsoap 1.1.1
2019/03/15 13:16:19 [main:3] Using: graphics=[distributed with Ocaml] pcre=7.0.4 dtools=0.3.1 duppy=0.5.1 duppy.syntax=0.5.1 cry=0.2.2 mm=0.2.1 xmlplaylist=0.1.3 lastfm=0.3.0 ogg=0.4.5 vorbis=0.6.1 opus=0.1.0 speex=0.2.0 mad=0.4.4 flac=0.1.1 flac.ogg=0.1.1 dynlink=[distributed with Ocaml] lame=0.3.2 shine=0.2.0 gstreamer=0.2.0 frei0r=0.1.0 voaacenc=0.1.0 theora=0.3.0 schroedinger=0.1.0 gavl=0.1.5 bjack=0.1.4 alsa=0.2.1 ao=0.2.0 samplerate=0.1.2 taglib=0.3.1 magic=0.7.3 camomile=0.8.4 inotify=1.0 faad=0.3.2 soundtouch=0.1.7 portaudio=0.2.0 pulseaudio=0.1.2 ladspa=0.1.4 dssi=0.1.1 sdl=0.9.1 camlimages=4.2.0 lo=0.1.0 yojson=1.2.3 gd=1.0a5
2019/03/15 13:16:19 [dynamic.loader:3] Could not find dynamic module for fdkaac encoder.
2019/03/15 13:16:19 [dynamic.loader:3] Could not find dynamic module for aacplus encoder.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/sdl.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/ladspa.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/ogg.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/dssi.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/vorbis.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/voaacenc.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/camlimages.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/lame.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/bjack.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/schroedinger.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/opus.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/flac.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/lo.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/pulseaudio.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/oss.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/shine.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/gavl.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/ao.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/speex.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/gstreamer.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/theora.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/flac_ogg.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/gd.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/xmlplaylist.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/alsa.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/soundtouch.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/portaudio.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/graphics.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/cry.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/faad.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/frei0r.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/mad.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/samplerate.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/lastfm.cmxs.
2019/03/15 13:16:19 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/taglib.cmxs.
2019/03/15 13:16:20 [frame:3] Using 8000Hz audio, 25Hz video, 8000Hz master.
2019/03/15 13:16:20 [frame:3] Frame size must be a multiple of 320 ticks = 320 audio samples = 1 video samples.
2019/03/15 13:16:20 [frame:3] Targetting 'frame.duration': 0.04s = 320 audio samples = 320 ticks.
2019/03/15 13:16:20 [frame:3] Frames last 0.04s = 320 audio samples = 1 video samples = 320 ticks.
2019/03/15 13:16:20 [threads:3] Created thread "generic queue #1".
2019/03/15 13:16:20 [threads:3] Created thread "generic queue #2".
2019/03/15 13:16:20 [input.external_6354:2] Starting process.
2019/03/15 13:16:20 [clock.wallclock_pulse:2] Error when starting output pulse_out(liquidsoap:): Pulseaudio error: Connection refused!
2019/03/15 13:16:20 [/5679p2tr84zn:3] Connecting mount /5679p2tr84zn for source@audio9.broadcastify.com...
Traceback (most recent call last):
  File "./audio.py", line 48, 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/pi/op25/op25/gr-op25_repeater/apps/sockaudio.py", line 320, in __init__
    self.setup_sockets(udp_host, udp_port)
  File "/home/pi/op25/op25/gr-op25_repeater/apps/sockaudio.py", line 419, in setup_sockets
    self.sock_a.bind((udp_host, udp_port))
  File "/usr/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 98] Address already in use
2019/03/15 13:16:20 [input.external_6354:2] Process exited.
2019/03/15 13:16:20 [input.external_6354:2] Restarting process.
2019/03/15 13:16:20 [/5679p2tr84zn:3] Connection setup was successful.
2019/03/15 13:16:20 [threads:3] Created thread "wallclock_pulse" (1 total).
2019/03/15 13:16:20 [clock.wallclock_pulse:3] Streaming loop starts, synchronized by active sources.
2019/03/15 13:16:20 [main:3] Shutdown started!
2019/03/15 13:16:20 [main:3] Waiting for threads to terminate...
strange error flushing buffer ...
strange error flushing buffer ...
2019/03/15 13:16:20 [/5679p2tr84zn:3] Closing connection...
2019/03/15 13:16:20 [clock.wallclock_pulse:3] Streaming loop stopped.
2019/03/15 13:16:20 [threads:3] Thread "wallclock_pulse" terminated (0 remaining).
2019/03/15 13:16:20 [main:3] Cleaning downloaded files...
2019/03/15 13:16:20 [main:3] Freeing memory...
2019/03/15 13:16:20 >>> LOG END
pi@raspberrypi:~/op25/op25/gr-op25_repeater/apps $ Traceback (most recent call last):
  File "./audio.py", line 48, 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/pi/op25/op25/gr-op25_repeater/apps/sockaudio.py", line 320, in __init__
    self.setup_sockets(udp_host, udp_port)
  File "/home/pi/op25/op25/gr-op25_repeater/apps/sockaudio.py", line 419, in setup_sockets
    self.sock_a.bind((udp_host, udp_port))
  File "/usr/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 98] Address already in use
 
Joined
Feb 21, 2019
Messages
20
#8
I installed pulseaudio, even though it was optional in step #4. Now I'm getting a loop, sample below.

Code:
pi@raspberrypi:~/op25/op25/gr-op25_repeater/apps $ ./op25.liq
2019/03/15 15:15:30 >>> LOG START
2019/03/15 15:15:29 [protocols.external:3] Found "/usr/bin/wget".
2019/03/15 15:15:29 [main:3] Liquidsoap 1.1.1
2019/03/15 15:15:29 [main:3] Using: graphics=[distributed with Ocaml] pcre=7.0.4 dtools=0.3.1 duppy=0.5.1 duppy.syntax=0.5.1 cry=0.2.2 mm=0.2.1 xmlplaylist=0.1.3 lastfm=0.3.0 ogg=0.4.5 vorbis=0.6.1 opus=0.1.0 speex=0.2.0 mad=0.4.4 flac=0.1.1 flac.ogg=0.1.1 dynlink=[distributed with Ocaml] lame=0.3.2 shine=0.2.0 gstreamer=0.2.0 frei0r=0.1.0 voaacenc=0.1.0 theora=0.3.0 schroedinger=0.1.0 gavl=0.1.5 bjack=0.1.4 alsa=0.2.1 ao=0.2.0 samplerate=0.1.2 taglib=0.3.1 magic=0.7.3 camomile=0.8.4 inotify=1.0 faad=0.3.2 soundtouch=0.1.7 portaudio=0.2.0 pulseaudio=0.1.2 ladspa=0.1.4 dssi=0.1.1 sdl=0.9.1 camlimages=4.2.0 lo=0.1.0 yojson=1.2.3 gd=1.0a5
2019/03/15 15:15:29 [dynamic.loader:3] Could not find dynamic module for fdkaac encoder.
2019/03/15 15:15:29 [dynamic.loader:3] Could not find dynamic module for aacplus encoder.
2019/03/15 15:15:29 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/sdl.cmxs.
2019/03/15 15:15:29 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/ladspa.cmxs.
2019/03/15 15:15:29 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/ogg.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/dssi.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/vorbis.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/voaacenc.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/camlimages.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/lame.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/bjack.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/schroedinger.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/opus.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/flac.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/lo.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/pulseaudio.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/oss.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/shine.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/gavl.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/ao.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/speex.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/gstreamer.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/theora.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/flac_ogg.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/gd.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/xmlplaylist.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/alsa.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/soundtouch.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/portaudio.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/graphics.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/cry.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/faad.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/frei0r.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/mad.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/samplerate.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/lastfm.cmxs.
2019/03/15 15:15:30 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/taglib.cmxs.
2019/03/15 15:15:30 [frame:3] Using 8000Hz audio, 25Hz video, 8000Hz master.
2019/03/15 15:15:30 [frame:3] Frame size must be a multiple of 320 ticks = 320 audio samples = 1 video samples.
2019/03/15 15:15:30 [frame:3] Targetting 'frame.duration': 0.04s = 320 audio samples = 320 ticks.
2019/03/15 15:15:30 [frame:3] Frames last 0.04s = 320 audio samples = 1 video samples = 320 ticks.
2019/03/15 15:15:30 [threads:3] Created thread "generic queue #1".
2019/03/15 15:15:30 [threads:3] Created thread "generic queue #2".
2019/03/15 15:15:30 [input.external_6354:2] Starting process.
2019/03/15 15:15:30 [/5679p2tr84zn:3] Connecting mount /5679p2tr84zn for source@audio9.broadcastify.com...
Traceback (most recent call last):
  File "./audio.py", line 48, 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/pi/op25/op25/gr-op25_repeater/apps/sockaudio.py", line 320, in __init__
    self.setup_sockets(udp_host, udp_port)
  File "/home/pi/op25/op25/gr-op25_repeater/apps/sockaudio.py", line 419, in setup_sockets
    self.sock_a.bind((udp_host, udp_port))
  File "/usr/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 98] Address already in use
2019/03/15 15:15:32 [input.external_6354:2] Process exited.
2019/03/15 15:15:32 [input.external_6354:2] Restarting process.
Traceback (most recent call last):
  File "./audio.py", line 48, 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/pi/op25/op25/gr-op25_repeater/apps/sockaudio.py", line 320, in __init__
    self.setup_sockets(udp_host, udp_port)
  File "/home/pi/op25/op25/gr-op25_repeater/apps/sockaudio.py", line 419, in setup_sockets
    self.sock_a.bind((udp_host, udp_port))
  File "/usr/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 98] Address already in use
2019/03/15 15:15:33 [input.external_6354:2] Process exited.
2019/03/15 15:15:34 [input.external_6354:2] Restarting process.
2019/03/15 15:15:34 [/5679p2tr84zn:3] Closing connection...
2019/03/15 15:15:34 [clock.wallclock_pulse:3] Streaming loop stopped.
2019/03/15 15:15:34 [threads:3] Thread "wallclock_pulse" terminated (0 remaining).
2019/03/15 15:15:34 [main:3] Cleaning downloaded files...
2019/03/15 15:15:34 [main:3] Freeing memory...
2019/03/15 15:15:34 >>> LOG END
pi@raspberrypi:~/op25/op25/gr-op25_repeater/apps $ Traceback (most recent call last):
  File "./audio.py", line 48, 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/pi/op25/op25/gr-op25_repeater/apps/sockaudio.py", line 320, in __init__
    self.setup_sockets(udp_host, udp_port)
  File "/home/pi/op25/op25/gr-op25_repeater/apps/sockaudio.py", line 419, in setup_sockets
    self.sock_a.bind((udp_host, udp_port))
  File "/usr/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 98] Address already in use
^C
I shortened it down but the highlighted code seems to be repeating.
 
Last edited:

boatbod

Member
Premium Subscriber
Joined
Mar 3, 2007
Messages
1,513
Location
Talbot Co, MD
#9
The exception is due to not being able to open the UDP port. It's likely because you still have a -U on the command line for rx.py. What do you have for rx.py command line options?

You likely need:
-V -2 -w
but DO NOT want:
-U
 
Joined
Feb 21, 2019
Messages
20
#10
It's getting better :) Removed -U and added -w

I was getting a bunch of additional entries in the term window. I set loging back to 1 and they are gone.

I will get the service up and running to get rid of the terminal windows next.
 
Last edited:
Joined
Feb 21, 2019
Messages
20
#11
I'm having a problem launching the service for op25-liq, it works fine if I just launch it in a terminal window. Here is what I get in syslog:

Code:
Mar 15 22:56:27 raspberrypi pulseaudio[2428]: [pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Mar 15 22:56:27 raspberrypi pulseaudio[2428]: [pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Mar 15 22:56:27 raspberrypi pulseaudio[2428]: [alsa-sink-bcm2835 ALSA] alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write.
Mar 15 22:56:27 raspberrypi pulseaudio[2428]: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Most likely this is a bug in the ALSA driver '(null)'. Please report this issue to the ALSA developers.
Mar 15 22:56:27 raspberrypi pulseaudio[2428]: [alsa-sink-bcm2835 ALSA] alsa-sink.c: We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail() returned 0 or another value < min_avail.
 

boatbod

Member
Premium Subscriber
Joined
Mar 3, 2007
Messages
1,513
Location
Talbot Co, MD
#12
I've not seen that error before, but it could be permissions related. How do you have your 'liquid' service startup file configured?
Here's mine. Note that systemd/systemctl runs the liquidsoap process as a user and not root.

Code:
[Unit]
Description=liquid-fire
After=syslog.target network.target nss-lookup.target network-online.target
Requires=network-online.target

[Service]
User=gnorbury
Group=gnorbury
WorkingDirectory=/home/gnorbury/op25/op25/gr-op25_repeater/apps
ExecStart=/usr/bin/liquidsoap op25-fire.liq
RestartSec=5
Restart=on-failure

[Install]
WantedBy=multi-user.target
 
Joined
Feb 21, 2019
Messages
20
#13
I think it is all set now; I didn't change anything as the permissions were set just fine on the service. I started the service and it started working. Go figure.

Thank you again for the help.
 
Top