Broadcastify Raspberry Pi Feed Appliance Image v1.0 (BETA)

xicarusx

Member
Feed Provider
Joined
Oct 2, 2008
Messages
104
Location
Sayre, PA
Hi, I'm trying to do a setup with Broadcastify latest image and a RTL-SDR USB receiver. I'm using Marine Freq Ch83 as my receiver, and have used the basic concept you shared but modified the freq. I'm not getting any recordings showing up? I can see audio being transmitted on that freq using Gqrx - can you share any tips to get this working?

When you start up RTL_Airband do you see any error messages?

Also make sure you have created the folder recordings in /home/pi/recordings
 

robhux

Member
Feed Provider
Joined
Mar 27, 2022
Messages
7
When you start up RTL_Airband do you see any error messages?

Also make sure you have created the folder recordings in /home/pi/recordings
No errors when I start. I did have an initial error regarding the interface so I changed from 0 to 1. I have created the folder, but no recordings being published and feed isn't streaming to Broadcastify, it's connected but if I listen live it gives me an error?

Code:
devices:
({
  type = "rtlsdr";
  index = 1;
  gain = 25;  # This may need adjustment depending on your hardware
  centerfreq = 157.175;
  correction = 0;   # this can be determined using "cumulative" output from running 'rtl_test -p' for several minutes
  channels:
  (
    {
      freq = 157.175;
      labels = ( "Channel 83 Marine Port Moresby" );
      # modulation = "am";
      highpass = 320;
     outputs:
        (
       {
          # Here is where you need to configure your icecast server with broadcastify details
          type = "icecast";
          server = "audio#.broadcastify.com";
          port = 80;
          mountpoint = "MYMOUNT";  # Note: Do not include a leading slash "/"
          name = "Channel 83 Marine Port Moresby";
          genre = "Marine";
          username = "source";
          password = "MYPASSWORD";
        },
       {
          type = "file";
          directory = "/home/pi/recordings";
          filename_template = "marine_83";
        }
      );
    }
  );
});
 
Last edited:

xicarusx

Member
Feed Provider
Joined
Oct 2, 2008
Messages
104
Location
Sayre, PA
No errors when I start. I did have an initial error regarding the interface so I changed from 0 to 1. I have created the folder, but no recordings being published and feed isn't streaming to Broadcastify, it's connected but if I listen live it gives me an error?

Code:
devices:
({
  type = "rtlsdr";
  index = 1;
  gain = 25;  # This may need adjustment depending on your hardware
  centerfreq = 157.175;
  correction = 0;   # this can be determined using "cumulative" output from running 'rtl_test -p' for several minutes
  channels:
  (
    {
      freq = 157.175;
      labels = ( "Channel 83 Marine Port Moresby" );
      # modulation = "am";
      highpass = 320;
     outputs:
        (
       {
          # Here is where you need to configure your icecast server with broadcastify details
          type = "icecast";
          server = "audio#.broadcastify.com";
          port = 80;
          mountpoint = "MYMOUNT";  # Note: Do not include a leading slash "/"
          name = "Channel 83 Marine Port Moresby";
          genre = "Marine";
          username = "source";
          password = "MYPASSWORD";
        },
       {
          type = "file";
          directory = "/home/pi/recordings";
          filename_template = "marine_83";
        }
      );
    }
  );
});

I see you commented out modulation. Uncomment and change it to nfm from am and see if that makes a difference.
 

robhux

Member
Feed Provider
Joined
Mar 27, 2022
Messages
7
Configuration error: devices.[0] channels.[0]: unknown modulation

Looking at the wiki I changed from using "index = "0";" to using "serial = "00000001"; and now I can see the program running, which I wasn't seeing before. Modulation changed to nfm still throws an error though. A recording has also shown up but no audio heard. When I listen live from Broadcastify website it says error connecting to feed but feed online.
 
Last edited:

xicarusx

Member
Feed Provider
Joined
Oct 2, 2008
Messages
104
Location
Sayre, PA
Configuration error: devices.[0] channels.[0]: unknown modulation

modulation (string, optional) - channel modulation, either "am" (the default) or "nfm". The latter is only available if NFM support has been enabled when building the program, otherwise you will get "unknown modulation" error on program start.

Might need to rebuild rtl_airband with nfm support. It isn't too hard to do. Are you using Pi4, Pi3, Pi2 or Pi1? I will write the instructions for you :)
 

robhux

Member
Feed Provider
Joined
Mar 27, 2022
Messages
7
modulation (string, optional) - channel modulation, either "am" (the default) or "nfm". The latter is only available if NFM support has been enabled when building the program, otherwise you will get "unknown modulation" error on program start.

Might need to rebuild rtl_airband with nfm support. It isn't too hard to do. Are you using Pi4, Pi3, Pi2 or Pi1? I will write the instructions for you :)

Thanks that would be awesome! I'm using a Pi4 with latest Broadcastify image.
 

xicarusx

Member
Feed Provider
Joined
Oct 2, 2008
Messages
104
Location
Sayre, PA
Here is how you can compile and install rtl_airband with nfm on Raspberry Pi4

