Actions

Difference between revisions of "Raspberry Pi Broadcastify Build"

From The RadioReference Wiki

(No difference)

Revision as of 19:49, 15 August 2015

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.

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

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
sudo reboot

Install and configure ezstream

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>

Stream directly from a USB 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
  • 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 -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.