{"id":2228,"date":"2008-09-22T09:01:21","date_gmt":"2008-09-22T09:01:21","guid":{"rendered":"http:\/\/t.motd.kr\/articles\/2228\/streaming-audio-from-windows-to-pulseaudio-server"},"modified":"2022-12-28T01:45:35","modified_gmt":"2022-12-27T16:45:35","slug":"streaming-audio-from-windows-to-pulseaudio-server","status":"publish","type":"post","link":"https:\/\/vault.motd.kr\/wordpress\/posts\/2228\/streaming-audio-from-windows-to-pulseaudio-server\/","title":{"rendered":"Streaming Audio from Windows to PulseAudio Server"},"content":{"rendered":"\n
PulseAudio<\/a> is a great network audio server for Linux. It allows me to stream audio between machines. However, the biggest problem with PulseAudio is that it doesn\u2019t have a descent client implementation for Windows. There are a couple known workarounds such as using WinESD<\/a>, but they are all pretty experimental. Also, the Win32 binary build<\/a> didn\u2019t work for me, perhaps because it\u2019s somewhat outdated and buggy.<\/p>\n\n\n\n My first try was to use LineInCode<\/a> and Netcat for Windows<\/a> on the client side and to use However, PulseAudio dies whenever the connection is closed because of a known issue of I have installed a Cygwin<\/a> build of OpenSSH, and replaced Netcat with it:<\/p>\n\n\n\n This solution works without In case your Windows machine doesn\u2019t have a sound card or it doesn\u2019t allow you to capture the audio stream, you might want to use Virtual Audio Cable<\/a>. It\u2019s a commercial software, but it is worth a purchase.<\/p>\n\n\n\n You might also want to set up a passwordless login<\/a> so you don\u2019t have to enter the password every time you stream the audio.<\/p>\n","protected":false},"excerpt":{"rendered":" PulseAudio is a great network audio server for Linux. It allows me to stream audio between machines. However, the biggest problem with PulseAudio is that it doesn\u2019t have a descent client implementation for Windows. There are a couple known workarounds such as using WinESD, but they are all pretty experimental. Also, the Win32 binary build… Continue reading module-simple-protocol-tcp<\/code> on the server side. After adding
-L \"module-simple-protocol-tcp port=4712 rate=44100 format=s16le channels=2\"<\/code> option to the PulseAudio startup option, I was able to stream audio from Windows to PulseAudio server using the following command:<\/p>\n\n\n\n
linco.exe -B 16 -C 2 -R 44100 | nc.exe <host> 4712<\/code><\/pre>\n\n\n\n
module-simple-protocol-tcp<\/code><\/a>. I wrote some script that restarts PulseAudio whenever it dies, but I realized there\u2019s a better solution \u2013 OpenSSH.<\/p>\n\n\n\n
linco.exe -B 16 -C 2 -R 44100 | ssh.exe <user@host> \"cat - | pacat --playback\"<\/code><\/pre>\n\n\n\n
module-simple-protocol-tcp<\/code>, and therefore there\u2019s no need to restart the PulseAudio server on disconnection. Better security is another bonus. Instead, it requires a running SSH<\/span> server. If SSHD<\/span> is not running in the PulseAudio server, you can give it a little twist:<\/p>\n\n\n\n
linco.exe -B 16 -C 2 -R 44100 | ssh.exe <user@otherhost> \"cat - | pacat --server <host> --playback\"<\/code><\/pre>\n\n\n\n