Install Requirements and Dependencies
sudo apt-get install build-essential cmake pkg-config libmp3lame-dev libshout3-dev libconfig++-dev libfftw3-dev librtlsdr-dev libpulse-dev


Compile and Install

Download stable archive and extract
cd ~ && wget -O RTLSDR-Airband-4.0.2.tar.gz https://github.com/szpajder/RTLSDR-Airband/archive/v4.0.2.tar.gz

Extract archive and enter directory
tar xvfz RTLSDR-Airband-4.0.2.tar.gz && cd RTLSDR-Airband-4.0.2

Make build directory and create build files
mkdir build && cd build cmake && -DPLATFORM=armv8-generic -DNFM=ON ../

Build and install
make && sudo make install

When that is done try to run again with your config and see if it accepts nfm as a modulation. :)
 

robhux

Member
Feed Provider
Joined
Mar 27, 2022
Messages
7
Make build directory and create build files
mkdir build && cd build cmake && -DPLATFORM=armv8-generic -DNFM=ON ../

Build and install
make && sudo make install

When that is done try to run again with your config and see if it accepts nfm as a modulation. :)

Getting an error here;
mkdir build && cd build cmake && -DPLATFORM=armv8-generic -DNFM=ON ../
bash: cd: too many arguments
So I manually did
mkdir build
then
cd build
then
cmake && -DPLATFORM=armv8-generic -DNFM=ON ../
then I get this
Code:
Usage

  cmake [options] <path-to-source>
  cmake [options] <path-to-existing-build>
  cmake [options] -S <path-to-source> -B <path-to-build>

Specify a source directory to (re-)generate a build system for it in the
current working directory.  Specify an existing build directory to
re-generate its build system.

Run 'cmake --help' for more information.

bash: -DPLATFORM=armv8-generic: command not found
 

xicarusx

Member
Feed Provider
Joined
Oct 2, 2008
Messages
104
Location
Sayre, PA
Getting an error here;
mkdir build && cd build cmake && -DPLATFORM=armv8-generic -DNFM=ON ../
bash: cd: too many arguments
So I manually did
mkdir build
then
cd build
then
cmake && -DPLATFORM=armv8-generic -DNFM=ON ../
then I get this
Code:
Usage

  cmake [options] <path-to-source>
  cmake [options] <path-to-existing-build>
  cmake [options] -S <path-to-source> -B <path-to-build>

Specify a source directory to (re-)generate a build system for it in the
current working directory.  Specify an existing build directory to
re-generate its build system.

Run 'cmake --help' for more information.

bash: -DPLATFORM=armv8-generic: command not found

I forgot an && on that line oops. The other one I added an &&.

Try this command here.
cmake -DPLATFORM=armv8-generic -DNFM=ON ../
 

robhux

Member
Feed Provider
Joined
Mar 27, 2022
Messages
7
I forgot an && on that line oops. The other one I added an &&.

Try this command here.
cmake -DPLATFORM=armv8-generic -DNFM=ON ../
Thanks, managed to get the install working and now modulation is "nfm". Is it possible to do wideband for marine instead of narrow?

I can hear in the recorded .mp3 the transmitter keying, no audio as yet.
 

xicarusx

Member
Feed Provider
Joined
Oct 2, 2008
Messages
104
Location
Sayre, PA
Thanks, managed to get the install working and now modulation is "nfm". Is it possible to do wideband for marine instead of narrow?

I can hear in the recorded .mp3 the transmitter keying, no audio as yet.

RTL_Airband seems to only work with am or nfm currently. Try increasing the gain. Maybe there are transmissions and you hear the key up, but not the voice.
Set this to 36.4
gain = 25; # This may need adjustment depending on your hardware
 

robhux

Member
Feed Provider
Joined
Mar 27, 2022
Messages
7
RTL_Airband seems to only work with am or nfm currently. Try increasing the gain. Maybe there are transmissions and you hear the key up, but not the voice.
Set this to 36.4
gain = 25; # This may need adjustment depending on your hardware
Thanks - perfect!! It's still fairly quiet, can I increase that further for testing? I can see the scrolling numbers on terminal go from -27 to 0 when transmitting, right side shows -28 then -28*. Assume this is some sort of level input?

Still having some issues with the streaming side, but .mp3 is working. Broadcastify shows feed is online but gives an error when connecting. Possibly my network?
 

xicarusx

Member
Feed Provider
Joined
Oct 2, 2008
Messages
104
Location
Sayre, PA
Thanks - perfect!! It's still fairly quiet, can I increase that further for testing? I can see the scrolling numbers on terminal go from -27 to 0 when transmitting, right side shows -28 then -28*. Assume this is some sort of level input?

Still having some issues with the streaming side, but .mp3 is working. Broadcastify shows feed is online but gives an error when connecting. Possibly my network?

You can adjust gain up to 49. The higher you go the more distorted it may become. What you are seeing is transmission! WHen you see a * means squelch is open and audio should be present. Broadcastify feed will take up to 3 minutes from the time you start the feed until you can connect as a client.
 

avidscavenger

