How do I stream a lossless audio signal with 192000kHz over a UDP connection?
I want to stream 192kHz signals sampled on a raspberry 4 (hifiberry shield) over the connected network via UTP. Ideally, as raw bytes, because I'm running a custom program, which reads the raw input steam and then processes it afterwards. To test the Pi part I've tried to save the data on the PC with ffmpeg as wav file, but I have problems with it.
On the Pi I'm runnung: ffmpeg -f alsa -acodec pcm_s32le -ar 192000 -i hw:3 -f s32le -ar 192000 -acodec pcm_s32le udp://192.168.0.10:9999
With Wireshark I can see, that packages are sent over UDP. On the PC I'm running: ffmpeg -i udp://192.168.0.10:9999 -f s32le -bitexact -acodec pcm_s32le -ar 192000 "test.wav"
but this only resulsts in an error message: Invalid data found when processing input.
What I tried before was to use mpegts
instead s32le
, but this seems only to be usable with a samplerate up to 48kHz.
Is there a way to stream raw 192kHz audio stream over UDP? And contains the stream some form of header, that I need to consider, when extracting and converting the received bytes into 32bit floats?
s24le
[sorry, I said float before, but it was 32-bit signed, my bad]