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

Re: Raspberry Pi and 4k @ 15Hz

Mon Jun 22, 2015 7:48 am

Can we use 5 RPi 2 boards (1 master, and 4 slaves) to play 3840x2160 videos, using omxplayer and its -win option !?

I mean something like this:

The master RPi sends commands to the slaves.
The slaves start to play 1920x1080 videos at exactly the same time, and output the video to 4 Full HD TVs.

How can we implement this?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5162
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Raspberry Pi and 4k @ 15Hz

Mon Jun 22, 2015 2:21 pm

Not if the video is encoded at 4K - the video decoder in the Pi only supports 1080p.
If you encoded four different 1080p videos (one for each quarter of the original 4K video), then you could play the 4 1080p videos and effectively have 4K video split across the 4 monitors.

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

Re: Raspberry Pi and 4k @ 15Hz

Mon Jun 22, 2015 5:51 pm

dom wrote:Not if the video is encoded at 4K - the video decoder in the Pi only supports 1080p.
If you encoded four different 1080p videos (one for each quarter of the original 4K video), then you could play the 4 1080p videos and effectively have 4K video split across the 4 monitors.
Thanks @dom for your reply.

I meant exactly this. Playing 4 different 1920x1080 videos using 4 RPi boards and 4 TVs/monitors.

Now the problem is that how can we perfectly sync these 4 videos?
Would you please provide a sample code for syncing 4 videos on 4 RPis?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 20752
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspberry Pi and 4k @ 15Hz

Mon Jun 22, 2015 6:13 pm

OMID-313 wrote:
dom wrote:Not if the video is encoded at 4K - the video decoder in the Pi only supports 1080p.
If you encoded four different 1080p videos (one for each quarter of the original 4K video), then you could play the 4 1080p videos and effectively have 4K video split across the 4 monitors.
Thanks @dom for your reply.

I meant exactly this. Playing 4 different 1920x1080 videos using 4 RPi boards and 4 TVs/monitors.

Now the problem is that how can we perfectly sync these 4 videos?
Would you please provide a sample code for syncing 4 videos on 4 RPis?
I doubt DOm has time for that - you will have to sort out something yourself, or find someone who has done it. My suggestion woudl be either using GPIO to wait for a start signal, or perhaps do something over ethernet, although that might introduce some latency. Keeping them in sync is another issue, as they may drift relative to each other.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

Demodude123
Posts: 16
Joined: Wed Jun 11, 2014 5:57 pm

Re: Raspberry Pi and 4k @ 15Hz

Mon Jun 22, 2015 6:37 pm

I remember seeing this done a long time ago in the Raspberry Pi blog. I found these links:

https://www.raspberrypi.org/video-wall/

http://www.ccfe.ac.uk/news_detail.aspx?id=213

Software:

http://www.piwall.co.uk/information/installation

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

Re: Raspberry Pi and 4k @ 15Hz

Mon Jun 22, 2015 6:45 pm

jamesh wrote:
I doubt DOm has time for that - you will have to sort out something yourself, or find someone who has done it. My suggestion woudl be either using GPIO to wait for a start signal, or perhaps do something over ethernet, although that might introduce some latency. Keeping them in sync is another issue, as they may drift relative to each other.
Thanks @jamesh for your reply.

I accept that you're all busy, and that I have to do this myself.
However, since I'm a beginner, and here is a forum, I wanted to get some sort of help.

Maybe you could give a pseudo-code instead, so that I can work on it and complete it.

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

Re: Raspberry Pi and 4k @ 15Hz

Mon Jun 22, 2015 6:49 pm

Demodude123 wrote:I remember seeing this done a long time ago in the Raspberry Pi blog. I found these links:

https://www.raspberrypi.org/video-wall/

http://www.ccfe.ac.uk/news_detail.aspx?id=213

Software:

http://www.piwall.co.uk/information/installation
Thanks @Demodule123 for your help.

Unfortunately, PiWall is not a feasible solution for this. Because it cuts/splits a single video (1920x1080) into 4 tiles, therefore each tile on the screen has 960x540 resolution.

