How to Transfer Audio Output from Mac OS X to Ubuntu via a Network?

I was working on a good solution to this earlier this year, but haven't gotten the best way.

The first piece you will likely need is Soundflower. This will let you take the digital-out of your Mac, and loop it to a new digital-in source.

The piece I'm missing is the best way to broadcast a digital input to another machine.

It is probably possible to do this via ESounD, Pulse, or Jack, but I am not familiar with implementations of those, and this hasn't been my highest priority.

Another route I was considering was using VLC, to somehow source the Soundflower as though it were line-in or mic input, and publish an audio stream, then connect to this stream from Ubuntu, i.e. at http://192.168.0.2:8000.

However you arrive at it, I hope that this answer has helped you fit one piece of this puzzle.


If you're looking for a nicely packaged solution then I you want Rogue Amoeba's Airfoil software for doing this sort of thing. I use it from Mac to Mac (it uses Soundflower under the covers, for part of the trickery, but also their own "Instant Hijack" to grab audio from already-running applications) and it works very well.

There are Airfoil Speakers-only applications available for free for Mac, Windows, Linux and iPhone, plus it can send audio to an Airport Express.


Update for searchers:

Look at shairport-sync, you can run this on Linux/Ubuntu to setup an Airplay server that is happily recognized by OSX, and you can configure a number of backends to deal with the audio it receives, such as sending it to the speakers on the Linux/Ubuntu end.