Raspberry Pi Broadcastify Build
From The RadioReference Wiki
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.
If you want to skip the build process, you can download our preconfigured Raspberry Pi image here Raspberry_Pi_Broadcastify_Image
Contents
Purchase Equipment
Raspberry Pi 2 Model B Project Board - 1GB RAM - 900 MHz Quad-Core CPU
Power Supply for Raspberry Pi
Memory Card for Raspberry Pi
Case for Raspberry Pi (optional)
Inexpensive USB sound card ($1.70)
1/8 inch audio cable to connect scanner to USB sound card
Install Raspbian OS
All testing and configuration was done using Raspbian
- Follow the instructions here to install the OS on the memory card you purchased:
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 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.