
Ask HN: How to stream low latency audio from one machine to another over LAN? - pizza
Been trying to do this on and off for years now, at different moments for different reasons. Is there a simple way that makes it possible to stream (uncompressed) audio from one machine to another?<p>e.g. Windows 10 desktop PC audio output -&gt; Macbook headphone output on the same LAN.<p>For what it&#x27;s worth, I&#x27;ve known that it&#x27;s possible for <i>some</i> people to accomplish this using VLC but I&#x27;ve been trying to use the same tutorials, in vain, for the better part of .. a decade now? ..  without success via VLC. I also tried using IceCast but since it uses TCP it is kinda fucky. Thanks.<p>PS.<p>Currently using the SoundIt Chrome extension to stream a lower quality audio stream atop of the Chrome Remote Desktop api, but this is hardly ideal for a few reasons -  a) the client webpage UI uses a ton of CPU and drains battery on my laptop, b) iffy quality at best and robotic crunches at worst, c) it seems unmaintained.<p>I&#x27;ll buy another audio interface soon, but this is not really a problem that I don&#x27;t want to again be unable to solve when it crops up in the future again..
======
samlewis
This should be really easily if you use gstreamer pipelines. Something like
this:

    
    
      # To send
      gst-launch filesrc location=file.wav ! wavparse ! audioconvert ! audio/x-raw-int,channels=1,depth=16,width=16,rate=44100 ! rtpL16pay ! udpsink host=localhost port=1234
    
      # To receive. You could also use something like VLC with "vlc rtp://localhost:1234" for this part. 
      gst-launch udpsrc port=1234 ! "application/x-rtp,media=(string)audio, clock-rate=(int)44100, width=16, height=16, encoding-name=(string)L16, encoding-params=(string)1, channels=(int)1, channel-positions=(int)1, payload=(int)96" ! rtpL16depay ! audioconvert ! alsasink sync=false
    

gstreamer gives fairly good control over tuning things like jitter buffers and
sampling rates. That said, I've never had to use it on Windows so YMMV.

------
cdvonstinkpot
Maybe something along the lines of Vortexbox [1] in a VM?

[1]

[https://distrowatch.com/table.php?distribution=vortexbox](https://distrowatch.com/table.php?distribution=vortexbox)

