I have a RPi that is running videos with omxplayer and outputting to my tv. HDMI video and audio out work just fine, but I would additionally like to stream only the audio to my network (via RTP or other means) so I can connect other devices in different rooms and continue listening -- like a LAN radio broadcast of sorts. I have tried using avconv and ffmpeg but have only been successful in capturing audio before it is sent to the tv (on $DISPLAY=0).
I am currently working on duplicating the audio and capturing it that way but have only come up with silent audio files so far.
I can record audio with avconv / ffmpeg before it gets sent to HDMI out but can't get the duplicated audio to record anything.
I successfully streamed previously saved audio files via RTP, but it was a little too choppy for my liking - audio was dropping every 10-ish seconds. Is this a limitation of the RPi 3B+ hardware? Ideally I would like to stream the HDMI audio with as little delay as possible. It is not necessarily my goal to save the HDMI audio as a large file as I plan to leave the service running for long periods of time.
Also, while following the above link, I am not entirely sure what to put as the device name in asound.conf
card <Your Output Device Name>
card 0? or the HDMI device?