# streamer **Repository Path**: dd9394/streamer ## Basic Information - **Project Name**: streamer - **Description**: Stream raw PCM from a Windows recording device to a Linux machine over a TCP/IP socket. - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-27 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README Network Sound Streamer ====================== Stream raw PCM from a Windows recording device to a Linux machine over a TCP/IP socket. ### Windows side Compile `Streamer` using Visual C++ and install as a service by doing ``` sc create "Network Sound Streamer" binpath= "\Streamer.exe /D /H /P " start= auto ``` or run in command-line window by doing ``` Streamer.exe /N /D /H /P ``` In order to stream all sound being played, the device to listen to should ideally be "Stereo Mix". However, since it is not always available on newer versions of Windows, it may be necessary to install [Virtual Audio Cable](http://software.muzychenko.net/eng/vac.htm) or similar. ### Linux side Simply run `netcat` and pipe into `aplay`: ``` while true; do netcat -l -p 1234 | aplay -f S16_LE -r 44100 -c 2 --disable-resample --disable-format --disable-channels --nonblock --buffer-time=2000; done ``` The program `tcpfwd` in the `tcpfwd` directory adds a timeout functionality, since `netcat` does not always seem to notice when the socket is closed. Running `tcpfwd` with a five-second timeout would look like this: ``` while true; do tcpfwd 1234 5 | aplay -f S16_LE -r 44100 -c 2 --disable-resample --disable-format --disable-channels --nonblock --buffer-time=2000; done ``` The while loop can be used to add commands to kill processes holding up the audio device, if that is an issue.