Raspberry Pi Darkice streaming made easy

Status
Not open for further replies.

bagman002

Newbie
Joined
Feb 7, 2012
Messages
4
Location
Sunshine Coast
I did yet another complete rebuild and this time instead of testing locally I just went straight to live. I am hoping should I restart it continue to work but at least this time I have audio and is working.

I did however leave the audio device as default in the config.
 

johngo

Newbie
Joined
Dec 3, 2021
Messages
2
DC31 - many, many thanks for your simple/straightforward instructions to get darkice/icecast2 running on the RPi4. Worked like a charm. Though I have a couple notes which might be significant for others.

While installing icecast2, there are screens to configure icecast2 (setting passwords and such). I seem to recall a notation that icecast2 won't startup unless this initial configuration is done. I ran through the configuration during installation, and changed the default passwords from hackme. The password then also needed to be updated in the /etc/darkice.cfg file, before darkice would start up appropriately.

I'm using a Sabrent USB (Type A) External Stereo Sound Adapter ($9 online), plugged into RPi4. As mentioned in your instructions, quite sure it needs to be plugged in/discovered, for darkice to work. 'aplay -l' or 'lsusb' will show the device, when connected.

I use it to stream whatever audio is playing on my satellite receiver at home, so that I can listen to various news channels, while on the road.

Johngo
 

johngo

Newbie
Joined
Dec 3, 2021
Messages
2
One other note... I couldn't get darkice to start up at boot. As referenced above, I was getting the "can't open connector" error. I resolved that when I set (in darkice.cfg):

device = plughw:1,0

Though I also had to create /home/pi/bin/startdark containing:
#!/bin/bash
cd /etc
darkice

Then made it executable -> chmod +x /home/pi/bin/startdark

Then created /lib/systemd/system/mydarkice.service containing:
[Unit]
Description=Darkice Service
After=multi-user.target

[Service]
Type=idle
ExecStart=/home/pi/bin/startdark &

[Install]
WantedBy=multi-user.target

I then disabled the native darkice service -> sudo systemctl disable darkice
...and pointed to my own darkice service -> sudo systemctl enable mydarkice

Can't explain exactly why it works, but I've read others mention a need for some sort of delay being needed, before the startup of darkice is attempted.
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,547
Location
Massachusetts
And do you have a fresh link for the image sir?

no you don’t need to stream to BCFY to hear your stream on line

i think that I took the image down as it was stale, didn’t work on the current pi’s.

send me a Private Message with your email.
 

adsbgreenock

Member
Joined
Sep 11, 2021
Messages
118
Location
Scotland UK
Hi there I was wondering if anyone could help me start the darkice on boot.

DC31 helped me greatly setting the config file up via anydesk for me (thanks again DC)

Since then I've had it running manually typing "darkice" in terminal and using mx player pro on android to listen to the stream.

I've copied the install onto a second pi which also works great

I would love to autostart this as everytime I restart or close terminal the audio stops.

I've tried messing with systemd, rc.local and crontab - e to no avail.
Nothing seems to work.

Anyone any ideas?


Regards
 

adsbgreenock

Member
Joined
Sep 11, 2021
Messages
118
Location
Scotland UK
Sorry guys couldn't edit previous post


I solved the issue by using :

sudo nano /etc/xdg/lxsession/LXDE-pi/autostart

Then at the end of the file applying the line :

@darkice -c /etc/darkice.cfg &

Seems to work well on buster when everything else did not

Thanks


Regards
 
Status
Not open for further replies.
Top