Skip to content
A set of lightweight scripts to stream audio between two Linux machines. Perfect for use with a Raspberry Pi
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information. Update docs Apr 22, 2019

Stream audio via UNIX pipes

This simple set of scripts allows streaming audio between two Linux machines, for example, a laptop and a Raspberry Pi. No audio backends such as Pulseaudio or JACK are required, the list of dependencies is very small.

Requirements (server)

  • ncat (from nmap)
  • ffplay

Requirements (client)

  • netcat (any)



Get the script

SSH into your server, and download the scripts via git:

git clone

Install dependancies

If you're using a Raspberry Pi:

sudo apt-get install ffplay nmap

Configure (optional)

With the text editor of you choice, edit line 2 of and change the CONTROLLER_PORT variable to whatever port you want, for example run:


Change the port number, and save.

Run the server

To start the server, run the following command: ./ &

You can now disconnect from the Raspberry Pi, but before you do, make sure to take note of your servers IP address, buy running the following:

sudo ifconfig

Generally your ip address will be in the format of


Get the script

git clone


Using the text editor of your choice, edit line 2 and 3 of to match the port and IP of your server.

Play some music

cat music.mp3 | ./ &

Where music.mp3 is the song you'd like to play.

Play and pause

To pause from your client:


Or to stop the stream:



  • You can easily bind the toggle and stop commands using xbindkeys for a more seamless experience
  • It is possible to stream any audio format supported by FFmpeg
  • If you are using netcat-traditional or netcat-openbsd on your server you may run into some issues, it is recommended to use ncat from the nmap package
You can’t perform that action at this time.