I have kodi (installed from the repos) as a mediaplayer on top of Ubuntu AMD64 18.04, and would like to stream whatever audio is being played on it to an icecast stream on my LAN, so that individual Raspberry Pi's can pick it up and play it in the different rooms in my house.
I have icecast installed on the mediaplayer PC and see the home screen on my.lan.IP.address:8000 from other machines on the network so that part is working.
What I can't seem to get to work is picking up the audio output and sending it to Icecast2. I have Darkice installed, it uses hw:0,0 as its input. I tried setting the input to "pulse" but that gets refused as a connection.
I start darkice with sudo privileges in order to get a low nice value to avoid stuttering. The effect of that is that it complains I do not have rights to the Home directory. It does not tell me which Home, or what it needs it for -there is no /home/something configured in the darkice config file. I use /tmp/dump.ogg for the dumpfile.
All the guides on the web are either deprecated or are aimed at different usecases (playing individual files instead of picking up an existing audio stream).
Can someone please guide me in the correct direction?