User avatar
OMID-313
Posts: 141
Joined: Tue Jan 20, 2015 4:45 pm

How to synchronize multiple video displays?

Thu Jun 18, 2015 9:38 am

Hi all,

I have 4 HDMI TVs, and I want to play 4 different videos (or even 4 different x-y segments of a single video) on these 4 TVs, in synchronous with each other.

I searched a lot on the net, and found the following as possible solutions:

1. PiWall (http://www.piwall.co.uk/)
2. omxplayer-sync (https://github.com/turingmachine/omxplayer-sync)
3. omxplayer-sync-2 (https://github.com/pukster/omxplayer-sync-2)
4. RTSP + omxplayer (https://www.google.com/?gws_rd=ssl#q=omxplayer+rtsp)

Has anyone tried these solutions before?
Which one is more reliable, has the least delay between videos, with maximum synchrony?
Is there any other solution besides these ones?

beta-tester
Posts: 1236
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: How to synchronize multiple video displays?

Thu Jun 18, 2015 11:20 am

how can we make a decision for you?
you already found good examples...
try it out yourself, and see, what serves your needs best.
{ I only give negative feedback }
RPi Model B (rev1, 256MB) & B (rev2, 512MB) & B+, RPi2B, RPi3B, RPi3B+, RPiZeroW, ...

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: Korea

Re: How to synchronize multiple video displays?

Thu Jun 18, 2015 12:32 pm

Indeed. This precise thing has been discussed before on this forum. I am sure a satisfactory conclusion was reached.

User avatar
OMID-313
Posts: 141
Joined: Tue Jan 20, 2015 4:45 pm

Re: How to synchronize multiple video displays?

Thu Jun 18, 2015 3:56 pm

Thank you very much @beta-tester and @ame for your replies.

You're right. This has already been discussed in the forums.
But unfortunately, I couldn't find a suitable and reliable conclusion at these discussions.
Most of the people trying these solutions report serious problems and lags in synchronizing the videos.

So I was wondering if you could suggest me possible solutions to solve this issue.

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: How to synchronize multiple video displays?

Thu Jun 18, 2015 4:03 pm

If it were me, and I'm the first to admit I'm a heretic, I'd look to something with a bit more grunt than a Pi.

The pi is a cheap computer, it has limitations.

I just committed myself to a new car, its the cheapest new car available in the UK (google it, I'm not going ot put its name up here) , am I going to pretend it will outrun a Ferrari ? (or even have the creature comforts that most people expect in a new car ?) no, I'm not, Its a cheap car and there are compromises to me made for the cost. Ditto the Raspberry Pi
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

User avatar
OMID-313
Posts: 141
Joined: Tue Jan 20, 2015 4:45 pm

Re: How to synchronize multiple video displays?

Thu Jun 18, 2015 4:36 pm

pluggy wrote:If it were me, and I'm the first to admit I'm a heretic, I'd look to something with a bit more grunt than a Pi.

The pi is a cheap computer, it has limitations.

I just committed myself to a new car, its the cheapest new car available in the UK (google it, I'm not going ot put its name up here) , am I going to pretend it will outrun a Ferrari ? (or even have the creature comforts that most people expect in a new car ?) no, I'm not, Its a cheap car and there are compromises to me made for the cost. Ditto the Raspberry Pi
Thanks @pluggy for your reply.

What actually do you suggest instead of RPi !?

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: How to synchronize multiple video displays?

Thu Jun 18, 2015 5:13 pm

X86 PC (i5 or better would be nice) with multiple video cards. Ubuntu as a preference for an OS but that Redmond OS would suffice. Significantly more expensive than a Pi.....

If you want to show exactly the same on 4 displays anything with a video splitter would work, it wouldn't do the XY segment thing or different videos.
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

User avatar
OMID-313
Posts: 141
Joined: Tue Jan 20, 2015 4:45 pm

Re: How to synchronize multiple video displays?

Thu Jun 18, 2015 5:57 pm

pluggy wrote:X86 PC (i5 or better would be nice) with multiple video cards. Ubuntu as a preference for an OS but that Redmond OS would suffice. Significantly more expensive than a Pi.....

If you want to show exactly the same on 4 displays anything with a video splitter would work, it wouldn't do the XY segment thing or different videos.
Thanks again @pluggy for your reply.

Well, using a powerful PC (with multiple video cards) is a nice option; however, due to several reasons (portability, price, power consumption, ...) I'd prefer to use an embedded micro-computer. Do you suggest anything in this category (other than RPi) !?

Actually, the video contents are not the same. So I need something that either displays 4 different videos on 4 displays, or something that cuts a single video into 4 pieces and sends these segment to 4 displays. (something like a video wall controller)

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: How to synchronize multiple video displays?

Thu Jun 18, 2015 6:27 pm

Playing 4 entirely seperate video streams at a convincing resolution and framerate is outside the capablilites of an embedded system IMO. Playing a single video stream that is chopped up by seperate hardware and displayed on 4 displays would probably work but thats outside what I know.

In my world, if you want something that looks, sounds and goes like a supercar you spend a lot of money and buy a supercar, you don't buy a cheap city car and bolt bits onto it.

But I'm a heretic. ;)
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

User avatar
OMID-313
Posts: 141
Joined: Tue Jan 20, 2015 4:45 pm

Re: How to synchronize multiple video displays?

Thu Jun 18, 2015 6:53 pm

[EDIT]

I think I have to clarify some points:

I'm going to use 5 RPi boards: one as master, and 4 as slave.
So the slave boards play 4 videos (or 4 segments/chops of a single video) and are connected via HDMI cables to different TVs.
The master board controls the slaves, so that they play videos in sync. with each other. (There's possibly a network switch, to which all the boards are connected, and with which the master controls the slaves.)

So my question is NOT the quality of videos, nor resolution, nor ...
My problem is just one thing:

How can I control these 4 slave RPi boards, so that they play videos in sync !?

User avatar
expandables
Posts: 654
Joined: Fri Jun 27, 2014 7:34 pm
Location: Neverland with Michael Jackson

Re: How to synchronize multiple video displays?

Thu Jun 18, 2015 9:11 pm

This is the best i can do why not put all 4 videos on the 4 raspberry pi's then create a cron job that tells omxplayer to play each video at a specific time?
You don't even need that extra one this method will guarantee to work
By thinking like an engineer you can create a raspberry pi.
Michael Jackson enthusiast.
I got the PI model B, B+ and PI 2 model B.
When will I get the A? I don't know.

myoung008
Posts: 55
Joined: Mon Mar 18, 2013 9:56 pm

Re: How to synchronize multiple video displays?

Thu Jun 18, 2015 9:33 pm

You could try Falcon Pi Player. It's designed to run Christmas light shows, but also supports video and multiple Pi's in sync.

http://falconchristmas.com/forum/index. ... d,8.0.html

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: Korea

Re: How to synchronize multiple video displays?

Fri Jun 19, 2015 2:34 am

OMID-313 wrote:[EDIT]

I think I have to clarify some points:

I'm going to use 5 RPi boards: one as master, and 4 as slave.
So the slave boards play 4 videos (or 4 segments/chops of a single video) and are connected via HDMI cables to different TVs.
The master board controls the slaves, so that they play videos in sync. with each other. (There's possibly a network switch, to which all the boards are connected, and with which the master controls the slaves.)

So my question is NOT the quality of videos, nor resolution, nor ...
My problem is just one thing:

How can I control these 4 slave RPi boards, so that they play videos in sync !?
Here is the thread I was thinking of.

viewtopic.php?f=91&t=83499&p=591779

PiWall seems to be the answer. Or sending commands from the master to the slaves via ssh.

You identified 4 options at the beginning. Have you tried any of them?

User avatar
rpdom
Posts: 14974
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: How to synchronize multiple video displays?

Fri Jun 19, 2015 5:22 am

expandables wrote:This is the best i can do why not put all 4 videos on the 4 raspberry pi's then create a cron job that tells omxplayer to play each video at a specific time?
You don't even need that extra one this method will guarantee to work
cron is not very accurate. It has a granularity of 1 minute, and tries to start everything that might be scheduled to run at that particular minute as soon as it can. It's not guaranteed to run exactly on the minute at all.

I'd possibly have something on each Pi that waits, with the video cued and ready to play, listening for a command on a socket. Then one Pi broadcasts that command and they all start playing at very close to the same time. The advantage of the broadcast is that it doesn't matter home many Pis you have waiting, they will all get triggered at once.

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: Korea

Re: How to synchronize multiple video displays?

Fri Jun 19, 2015 5:24 am

rpdom wrote:
expandables wrote:This is the best i can do why not put all 4 videos on the 4 raspberry pi's then create a cron job that tells omxplayer to play each video at a specific time?
You don't even need that extra one this method will guarantee to work
cron is not very accurate. It has a granularity of 1 minute, and tries to start everything that might be scheduled to run at that particular minute as soon as it can. It's not guaranteed to run exactly on the minute at all.

I'd possibly have something on each Pi that waits, with the video cued and ready to play, listening for a command on a socket. Then one Pi broadcasts that command and they all start playing at very close to the same time. The advantage of the broadcast is that it doesn't matter home many Pis you have waiting, they will all get triggered at once.
You could use cron to trigger a single script. The script itself would trigger the others.

User avatar
OMID-313
Posts: 141
Joined: Tue Jan 20, 2015 4:45 pm

Re: How to synchronize multiple video displays?

Fri Jun 19, 2015 11:10 am

Thank you very much @ame , @rpdom , @myoung008 , and @expandables for your great help and nice suggestions.

Unfortunately, I don't have access to an RPi board currently, to test all these suggestions. So right now I'm just investigating and analyzing the possible solutions to find the best ones, so that I can test them as soon as I get my RPi board.

It seems that PiWall is a stable solution. But the problem with PiWall is that (1) it cuts and chops a single video into 4 pieces, and plays each segment with a slave RPi. I think this would result in bad quality in video's resolution; because it stretches a part of the video to fill the tile's screen. Besides, (2) The PiWall uses the ethernet switch to transfer videos from master to slaves. I'm not sure, but I think the transfer rate of the video playback would be limited to the 10/100 mbps speed of the ethernet switches, causing some lags and delays, specially in high-resolution and Full-HD videos.

Actually, in addition to synchronize the video playback in the slave RPis, I would like the master board to send some other optional commands, like play, pause, next, previous, halt, ... to the slaves. So I think command-based methods would be better solutions.

For example, at start up, the 4 slave boards boot into an interrupt-based ready-to-receive-commands state, and the master board boots into a sending-commands-on-demand state. The boards could be connected via GPIOs or even ethernet switch, and the commands could be sent/received via GPIO read/write or SSH/UDP/RTSP.

How does this scenario looks like!!? Is that reliable?
I just don't know how to implement such methods. :D
Would you please help on this?

benjab
Posts: 2
Joined: Sat Jun 06, 2015 1:18 pm

Re: How to synchronize multiple video displays?

Fri Jun 19, 2015 10:50 pm

At the moment I am looking for a very similar solution: Instead of 4 screens in sync I need just 2, but about 20 pairs. Financially the Raspberry Pi would be the preferred solution. However, they have to run reliably, i.e. in a loop for 9 hours a day.

1. PiWall: I tested this setup with 1 master and 2 slave raspis (model B); the master streaming a video file (mkv/h264, 12mbit/s, 1920x540, 25fps) to the slaves in seamless loop. The slaves showed one half of the picture each, i.e. 960x540. I had it running over night (9 hours) without a problem. So PiWall seems to be pretty stable.... (with a video data rate of 18 Mbit/s the system had some problems)

2. With turingmachine's omxplayer-sync I had some trouble in setting it up, but fortunately found a very helpful guide:
https://www.uni-weimar.de/medien/wiki/A ... aspberryPi
Now this is running here, too. At the moment I am testing this set up with one master and one slave. My videofiles for testing (h264/mp4, 1280x720, 25fps) are running stable, too. I haven't tested different data rates yet. The loop is not seamless, the slave needs about 4sec to catch up when the master starts from the beginning.....

3. pukster's omxplayer-sync-2 I was not able to set up, as my programming knowledge is not sufficient to understand the readme......

4. Another, convincing solution for a video triptych (3 different videos in sync) seems to be the following:
http://www.relentlessplay.com/video-tryptic/
It's working with Python scipts and the OSC software, using an usb-connection between master and slaves.... I have not tested this.

Hope this helped a little bit. I would be interested in your findings, too.

Good luck

User avatar
OMID-313
Posts: 141
Joined: Tue Jan 20, 2015 4:45 pm

Re: How to synchronize multiple video displays?

Sat Jun 20, 2015 7:03 am

benjab wrote:At the moment I am looking for a very similar solution: Instead of 4 screens in sync I need just 2, but about 20 pairs. Financially the Raspberry Pi would be the preferred solution. However, they have to run reliably, i.e. in a loop for 9 hours a day.

1. PiWall: I tested this setup with 1 master and 2 slave raspis (model B); the master streaming a video file (mkv/h264, 12mbit/s, 1920x540, 25fps) to the slaves in seamless loop. The slaves showed one half of the picture each, i.e. 960x540. I had it running over night (9 hours) without a problem. So PiWall seems to be pretty stable.... (with a video data rate of 18 Mbit/s the system had some problems)

2. With turingmachine's omxplayer-sync I had some trouble in setting it up, but fortunately found a very helpful guide:
https://www.uni-weimar.de/medien/wiki/A ... aspberryPi
Now this is running here, too. At the moment I am testing this set up with one master and one slave. My videofiles for testing (h264/mp4, 1280x720, 25fps) are running stable, too. I haven't tested different data rates yet. The loop is not seamless, the slave needs about 4sec to catch up when the master starts from the beginning.....

3. pukster's omxplayer-sync-2 I was not able to set up, as my programming knowledge is not sufficient to understand the readme......

4. Another, convincing solution for a video triptych (3 different videos in sync) seems to be the following:
http://www.relentlessplay.com/video-tryptic/
It's working with Python scipts and the OSC software, using an usb-connection between master and slaves.... I have not tested this.

Hope this helped a little bit. I would be interested in your findings, too.

Good luck
Thanks a lot @benjab for your detailed reply. I do really appreciate it.

Unfortunately, I don't have access to an RPi currently to test these methods at the moment. But I'll try them this week.

A few questions regarding your notes:

1. The PiWall method chops a single video into several displays/tiles. As I want to use 4 Full-HD TVs (1920x1080), then I have to set the main single video to be 3840x2160 (or say UHD / 4K !!). I don't know if RPi's GPU and omxplayer can handle such resolution or not. What do you think!?

2. Which method do you use to play videos in loop with PiWall !?

3. Is it possible to use the UDP method of the pwomxplayer, with omxplayer itself, so as to tell the slaves to play individual video files via omxplayer UDP, without chopping videos!?

Thanks again for your time and support.

benjab
Posts: 2
Joined: Sat Jun 06, 2015 1:18 pm

Re: How to synchronize multiple video displays?

Sat Jun 20, 2015 8:58 am

1. Maximum output resolution for a rpi is full HD, 1920x1080. Instead of a rpi as master you could use a Linux computer that is able to play back UHD or 4k, but I dont know about pwomxplayer limits. Probably HD, too. Data rate is probably an issue anyway....

2. Pwomxplayer allows you to run video in loop.

3. As far as I know that is not possible. The piwall concept is to multicast/stream one file to a network address from the master, while the slaves playback (open instead of a file) this same network address. There is no real syncing between rpis going one.....

I hope my answer is clear. I am a bit in a rush and my English is a bit poor.

User avatar
OMID-313
Posts: 141
Joined: Tue Jan 20, 2015 4:45 pm

Re: How to synchronize multiple video displays?

Sat Jun 20, 2015 9:58 am

benjab wrote:1. Maximum output resolution for a rpi is full HD, 1920x1080. Instead of a rpi as master you could use a Linux computer that is able to play back UHD or 4k, but I dont know about pwomxplayer limits. Probably HD, too. Data rate is probably an issue anyway....

2. Pwomxplayer allows you to run video in loop.

3. As far as I know that is not possible. The piwall concept is to multicast/stream one file to a network address from the master, while the slaves playback (open instead of a file) this same network address. There is no real syncing between rpis going one.....

I hope my answer is clear. I am a bit in a rush and my English is a bit poor.
Thanks again @benjab for your helpful reply.

I will try these suggestions as soon as I get my RPi, and will post the results here.

ktrofimov
Posts: 8
Joined: Wed Sep 16, 2015 4:40 pm

Re: How to synchronize multiple video displays?

Wed Sep 16, 2015 7:58 pm

I have gone through this question once again.
Finally I had to do it by myself. Task I had included a smooth crossfade between videos as well as DMX record/playback
Original code was taken from omxplayer+sync2. Sync part was rewriten almost completely.

Now this player is able to:
- sync master with reasonably unlimited slaves over the Ethernet TCP
- record DMX syncing with external SMPTE audio (needed for DMX lighting console) or internal clock
- play first video in loop with a crossfade on video/audio/DMX
- using external buttons switch to one of the 4 video with different languages
- start master with selected language and syncro-start all slaves (crossfading as well)
- at a predefined time of playback push next master with it's slaves
- by the end of "linear" video return to the loop video

This project is now in use by the "Legends of Tallin" interactive show ( http://tallinnlegends.com/eng/ )

gkreidl
Posts: 6039
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: How to synchronize multiple video displays?

Wed Sep 16, 2015 9:05 pm

And where's the code?
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

ktrofimov
Posts: 8
Joined: Wed Sep 16, 2015 4:40 pm

Re: How to synchronize multiple video displays?

Wed Sep 16, 2015 9:52 pm

Most code changes are written for support of the additional baseboard (DMX and SMPTE hardware) and can't function without it. What part are you interested in?

gkreidl
Posts: 6039
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: How to synchronize multiple video displays?

Wed Sep 16, 2015 10:10 pm

ktrofimov wrote:Most code changes are written for support of the additional baseboard (DMX and SMPTE hardware) and can't function without it. What part are you interested in?
I think that according to the GPL 2 licence you have to publish the modified source code of omxplayer, perhaps even of the whole project if omxplayer is a part of it.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

ktrofimov
Posts: 8
Joined: Wed Sep 16, 2015 4:40 pm

Re: How to synchronize multiple video displays?

Wed Sep 16, 2015 10:26 pm

I think you are right. I also think github is the right place because it omxplayer is originally from it. But hardware dependency of this fork has to be noted.

Return to “General discussion”