Actions

Difference between revisions of "Raspberry Pi Broadcastify Build"

From The RadioReference Wiki

(added "libjack-jackd2-dev" JACK Audio Connection Kit (development files) to install packages to fix a darkice error. See https://packages.ubuntu.com/trusty/libjack-jackd2-dev Adds about 300 kb)
(→‎Purchase Equipment: updated links to available and better products at lowest prices)
Line 8: Line 8:
 
== Purchase Equipment ==
 
== Purchase Equipment ==
  
Raspberry Pi 2 Model B Project Board - 1GB RAM - 900 MHz Quad-Core CPU
+
Raspberry Pi 2 Model B Project Board
 
* http://amzn.to/1Ku3T9Y
 
* http://amzn.to/1Ku3T9Y
 
-or-
 
-or-
Raspberry Pi 3 Model B Project Board - 1GB RAM - 1.2 Ghz Quad-Core CPU - 802.11n
+
Raspberry Pi 3 Model B+ Project Board
* http://amzn.to/1SXOEe6
+
* https://www.amazon.com/dp/B07BDR5PDW
 +
-or-
 +
Raspberry Pi 3 Model B+ Kit, includes power supply, case, heat sinks, in-line power switch '''(recommended)'''
 +
* https://www.amazon.com/dp/B07BC7BMHY
  
Power Supply for Raspberry Pi
+
Power Supply with in-line switch for Raspberry Pi
 
+
* https://www.amazon.com/dp/B07GZZT7DN
* http://amzn.to/1U2r8cD
 
  
 
Memory Card for Raspberry Pi
 
Memory Card for Raspberry Pi
 
+
* https://www.amazon.com/dp/B06XWN9Q99
* http://amzn.to/1U2r8JG
 
  
 
Case for Raspberry Pi (optional)
 
Case for Raspberry Pi (optional)
 
 
* http://amzn.to/1JLgNe3
 
* http://amzn.to/1JLgNe3
  
Inexpensive USB sound card ($1.70)
+
Inexpensive USB sound card ($9)
 
+
https://www.amazon.com/dp/B01N905VOY
http://amzn.to/1hekylB 
 
  
 
1/8 inch audio cable to connect scanner to USB sound card
 
1/8 inch audio cable to connect scanner to USB sound card
 
 
* http://amzn.to/1Kor0NH
 
* http://amzn.to/1Kor0NH
  

Revision as of 12:30, 21 July 2019

Raspberry Pi Broadcastify Feed Appliance

These instructions show you how to purchase and setup a completely self contained Raspberry Pi to broadcast a live audio feed to Broadcastify.com

These instructions have been verified and tested as working on a Raspberry Pi 2 Model B Project Board - 1GB RAM - 900 MHz Quad-Core CPU. Also installed and working on a Raspberry Pi 3 Model B (1 GB RAM - 1.2GHz 64 bit Quad-Core CPU - built in 802.11n wireless).

If you want to skip the build process, you can download our preconfigured Raspberry Pi image here Raspberry_Pi_Broadcastify_Image

Purchase Equipment

Raspberry Pi 2 Model B Project Board

-or- Raspberry Pi 3 Model B+ Project Board

-or- Raspberry Pi 3 Model B+ Kit, includes power supply, case, heat sinks, in-line power switch (recommended)

Power Supply with in-line switch for Raspberry Pi

Memory Card for Raspberry Pi

Case for Raspberry Pi (optional)

Inexpensive USB sound card ($9)

1/8 inch audio cable to connect scanner to USB sound card

Install Raspbian OS

All testing and configuration was done using Raspbian

Install pre-reqs and update raspberry pi to latest version

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git cmake libusb-1.0-0.dev build-essential lame 
sudo apt-get install libmp3lame-dev libvorbis-dev libshout-dev libtwolame0 libtwolame-dev libjack-jackd2-dev 
sudo reboot

Configure the Sound Card

  • Plug your scanner's headphone jack into the mic jack on the USB sound card dongle
  • Start alsamixer
pi@raspberrypi:~# alsamixer
  • press F6, choose the "USB Headphone Set" entry
  • press your tab key to select the "Capture" device volume control
  • use your "up arrow" key to adjust the level to it's lowest level possible (6)
  • press escape to exist alsamixer
  • run the following command to save the volume settings
sudo alsactl store

Two Choices of Software to Broadcast

We recommend the darkice install and configuration method

Method 1: Darkice Install and Configuration (Recommended)

  • download the precompiled version of darkice
wget http://s.broadcastify.com/darkice/darkice_bcfy_v01.tar.gz
  • uncompress the files
tar zxvf darkice_bcfy_v01.tar.gz
  • move the files to the proper places and make sure they are executable
sudo mv darkice /usr/bin
sudo mv darkice1 /etc/init.d
sudo mv darkice.cfg /etc/darkice1.cfg     <--- note the "1" in the /etc/darkice1.cfg you are copying to
  • Edit the /etc/darkice1.cfg file to match your settings, including the sound card you are using, your feed server, mount, password, and description, then exit and save the file
sudo nano /etc/darkice1.cfg
  • Enable the feed to start broadcasting at boot
sudo update-rc.d darkice1 defaults
  • Start your feed
sudo service darkice1 start

Method 2: Ezstream Install and Configuration

sudo apt-get install ezstream

Create the following configuration file at /etc/ezstream_bcfy.xml and replace with your mount, password, and stream name. If you plan on having multiple streams make sure and create a separate named configuration file (i.e.'/etc/ezstream_bcfy2.xml) for each stream and reference accordingly in your command script below.

<ezstream>
    <url>http://audio#.broadcastify.com:80/your_mount</url>
    <sourcepassword>your_source_password</sourcepassword>
    <format>MP3</format>
    <filename>stdin</filename>
    <svrinfoname>Stream Name</svrinfoname>
    <svrinfourl>http://www.broadcastify.com</svrinfourl>
    <svrinfogenre>Scanner</svrinfogenre>
    <svrinfodescription></svrinfodescription>
    <svrinfobitrate>16</svrinfobitrate>
    <svrinfochannels>1</svrinfochannels>
    <svrinfosamplerate>22050</svrinfosamplerate>
    <svrinfopublic>0</svrinfopublic>
</ezstream>
  • Run this command to start the sound card broadcast
arecord -f dat -c 1 -D hw:1,0 | \
/usr/bin/lame -r -s 48 --resample 22.05 -m m -b 16 --cbr --lowpass 4 - - | \
/usr/bin/ezstream -q -c /etc/ezstream_bcfy1.xml > /var/log/bcfy1.log 2>&1 &

Note: very little volume will be needed from your scanner - adjust the levels as appropriate for a good sounding feed.


Optional Scripts