Darkice won't launch upon boot
Posted: Tue Feb 18, 2020 8:56 pm
by humanchaos
Hi all,
I connected my turntable via darkice->icecast to a Sonos speaker. Everything's going great so far except for one small problem:
Darkice won't launch after bootup. In order to get the system running I have to
sudo darkice -c ~/darkice.cfg
and kickstart Darkice by hand.
I am grateful for all solutions.
thank you
Markus
Re: Darkice won't launch upon boot
Posted: Thu Jul 23, 2020 2:05 pm
by Rocus
Hi Marcus,
I had this problem myself for a while and untill now I just let it be.
I think it has something to do with the icecast2 server not ready to receive the stream from darkice.
I tried to start darkice with systemd but I did not succeed. Still not convinced that systemd was such a great idea.
After trying to start it with systemd I returned to the good old /etc/rc.local: Starting with /etc/init.d/darkice also failed for unknown reasons.
In the rc.local file you start darkice with for example /usr/bin/darkice -c /etc/darkice.cfg & . Redirecting the output from this command showed me that icecast is not ready for the output of darkice. I solved this with a sleep command before the darkice command. This sleep must at least be 5 seconds. It all depends on the way things are started at boot time. If it still fails to start try 60 seconds. So to sum it up: put this at the end of rc.local:
sleep 5
darkice -c /etc/darkice.cfg > /tmp/darkice &
B.T.W. darkice takes quite a load on the raspberry's processor. In my case about 50-60% and strangely it rises to 100% when there is no signal at the input of the sound card (some cheap usb sound card in my case).