Streaming audio from Windows to Linux using PulseAudio
Solution 1
https://github.com/duncanthrax/scream
It took less than 5 minutes to setup. It supports unicast and multicast raw streams from Windows at multiple sample rates. It has listeners for windows, ALSA and pulse-audio.
Solution 2
There are many success stories using Jack
streaming server.
One of them:
https://blogs.gentoo.org/mgorny/2015/01/16/surround-sound-over-network-with-windows-8/ (Archived)
Solution 3
A really simple solution with minimal software is to stream audio using VLC as RTP server and setting up a RTP source in pulseaudio.
Solution 4
The second part of the answer https://superuser.com/a/378000/65570 (the Windows part) probably applies to your case:
either use an old Windows esd driver, or the linco tool.
AFAIU, there is no pulseaudio sound output driver for Windows as of now, nor even the pulseaudio output module for VLC has been ever built for Windows. (This would allow at least an easy way to output the sound from VLC to your remote pulseaudio server.)
Solution 5
I was successful with using JACK, though unlike Eir Nym's answer, the sound is playing from the Linux box as you requested. I did a small write-up of it here: https://gist.github.com/kotarou3/3813bbf7833a0e4618f7fbe8a377872d
The advantage of using JACK over PulseAudio would be lower latency (provided you configure it correctly). Doesn't really matter if you're just playing music, but things like games and recording work needs the low latency.
Partially quoting for posterity:
Stream audio from Windows to Linux
Tested on Ubuntu 16.04 and Windows 10 Redstone 1
Both boxes need to be on the same network (such that multicast packets can be passed between them)
Installing
Linux
- Setup JACK (easy to do with Cadence)
Windows
- Install JACK and ASIO Bridge on the Windows box
- Run
regsvr32 32bits\JackRouter.dll
andregsvr32 64bits\JackRouter.dll
from JACK installation directory- Modify
32bits\JackRouter.ini
and64bits\JackRouter.ini
to match your channel and sample config- (Optional) Set the ASIO Bridge (Hi-Fi Audio) input as the default playback device
Running
- Start the netjack2 server on Linux with
jack_load netmanager
(probably also possible to add to.jackdrc
for it to autoload)- Run JACK NetDriver on Windows (it's in the Start menu), or
jackd -R -d net
- A new device named the hostname of the Windows box should have appeared on the Linux JACK patch panel (Catia if you're using Cadence). Connect it as you see fit (Note: Channels might not match up as expected if you have more than 2).
- Run ASIO Bridge (also in the Start menu), turn ASIO on, and set the ASIO device to JackRouter
- The ASIO Bridge should have automatically set up routes to the system device in the Windows JACK patch panel. You can double check with qjackctl (Jack Control in the Start menu) → Connections and connect them if not
Related videos on Youtube
marltu
Updated on September 18, 2022Comments
-
marltu almost 2 years
I have Linux box with Ubuntu + PulseAudio network server installed. I can stream audio from my laptop (with Linux installed too) to the box over local network.
I've recently installed Windows 7 into my laptop. I want to stream my laptop audio to the box. Could someone help me setup audio streaming over network over PulseAudio from Windows to Linux box?
-
Iiridayn over 6 yearsI got this working using VB-CABLE to route my sounds on Windows around. Latency is noticeable, but short; tolerable resolution for now.
-
Martin Hansen over 4 yearsHow did you set it up? I installed it on the remote PC and play sound through the scream speaker device, but the PC running ScreamReader receiver doesn't pick anything up.
-
Steven Rosato about 4 yearsIt worked in 10 mins for me too. Had to disable secure boot within bios on the Windows 10 machine. I compiled scream on linux for pulseaudio after installing libpulse-dev using the latest cmake build found on cmake.org/download. After that I did a
scream -i eth0
and it picked up the sound right away with unnoticable latency. Incredible! Thanks!