The solution is only playing 4 different videos on 4 RPis. But how to sync them? This is the question!

User avatar
dividuum
Posts: 109
Joined: Sun Jun 16, 2013 1:18 pm
Location: Germany
Contact: Website

Re: Raspberry Pi and 4k @ 15Hz

Sun Jun 28, 2015 4:59 pm

OMID-313 wrote:Unfortunately, PiWall is not a feasible solution for this. Because it cuts/splits a single video (1920x1080) into 4 tiles, therefore each tile on the screen has 960x540 resolution.

The solution is only playing 4 different videos on 4 RPis. But how to sync them? This is the question!
I just released code for a proof of concept that plays a single video on multiple freely arrangeable screens. It shouldn't be too hard to adapt that to play multiple videos in sync. I'm actually really interested in that, so if you're still looking for a solution I might invest the time to build some code for that. Let me know.
info-beamer hosted - A user and programmer friendly digital signage platform for the Pi: https://info-beamer.com/hosted

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

Re: Raspberry Pi and 4k @ 15Hz

Mon Jun 29, 2015 9:05 am

dividuum wrote:I just released code for a proof of concept that plays a single video on multiple freely arrangeable screens. It shouldn't be too hard to adapt that to play multiple videos in sync. I'm actually really interested in that, so if you're still looking for a solution I might invest the time to build some code for that. Let me know.
Thanks a lot @dividuum for your reply.

Well, it seems really interesting to use info-beamer as a multi-screen video player. I studied the readme file and the descriptions, but still a few questions:

1. Does it stream a single video from the master (via ethernet cable) to the slaves? Or the slaves have their own video files stored locally?
2. For a 2x2 arrangement (4 monitors), does it play exactly the same video on all the 4 screens? Or does it break a single video into 4 tiles, so that each screen plays each own tile?

I'm very much interested in playing several video files in perfect sync. using several RPi boards. Would you please develop the codes to play multiple videos in sync?

I look forward to hearing updated news on this.
Thanks for your time and support.

User avatar
dividuum
Posts: 109
Joined: Sun Jun 16, 2013 1:18 pm
Location: Germany
Contact: Website

Re: Raspberry Pi and 4k @ 15Hz

Mon Jun 29, 2015 9:24 am

OMID-313 wrote:1. Does it stream a single video from the master (via ethernet cable) to the slaves? Or the slaves have their own video files stored locally?
The video file has to be stored locally. In theory it might be possible to stream, but that seems unreliable. A simple rsync command before calling the master.py program should be enough to mostly solve the content distribution problem.
OMID-313 wrote:2. For a 2x2 arrangement (4 monitors), does it play exactly the same video on all the 4 screens? Or does it break a single video into 4 tiles, so that each screen plays each own tile?
The code linked plays the same file on each screen. Just moved or tilted according to the configuration.
OMID-313 wrote:I'm very much interested in playing several video files in perfect sync. using several RPi boards. Would you please develop the codes to play multiple videos in sync?
I'll put something together later.
info-beamer hosted - A user and programmer friendly digital signage platform for the Pi: https://info-beamer.com/hosted

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

Re: Raspberry Pi and 4k @ 15Hz

Mon Jun 29, 2015 10:01 am

dividuum wrote:
OMID-313 wrote:1. Does it stream a single video from the master (via ethernet cable) to the slaves? Or the slaves have their own video files stored locally?
The video file has to be stored locally. In theory it might be possible to stream, but that seems unreliable. A simple rsync command before calling the master.py program should be enough to mostly solve the content distribution problem.
OMID-313 wrote:2. For a 2x2 arrangement (4 monitors), does it play exactly the same video on all the 4 screens? Or does it break a single video into 4 tiles, so that each screen plays each own tile?
The code linked plays the same file on each screen. Just moved or tilted according to the configuration.
OMID-313 wrote:I'm very much interested in playing several video files in perfect sync. using several RPi boards. Would you please develop the codes to play multiple videos in sync?
I'll put something together later.
Thanks again @dividuum for your answers.

One question:

Does the current solution syncs the single videos on multiple screens?

