February 26, 2020

Synchronized playback on multiple devices with SLDP

Playing a live stream simultaneously on multiple devices often requires synchronized playback.

The cases look simple:
  • One big screen shows something and viewers need to have the same audio on their individual devices.
  • A second screen application need to be in sync with ongoing live stream on TV.
  • Multiple screens in the same room show the same content with single source of sound.
  • A number of surveillance cameras need to be shown on the same page.
You probably know other cases where you might have the same requirement.

With traditional delivery protocols like HLS ad MPEG-DASH it's very hard to achieve without dramatically increasing the latency.

SLDP live streaming protocol allows delivering streams real time with low latency, adaptive bitrate and small zapping time. Now it also allows synchronizing the playback among devices and browsers for all the cases which you can see above. It's supported on both server side and client side.

Web demo. You can see how this feature works on demo web page with two HTML5 SLDP players.

Mobile and web demo. Take a look at feature demonstration below with HTML5 browser, Android and iOS.

BTW, check our YouTube channel for other videos.

Now let's see how you can start using this feature.

Notice that all implementations use additional buffer to make proper synchronization which will increase latency. This buffer must be the same across all platforms. Check each player platform for parameter setup.

Enable feature in Nimble Streamer

We assume you are already familiar with Nimble Streamer setup and you have a working SLDP live stream. If not, please read SLDP setup and usage article to make it work.

On your server, edit nimble.conf to add this parameter and re-start Nimble Streamer:
sldp_add_steady_timestamps = true

You can visit Nimble Streamer parameters reference to learn more about operating that config file.

Once you re-start the server, every SLDP live stream will have a steady clock timestamps needed for playback adjustments. If the connected player doesn't request the steady clock time, Nimble Streamer will not have it in the output stream to avoid any overhead.

Playback in HTML5 SLDP player

If you want to have a synchronized playback in web browsers, use our freeware HTML5 SLDP player.

By default, the feature is turned off. To enable it, add sync_buffer buffer parameter which specifies the buffer size in milliseconds. Recommended values are from 1000 to 5000 and it needs to be the same in all players.

Playback on iOS

Larix Player for iOS allows enabling and using synchronized playback.
  1. Install Larix Player via AppStore.
  2. In connection setting, enable Synchronized playback flag as shown on the screenshot below.
  3. Use Buffering field to define the buffer for this feature. As mentioned above, it needs to be the same in all players.

Now save setting and start playback.

Playback on Android

Android Larix Player also allows enabling and using synchronized playback.

  1. Install Larix Player from Google Play.
  2. In connection setting, enable Synchronized playback flag.
  3. Use Buffering field to define the buffer for this feature, it needs to be the same in all players.

Now save connection and start playing the stream.

You may also use this kind of custom URL
to set "Synchronized playback" value to "On" and "Buffering" value to "2000". This will allow passing URL among viewers with no need for additional instructions.

Once you start playback on multiple devices and browsers with that feature enabled, your playback on all devices will catch up.

Let us know how it works for you and what improvements you'd like to have for it.

Related documentation

SLDP technology overview, SLDP support in Nimble Streamer, Softvelum playback solutions,