Newbie
Feed Provider
Joined
Sep 14, 2022
Messages
3
Sorry if this has already been covered but I can't seem to find it. Is there a "minimal" broadcastify-ready RPi image available anywhere? No GUI.
Trying to run this on a B2 and it's too slow to be usable. In any case I want to configure it remotely over ssh. Or if none, what about intro to starting from a virgin RPi or Linux install?
 
Last edited:

xicarusx

Member
Feed Provider
Joined
Oct 2, 2008
Messages
104
Location
Sayre, PA
Sorry if this has already been covered but I can't seem to find it. Is there a "minimal" broadcastify-ready RPi image available anywhere? No GUI.
Trying to run this on a B2 and it's too slow to be usable. In any case I want to configure it remotely over ssh. Or if none, what about intro to starting from a virgin RPi or Linux install?

This depends on what you want to do. Do you just want to stream via Darkice to Broadcastify, or are you thinking about doing Calls? Are you using USB audio input or are you wanting to use RTL-SDR as input?
 

avidscavenger

Newbie
Feed Provider
Joined
Sep 14, 2022
Messages
3
This depends on what you want to do. Do you just want to stream via Darkice to Broadcastify, or are you thinking about doing Calls? Are you using USB audio input or are you wanting to use RTL-SDR as input?

I plan to start by streaming USB audio but I'm also interested in RTL-SDR. Probably not Calls at this stage, though I'd still be interested in knowing whether that could be done without running Xorg on my RPi.
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,547
Location
Massachusetts
I plan to start by streaming USB audio but I'm also interested in RTL-SDR. Probably not Calls at this stage, though I'd still be interested in knowing whether that could be done without running Xorg on my RPi.
Setup is relatively simple on a pi. An older pi works well for just streaming to bcfy.

install the PIOS on your sd card and boot up pi With your usb sound card plugged in. You don’t need the gui so the lite version of the OS is perfect, but the full version works just as well.

In the terminal, type sudo apt install pavucontrol

In the terminal type sudo apt install darkice

now for the tricky part. You need to use the nano text editor on the pi to set up you darkice configuration file.

here is what goes in that file:

# 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 = 5 # 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 = default # OSS DSP soundcard device for the audio input
sampleRate = 11025 # sample rate in Hz. try 11025, 22050 or 44100
bitsPerSample = 16 # bits per sample. try 16
channel = 1 # channels. 1 = mono, 2 = stereo

# this section describes a streaming connection to an IceCast2 server
# there may be up to 8 of these sections, named [icecast2-0] ... [icecast2-7]
# these can be mixed with [icecast-x] and [shoutcast-x] sections
[icecast2-0]
bitrateMode = cbr # constant bit rate
bitrate = 16
format = mp3 # format of the stream: mp3
quality = .1 # quality of the stream sent to the server
lowpass = 3000 # low pass filter to save bandwidth
server = audioX.broadcastify.com # host name of the server
port = 80 # 8000 port of the IceCast2 server, usually 8000
password = XXXXX # stream631 # source password to the IceCast2 server
mountPoint = YYYYY #EMR1 # mount point of this stream on the IceCast2 server
name = YOUR NAME # name of the stream
description = AAAAA # description of the stream
url = http://localhost # URL related to the stream
genre = Public Safety # genre of the stream
public = yes # advertise this stream?


THE ONLY ITEMS YOU NEED TO EDIT ARE THE SERVER, PASSWORD, AND MOUNTPOINT. This info came in the email from bcfy when you got your feed approved. With any luck you will be able to copy and paste the text above into your terminal window.

To start the text editor in the terminal window type sudo nano /etc/darkice.cfg. This will create a blank file into which you paste the above text. To save and exit it is cntrl-x then y, then enter.

now simply type darkice in the terminal window to start the streamer. It will give you a message about recording skips and starting with sudo. Ignore that message.

post back here any error messages that you get.

i am just going by memory here so I hope that I haven’t forgotten anything.
 

Kingscup

Member
Feed Provider
Joined
Jun 1, 2006
Messages
599
I just came across this error message that may or may not be of interest. The Calls website shows a transmission on the website but there is no audio associated with it. I have noticed this on occasion with the website but it is the first time I actually saw an error on the upload. Using the Broadcastify appliance. [2022-09-20 14:22:46.010922] (error) [RVC] TG: 1 Freq: 151385000 Hz Broadcastify Metadata Upload Error: 0 https://s3.amazonaws.com/calls.broa...dHeaders=host;x-amz-acl&x-amz-acl=public-read

It is not a big deal to me but may be of interest.
 

avidscavenger

Newbie
Feed Provider
Joined
Sep 14, 2022
Messages
3
Thank you @DC31 I've had a few adventures getting it working and here is brief description of the lessons I learned:

1. You do not need to install pulseaudio - ALSA works fine. You just need to get the device setting correct. In my case I use a USB sound card and
plughw:1,0 as the device.
2. Getting darkice to run as a service was quite painful. You can't just use rc.d scripts because on booting it tries to start darkice before any USB sound card has become available. I found a solution using systemd unit files here: Broadcast Sound over Network from RaspberryPi with Rasbian Stretch, DarkIce and Icecast2 - KBase
 
Top