Streaming audio from a Mac to another computer using VLC

VLC is a very popular program for playing pretty much any type of media under the sun. However, it has a lot of advanced functionality that many people may not know about. One of these is that VLC can send audio as a stream.

My particular case is that I have a wireless headphone set plugged in to my desktop computer in my living room. However, sometimes I would like to play some audio from my Mac laptop (which could be anywhere in my apartment).

I was already familiar with Icecast, a free audio streaming server, so I gave that a try first, but it was not a great experience with a delay of a few to several seconds. Instead, I found that VLC could get me down to just under 1 second of latency, which still isn’t great but is workable; at least the server setup wouldn’t be required simplifying things a bit.

Installing Soundflower

I needed some way to redirect the Mac’s audio output to its input so that VLC could capture it. The only free program I’ve found to do this on a Mac is Soundflower. It seems to be “barely” maintained these days, but its functionality still works on macOS Catalina.

Soundflower installs a virtual audio device that you can find in the Output and Input section of the Sound System Preferences:

By selecting Soundflower in the Output section, all the sound that would normally come out of the speakers/headphones/etc. would go into Soundflower instead.

Adding a multi-output device

This step is only necessary if you want to hear the audio output from your speakers/headphones/etc. in addition to streaming it to another computer. If not, you can skip this section.

In Spotlight, open “Audio Midi Setup”.

At the bottom left, create a new Multi-Output Device.

And for the new multi-output device, select the devices you want audio to play through to.

And finally back in Sound System Preferences, set the output device to Multi-Output Device.

Note that while the Multi-Output Device is selected, the speaker volume controls won’t work as usual. The simplest workaround I’ve found is to switch back to the speaker device (recommended to turn on “Show volume in menu bar” enabled so you can switch from the menu bar), change the volume, then switch back to the Multi-Output Device.

Receiving the stream

It’s probably easier to set up the receiving end first. This can be done on any computer that can run VLC, not necessarily a Mac as depicted below.

If you want, in VLC’s preferences, find the network latency settings and change them to “Lowest Latency”.

On your destination computer’s VLC, go to File -> Open Network. In the URL, type: udp://@:8123. This basically tells VLC to listen on port 8123 for the media stream. If 8123 happens to be used by another program on your computer, you can change it to any other unused port number (generally between 1000-65000 will work).

When you click “Open”, VLC will start listening on that port. Nothing will happen because we need to set up sending the stream.

Sending the stream

First you’re going to need to find the IP address of the other computer. I’m going to assume you’re only going to do this within a local area network (LAN) and that there are no additional firewall or other considerations.

In VLC, go to File -> Open Capture Device.

Select Audio, and the Soundflower device. Also select Stream output and click Settings on the right. Set up the options as below, replacing “10.0.0.102” with the IP address of your destination computer, and “8123” with the port you specified on the destination computer, if different.

When you click OK, then Open, VLC will return back to the Playlist pane. There isn’t any visual indication that things are working, but they should be. You should be hearing audio from the destination.

Unfortunately if things aren’t working at this point, it’s not the easiest thing to pinpoint what the issue is. Check that the IP addresses and ports are correct, and that the computer or network’s firewalls aren’t blocking sending/receiving of the stream.

Conclusion

VLC is a powerful media tool that besides playing back media, can stream media from one computer to another.

Using mostly default settings, the latency of the VLC stream is about 1 second. This is fine when listening to music or podcasts, but doesn’t really work when watching a movie, or playing a game, which require video and audio sync. If anyone knows any settings or tools to lower the latency of a 1:1 stream for a use case like this, please do let me know in the comments!

Related

4 thoughts on “Streaming audio from a Mac to another computer using VLC

  1. Sorry I haven’t read the whole article but I found a simpler solution that works for me, but it does require an Android phone. Note, the latest version of OSX (Monterey) will let you stream audio between Macs, but this is no help if one of your Macs is ancient like mine! So,

    Enable Remote Login on the remote Mac under System Preferences-Sharing.
    Download the AirPin(LITE) app from Google Play to the phone.
    Start the app. Your phone will now appear as an Airplay device ATV_14.
    Connect the local Mac to the remote Mac via Finder/Network/(remote mac)/Share screen.
    Select the ATV-14 audio device on the remote Mac & listen to the sound on headphones connected to your phone.
    There is about 1/2 second lag so not good for watching films etc. It’s great for me though because I can lay in bed late at night & use my 2013 Macbook Air to run Logic Pro (Music recording app) to do some mixing etc. on my 2021 Mac Mini M1 in the next room 🙂

  2. This still works in 2023, but by using Blackhole instead of Soundflower. One problem though, seems like I need to create a new capture device every time I restart VLC on the streaming machine. I tried to save the playlist file, but reopening that file in VLC doesn’t work. Any suggestions?

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.