One suggestion:

If the question above is yes, then: Is it possible to implement the multiple-video solution just by renaming different videos into same names? For example, we store different video files locally on each pi, but rename them all to e.g. movie1.mp4 !? Would this work !?

Thanks again for your time and help.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 20752
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspberry Pi and 4k @ 15Hz

Mon Jun 29, 2015 10:09 am

How accurately do they need to be synchronised? with 1s, 100ms, 100us etc?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

User avatar
dividuum
Posts: 109
Joined: Sun Jun 16, 2013 1:18 pm
Location: Germany
Contact: Website

Re: Raspberry Pi and 4k @ 15Hz

Mon Jun 29, 2015 10:35 am

OMID-313 wrote:Does the current solution syncs the single videos on multiple screens?
Yes.
OMID-313 wrote:If the question above is yes, then: Is it possible to implement the multiple-video solution just by renaming different videos into same names? For example, we store different video files locally on each pi, but rename them all to e.g. movie1.mp4 !? Would this work !?
You might get that working [0], but a proper solution isn't that hard to do.

[0] You'd have to set the virtual screen size to that of a single screen, then move all screens on top of that area. And then put the different videos on each device using the same filename.
info-beamer hosted - A user and programmer friendly digital signage platform for the Pi: https://info-beamer.com/hosted

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

Re: Raspberry Pi and 4k @ 15Hz

Mon Jun 29, 2015 11:06 am

jamesh wrote:How accurately do they need to be synchronised? with 1s, 100ms, 100us etc?
As perfectly sync as possible.

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

Re: Raspberry Pi and 4k @ 15Hz

Mon Jun 29, 2015 11:10 am

dividuum wrote:
OMID-313 wrote:Does the current solution syncs the single videos on multiple screens?
Yes.
OMID-313 wrote:If the question above is yes, then: Is it possible to implement the multiple-video solution just by renaming different videos into same names? For example, we store different video files locally on each pi, but rename them all to e.g. movie1.mp4 !? Would this work !?
You might get that working [0], but a proper solution isn't that hard to do.

[0] You'd have to set the virtual screen size to that of a single screen, then move all screens on top of that area. And then put the different videos on each device using the same filename.
Thanks again @dividuum for your answer.

That's a good hint. I'll try it.

I look forward to your proper and reliable solution for multiple-videos in sync.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5162
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Raspberry Pi and 4k @ 15Hz

Mon Jun 29, 2015 12:23 pm

There was an omxplayer patch posted here that uses a variant of the ---live mode to manage the speed of playback (though resampling audio to maintain the correct time).
It aims to keep playback time synced with gettimeofday, which should be synced with ntp, and so of around 1ms accuracy.

That should allow multiple Pi's (if they have network connection) to play videos in sync suitable for wall displays.

User avatar
dividuum
Posts: 109
Joined: Sun Jun 16, 2013 1:18 pm
Location: Germany
Contact: Website

Re: Raspberry Pi and 4k @ 15Hz

Mon Jun 29, 2015 2:30 pm

OMID-313 wrote:I look forward to your proper and reliable solution for multiple-videos in sync.
Here you go: https://github.com/info-beamer/videowall

I'd love to hear how it works for you. I only tested it with a single PI right now, so I'm really curious about your feedback.
info-beamer hosted - A user and programmer friendly digital signage platform for the Pi: https://info-beamer.com/hosted

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

Re: Raspberry Pi and 4k @ 15Hz

Mon Jun 29, 2015 4:28 pm

dividuum wrote:
OMID-313 wrote:I look forward to your proper and reliable solution for multiple-videos in sync.
Here you go: https://github.com/info-beamer/videowall

I'd love to hear how it works for you. I only tested it with a single PI right now, so I'm really curious about your feedback.
Thanks @dividuum for your great support.

I will test this as soon as possible, and will post the results here or on github.

Thanks again for your time.

User avatar
dividuum
Posts: 109
Joined: Sun Jun 16, 2013 1:18 pm
Location: Germany
Contact: Website

Re: Raspberry Pi and 4k @ 15Hz

