Actions

Difference between revisions of "Broadcastify-Calls-Trunk-Recorder"

From The RadioReference Wiki

 
(25 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
=== Install the Required Prerequisites ===
 +
<div style="width: 75%; background-color: yellow; padding: 8px; margin: 8px">
 +
<div style="font-weight: bold; color: red; text-align: center;">Don't skip this.  **** YOU HAVE TO DO THIS *****</div>
 +
==== Ubuntu ====
 +
* libssl-dev
 +
* libcurl4-openssl-dev
 +
* fdkaac
 +
* sox
 +
* ntp
 +
* ntpstat
 +
sudo apt-get install libssl-dev libcurl4-openssl-dev fdkaac sox ntp ntpstat
 +
 +
==== Mac OS X ====
 +
brew install fdk-aac-encoder sox
 +
<br />
 +
</div>
 +
 
=== Download and Build Trunk Recorder ===
 
=== Download and Build Trunk Recorder ===
  
Line 7: Line 24:
 
Build instructions are here:
 
Build instructions are here:
  
* https://github.com/robotastic/trunk-recorder/wiki/Building-Trunk-Recorder
+
* https://github.com/robotastic/trunk-recorder/wiki/Installation
 
<br />
 
<br />
'''Make sure you have ffmpeg compiled and built to support AAC audio encoding.  See at the bottom of the page for details'''
+
'''Make sure you have fdkaac and sox installed as listed above in the prereqs!'''
  
 
=== Apply for API Key and System ID ===
 
=== Apply for API Key and System ID ===
  
You will need an '''API Key''' and '''System ID''' assigned by the Broadcastify administrator before you can get started.   
+
You will need an '''API Key''' and '''System ID''' assigned by the administrator before you can get started.   
  
To get a System ID and API Key issued, send an email to '''support@radioreference.com''' with the following info:
+
To get a System ID and API Key issued, submit an application here:
  
# Your RadioReference/Broadcastify Username
+
https://www.broadcastify.com/apply/calls
# Trunked or Conventional System(s) you wish to send to us
 
# Trunked Site Name (in the RRDB) or Frequencies List to send to us
 
# County where your ingest system resides
 
  
 
=== Configure Trunk Recorder ===
 
=== Configure Trunk Recorder ===
Line 37: Line 51:
 
* API Key Example:  "9c3e3b1d-324f-11aa-bd8b-0ec68ab9ccec"
 
* API Key Example:  "9c3e3b1d-324f-11aa-bd8b-0ec68ab9ccec"
 
* System ID Example:  "91"  
 
* System ID Example:  "91"  
 +
* Note: The "ppm" and "gain" values are for example only.  Use GQRX or similar to adjust them for your particular SDR sources and optimum SNR.
 +
* Note: The "shortName" value cannot have spaces or special characters; this will cause uploads to fail.
 +
 +
  The [https://github.com/robotastic/trunk-recorder/blob/master/README.md README.md file] lists all the configuration options.
 +
  More info can be found in the [https://github.com/robotastic/trunk-recorder/wiki WIKI]
 
<br />
 
<br />
 
  {
 
  {
Line 63: Line 82:
 
  }
 
  }
  
=== Compile and Install FFMpeg with AAC-HE Support ===
+
=== Startup Scripts ===
To install on Ubuntu 18.04 add bionic universe and multiverse package repos then follow the instructions for Ubuntu 16.04
+
==== MAC OS X ====
 +
 
 +
'''/Library/LaunchDaemons/org.username.tr.plist'''
 +
 
 +
Replace "username" with your Mac OS X Account username
 +
 
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 +
<plist version="1.0">
 +
<dict>
 +
    <key>EnvironmentVariables</key>
 +
    <dict>
 +
      <key>PATH</key>
 +
      <string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:</string>
 +
    </dict>
 +
    <key>Label</key>
 +
    <string>org.username.tr</string>
 +
    <key>Program</key>
 +
    <string>/Users/username/radio/trunk-build/start.sh</string>
 +
    <key>RunAtLoad</key>
 +
    <true/>
 +
    <key>StandardErrorPath</key>
 +
    <string>/tmp/org.username.tr.stderr</string>
 +
    <key>StandardOutPath</key>
 +
    <string>/tmp/org.username.tr.stdout</string>
 +
    <key>UserName</key>
 +
    <string>username</string>
 +
</dict>
 +
</plist>
 +
 
 +
'''/Users/username/radio/trunk-build/start.sh'''
 +
 
 +
#!/bin/sh
 +
cd /Users/username/radio/trunk-build
 +
./recorder --config=config.json
 +
 
 +
'''Load or Unload at Startup
 +
sudo launchctl load -w /Library/LaunchDaemons/org.username.tr.plist
 +
sudo launchctl unload -w /Library/LaunchDaemons/org.username.tr.plist
 +
 
 +
'''/Users/username/radio/trunk-build/restart.sh'''
 +
 
 +
#!/bin/sh
 +
export PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:
 +
killall recorder > /dev/null
 +
cd /Users/username/radio/trunk-build
 +
./recorder --config=config.json &
 +
 
 +
'''Crontab for auto-restart every 3 hours'''
  
  sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu bionic universe"
+
  0 */3 * * * /bin/sh /Users/username/radio/trunk-build/restart.sh > /dev/null
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu bionic multiverse"
 
sudo apt-get update
 
sudo apt-get upgrade
 
  
Install for Ubuntu 16.04. This is a minimal install, check out the FFMPEG docs if you want more libraries enabled.
 
  
sudo apt-get update
+
[[Category:Online Radios]]
sudo apt-get -y install autoconf automake build-essential libass-dev libfreetype6-dev \
 
  libtool pkg-config texinfo zlib1g-dev yasm libfdk-aac-dev
 
wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
 
tar xjvf ffmpeg-snapshot.tar.bz2
 
cd ffmpeg
 
./configure \
 
  --pkg-config-flags="--static" \
 
  --bindir="$HOME/bin" \
 
  --enable-gpl \
 
  --enable-libass \
 
  --enable-libfdk-aac \
 
  --enable-nonfree
 
make
 
sudo make install
 

Latest revision as of 13:38, 9 July 2021

Install the Required Prerequisites

Don't skip this. **** YOU HAVE TO DO THIS *****

Ubuntu

  • libssl-dev
  • libcurl4-openssl-dev
  • fdkaac
  • sox
  • ntp
  • ntpstat
sudo apt-get install libssl-dev libcurl4-openssl-dev fdkaac sox ntp ntpstat

Mac OS X

brew install fdk-aac-encoder sox


Download and Build Trunk Recorder

You need to download and build the latest version of Trunk Recorder


Build instructions are here:


Make sure you have fdkaac and sox installed as listed above in the prereqs!

Apply for API Key and System ID

You will need an API Key and System ID assigned by the administrator before you can get started.

To get a System ID and API Key issued, submit an application here:

https://www.broadcastify.com/apply/calls

Configure Trunk Recorder

There are 3 configuration options

broadcastifyApiKey      : specified for each system entry in your trunk-recorder config
                          this is the API Key issued to you by the administrator

broadcastifySystemId    : specified for each system entry in your trunk-recorder config
                          this is the unique system identifier issued to you by the administrator

broadcastifyCallsServer : specified SYSTEMWIDE in your trunk-recorder config
                          should always be set to: "https://api.broadcastify.com/call-upload"

Example Trunk Recorder configuration

  • API Key Example: "9c3e3b1d-324f-11aa-bd8b-0ec68ab9ccec"
  • System ID Example: "91"
  • Note: The "ppm" and "gain" values are for example only. Use GQRX or similar to adjust them for your particular SDR sources and optimum SNR.
  • Note: The "shortName" value cannot have spaces or special characters; this will cause uploads to fail.
 The README.md file lists all the configuration options.
 More info can be found in the WIKI


{
	"sources": [{
		"center": 853000000.0,
		"rate": 2048000,
		"ppm": 69.0,
		"gain": 35.0,
		"digitalLevels": 3,
		"digitalRecorders": 4,
		"driver": "osmosdr",
		"device": "rtl=02,buflen=65536",
		"modulation": "fsk4"
	}],
	"systems": [{
		"control_channels": [851325000, 851825000],
		"type": "p25",
		"shortName": "mySystemName",
		"broadcastifyApiKey": "9c3e3b1d-324f-11aa-bd8b-0ec68ab9ccec",
		"broadcastifySystemId": "91",
		"audioArchive": false
	}],
	"broadcastifyCallsServer": "https://api.broadcastify.com/call-upload",
	"controlWarnRate": 5,
	"callTimeout": 0.75
}

Startup Scripts

MAC OS X

/Library/LaunchDaemons/org.username.tr.plist

Replace "username" with your Mac OS X Account username

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>EnvironmentVariables</key>
    <dict>
      <key>PATH</key>
      <string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:</string>
    </dict>
    <key>Label</key>
    <string>org.username.tr</string>
    <key>Program</key>
    <string>/Users/username/radio/trunk-build/start.sh</string>
    <key>RunAtLoad</key>
    <true/>
    <key>StandardErrorPath</key>
    <string>/tmp/org.username.tr.stderr</string>
    <key>StandardOutPath</key>
    <string>/tmp/org.username.tr.stdout</string>
    <key>UserName</key>
    <string>username</string>
</dict>
</plist>

/Users/username/radio/trunk-build/start.sh

#!/bin/sh
cd /Users/username/radio/trunk-build
./recorder --config=config.json

Load or Unload at Startup

sudo launchctl load -w /Library/LaunchDaemons/org.username.tr.plist
sudo launchctl unload -w /Library/LaunchDaemons/org.username.tr.plist

/Users/username/radio/trunk-build/restart.sh

#!/bin/sh
export PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:
killall recorder > /dev/null
cd /Users/username/radio/trunk-build
./recorder --config=config.json &

Crontab for auto-restart every 3 hours

0 */3 * * * /bin/sh /Users/username/radio/trunk-build/restart.sh > /dev/null