Playing synchronized content
info-beamer hosted offers some packages that have the ability to play content synchronized across multiple devices. Synchronization isn't easy, so here are a few hints that help you set up such an installation.
There are two major modes of synced playback: time based synchronization and networked synchronization.
Time based synchronization
Most of the packages that allow synced playback base their synchronization on a precise local clock on each device. Multiple devices with a playlist of the exact same duration can independantly calculate when the next content should start and then switch to it at the same time.
Note that it is not necessary for multiple devices to run the same setup. Often they can also run different setups. As long as you use the same package and each playlist has the exact same duration across all devices, playlists will start at the same moment across all devices.
The advantage of time based synchronization is that devices don't have to communicate with each other at all. They might even be at completely different locations. This can simplify setting up such an installation.
The downside is that more complex scheduling isn't possible as it's not really viable to derive the same playback cycle across multiple devices while honoring scheduling rules without communication across devices.
Ensure a precise time source
Synchronization requires that each device's local system time is as close to the true time as possible. Devices use NTP to fetch their system time over the network. Basically this works by having the device contact an NTP server, waiting and measuring the response time and deriving the true time from that. The closer the NTP server to the device the better as network latency jitter can prevent the system from calculating a precise system time.
If possible use a local NTP server. Some routers provide local NTP services to the network. In a properly configured network, such NTP servers are provided to your device via DHCP. You can also manually specify an NTP server using the device's configuration editor on its detail page.
Additionally use Ethernet instead of WiFi if possible. Ethernet is far more consistent when it comes to network latency. As a result the synchronized time is often more precise.
While info-beamer supports using a selection of Real-time clocks (RTCs), they do not offer the precision necessary for synchronized playback. You'll always need an NTP server to get a proper system time.
Network based synchronization
For some new packages we plan to use network based synchronization. This is reliant on Peer-to-Peer support (see below) as devices communicate with each other.
When installing the same setup on multiple devices within the same network, one of those devices will be automatically chosen as the leader device while all other devices will be followers. It's then up to the leader device to control all other devices. In case the leader devices is shut down, a new leader device is automatically selected after a few seconds.
This enables synchronized playback for more complicated and dynamic content (like text scrollers, twitter feeds) or conditional content like scheduled or triggered content. Additionally synchronization isn't reliant on a correct system time and can even work in complete offline environments.
Make sure local devices can reach each other
For network based synchronization to work, devices need to communicate with each other. If you have a locked down Ethernet environment or use a WiFi network with client isolation enabled, this might not be possible. In that case synchronization isn't possible. You can verify that devices reach each other by checking the number of peers listed in the Peer-to-Peer information section on each device's detail page. The number should match the number of local devices.
The following hints are valid regardless of which type of synchronization you intend to use.
Enable P2P on all devices
The Peer-to-Peer feature allows devices within the same network to communicate with each other. Although that's not strictly necessary for time based synchronization it still allows devices to see each other. You can get a measurement on how close the clocks across all devices are by inspecting the precision value within the Peer-to-Peer section on each device's detail page. The closer to zero this value is the better your synchronization.
As mentioned previously, latency for communication across Ethernet is far more consistent than communication across WiFi. The result is usually better synchronization.
If possible avoid the Pi4
This might sound odd, but at least for now and to our knowledge the Pi4 has one big disadvantage when it comes to synchronized playback:
The Pi4, unlike older models doesn't have the ability to precisely control when the next HDMI frame is sent to your display. Even if multiple Pi4 devices are otherwise perfectly synchronized, they might still be off by at most 16.66ms (which is one second divided by the usual framerate of 60hz). The same is true when using both HDMI output ports on a single Pi4: Each output is independant and there is no guarantee that they are in perfect sync. The result is that even on a single Pi, two attached displays might be slightly desynced.
Enable Global VSYNC
Unlike the Pi4 the Pi3 and earlier models have the ability to make minor adjustments to the HDMI clock. info-beamer can make use of this feature and will make minor adjustment to the HDMI clock across multiple devices until clocks on multiple devices are in sync. You have to enable this feature manually as it might interfer with the output quality of some displays: Open the device's configuration editor on its detail page, click on the Advanced/Development tab and enable Enable global VSYNC. While this almost never happens with modern display, once this feature is enabled, inspect the display output to ensure they do not flicker.
Fast moving content
Of course that's not always under your control, but if you have any influence on what content you play, consider using content that doesn't use rapid movement like fast camera pans. Slightly desynced installations are more noticeable when playing fast moving content.