Fri Jul 03, 2015 2:35 pm

Did you have time to test yet?
info-beamer hosted - A user and programmer friendly digital signage platform for the Pi: https://info-beamer.com/hosted

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

Re: Raspberry Pi and 4k @ 15Hz

Sat Jul 04, 2015 5:06 am

dividuum wrote:Did you have time to test yet?
Sorry, @dividuum , but no.

Unfortunately, I haven't received my RPi 2 yet, and I don't think it will be delivered in less than two weeks!
So I hope someone else tests this video-wall feature of info-beamer and post the results.
I think if you create a topic in this forum and introduce the software and its features, people will come and test it (better than me!).

I'm really sorry I couldn't test lately.
Thanks again for your time and support.

vik
Posts: 5
Joined: Sat Oct 13, 2012 1:12 am

Re: Raspberry Pi and 4k @ 15Hz

Tue Jul 21, 2015 5:51 am

I've got the console successfully running at 3840x2160, but X seems to run at a lower res; xrandr reports 2400x1200. Do I need to change any X configurations to make this work? I'm on raspbian on an RPi2

Cheers,

vik

Demodude123
Posts: 16
Joined: Wed Jun 11, 2014 5:57 pm

Re: Raspberry Pi and 4k @ 15Hz

Tue Jul 21, 2015 1:07 pm

vik wrote:I've got the console successfully running at 3840x2160, but X seems to run at a lower res; xrandr reports 2400x1200. Do I need to change any X configurations to make this work? I'm on raspbian on an RPi2

Cheers,

vik
These are all the settings I added to config.txt when I had this working under wheezy:

Code: Select all

hdmi_ignore_edid=0xa5000080
hdmi_cvt 3840 2160 15
framebuffer_width=3840
framebuffer_height=2160
hdmi_group=2
hdmi_mode=87
hdmi_pixel_freq_limit=400000000
max_framebuffer_width=3840
max_framebuffer_height=2160

vik
Posts: 5
Joined: Sat Oct 13, 2012 1:12 am

Re: Raspberry Pi and 4k @ 15Hz

Tue Jul 21, 2015 10:20 pm

These are all the settings I added to config.txt when I had this working under wheezy:

Code: Select all

hdmi_ignore_edid=0xa5000080
hdmi_cvt 3840 2160 15
framebuffer_width=3840
framebuffer_height=2160
hdmi_group=2
hdmi_mode=87
hdmi_pixel_freq_limit=400000000
max_framebuffer_width=3840
max_framebuffer_height=2160
[/quote]

Thanks; turns out I had an errant space in one of the max_framebuffer lines; fixed that and it works great!

vik
Posts: 5
Joined: Sat Oct 13, 2012 1:12 am

Re: Raspberry Pi and 4k @ 15Hz

Tue Jul 21, 2015 11:36 pm

Having got X running successfully at 4K, now I've found it's only got a 16bit colour depth. I tried creating an xorg.conf file specifying the colour depth to be 24 bit, but this cause X to segfault when starting. Any ideas? I've got video memory set to 256Mb.

User avatar
AndyD
Posts: 2327
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Raspberry Pi and 4k @ 15Hz

Wed Jul 22, 2015 12:55 am

vik wrote:Having got X running successfully at 4K, now I've found it's only got a 16bit colour depth. I tried creating an xorg.conf file specifying the colour depth to be 24 bit, but this cause X to segfault when starting. Any ideas? I've got video memory set to 256Mb.
You can set the framebuffer depth by adding the following to config.txt:-

Code: Select all

framebuffer_depth=24
Will set the framebuffer to 24 bits per pixel.

Code: Select all

framebuffer_depth=32
Will set the framebuffer to 32 bits per pixel. When using 32 bits per pixel you may need to set

Code: Select all

framebuffer_ignore_alpha=1
Alternatively, you can set the framebuffer depth before you starting the desktop (i.e. not a good idea if you are booting into the desktop) using the fbset command.

Code: Select all

fbset -depth 24

Code: Select all

fbset -depth 32

Return to “Graphics, sound and multimedia”