Raspberry Pi Darkice streaming made easy

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,266
Location
Massachusetts
I have put together an SD card image for a Raspberry Pi which should work "out of the box" to set up a pi for streaming. You will need a Pi3 or earlier. It will not work on a pi4 as it is based on Raspbian Stretch Lite and the 4 requires Buster. Darkice requires pretty minimal CPU resources on the pi so any of the older pi models will work. However, the model A and PiZero do not have an ethernet jack. These could be set up wifi but I have not covered that here.
Download the .zip from the link below (be patient, it took 15 minutes to upload), unzip it to create a .img file, then image a blank SD card (min 8gb) using Etcher, win32DiskImager, or your choice. The OS is included with this image, no need to install an OS separately.



I tried to set up the image for ssh access but I am not sure this was successful. Since it is Stretch Lite there is no GUI. Plug in a usb keyboard and usb sound card and connect to an HDMI monitor. Login credentials are Username=pi and password=bcfy-pi
As long as you have a usb sound card installed, darkice will start as soon as the pi is powered up. It is streaming to an icecast server on the pi itself. With the pi connected via ethernet, go to a web browser on another computer on the same network and browse to http://piipaddress:8000 (click m3u). Determine the pi's ip address from your router setup page or using ifconfig at the command line.

Once you have successfully streamed locally, set the Pi up to stream to Broadcastify. The configuration file used is /etc/darkice1.cfg. Use the command line editor nano to edit this file. At the command line type: sudo nano /etc/darkice1.cfg There is no mouse so navigate using your arrow keys. The Section [icecast2-1] contains the broadcastify information. Enter your Server, Port, Mount (no leading slash), and Password; all from the BCFY Feed Owner Management page, Technicals Tab. Then remove the # at the start of each line in this section (uncomment). Be careful not to make any unwanted changes while editing this document. When finished it is Cntrl-x, Y, Enter to save the document.

Reboot your pi and if you got the entries correct, your BCFY stream will start.

At the command line type: sudo raspi-config to change your location and time zone as needed (image is US Eastern). Under Advanced Options, Expand the file system to the whole card.

Hide the pi away somewhere and it should stream to BCFY without any attention on your part for years. It is set to automatically reboot at 3 AM on Sundays to keep things clean.

The cheap (<$5) 3D usb sound cards on Ebay work well for this. For testing purposes, I find that streaming music from my iPhone through the audio cable into the sound card mic in jack works well. Keep the audio level low on any input to the mic jack.

Any questions, post back here.

Jim
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,266
Location
Massachusetts
If you run into difficulties, try changing device=hw:1,0 to device=2,0 in the configuration file, or vice versa.
 
Top