Ever wanted to synchronize audio playback over multiple devices? I have. VLC is the key player in this use case:
- I have a laptop/pc in my bedroom and a server/media centre in the living area.
- I have shared central storage, so both computers can access the media.
- I also have RDP, VNC and PowerShell remoting enabled so that I can remotely control one from the other.
- VLC is installed on both.
Edit: My little cousin didn’t get it at a glance, and he’s tech savvy – so maybe this will help explain why/how it’s used:
[4:40:36 PM] Kyle nolastname: pretty neat but, what for?
[4:47:18 PM] William (Rex) Hardin: Well, right now for instance
[4:47:30 PM] William (Rex) Hardin: I’m playing an audio stream on both my speaker setup in my bedroom
[4:47:36 PM] William (Rex) Hardin: and my speaker setup in the living room
[4:47:43 PM] William (Rex) Hardin: and they’re both in sync
[4:47:53 PM] William (Rex) Hardin: I can walk between the rooms, and not notice and difference
Here’s how we’ll utilize VLC’s multicast streaming services to synchronize audio playback on multiple networked devices.
Configure the Media Server
Step 1: Start a Stream
Start a Stream
Add a file to stream. I’d suggest using an hour-long audio mix, the stream breaks when playlist items change. Click “Stream”.
Just click next. You don’t need to change anything here. Click next.
Make sure “display locally” is unchecked. Select RTP /MPEG Transport Stream from the dropdown list, and click Add.
In the address field, enter a multicast address. If in doubt, just use 18.104.22.168. Keep the default port. Don’t bother with naming the stream. Click next.
Uncheck “Activate Transcoding”, click next.
Check stream all elementary streams, click Stream.
Hurrah, it’s streaming! You should see VLC playing your audio file, but you shouldn’t hear anything – recall that we intentionally unselected “display locally”.
Step 2: Open the Stream
Open a SECOND instance of VLC. We’ll use this instance to listen to the stream via multicast, thus audio playback won’t be ahead of any other clients assuming similar network distance.
Open a Network Stream (Ctrl+N)
Enter rtp://22.214.171.124:5004 as the network URL & click Play.
With any luck, your stream should open and you should be able to hear your streaming music!
In my case, I RDP to my other clients in the house/apartment and repeat “Step 2: Open the Stream”. This should go without saying, but you only need one instance of VLC on your additional computers where you want to listen to the stream.
Before we get into opening the streams, you should make sure RDP is configured to play audio locally on the remote device. This is a pain in the ass to configure for Linux, I’m pretty sure I had to use xfreerdp with some launch options to ensure audio playback remained on the remote device.
Repeat “Step 2: Open the Stream” to open the stream on your other computers!
Bonus: VLC on Android
Install and Open VLC for Android – click Stream in the context menu.
Enter the same multicast address as used in the previous example, 126.96.36.199 and hit enter/return to start listening to the stream. Audio playback for me was a bit choppy. How was your experience?
4,230 total views, 3 views today