adishankara8
Posts: 3
Joined: Fri Dec 01, 2017 1:45 am

Scaling digital signage to 500 screens with limited bandwidth

Fri Dec 01, 2017 5:00 pm

Hi, our university campus has about 500 screens and we're exploring how we can use rpi3 to stream HD/4k videos that we store on OneDrive. Presently, we've set up xbian on the RPI3 and use an addon to stream HD/4k videos from OneDrive. This may work on a few screens, but to do this over 500 screens would mean a significant load on our internet bandwidth. The network will simply choke.

One option we see is that we download the videos on sd card in each RPI and play it offline. But that would still mean downloading it at least once for all the 500 RPIs. We'd like to change the content on a daily basis so this would still eat up a lot of bandwidth every day.

The other option is to somehow compress the videos and then decompress it as we stream the video on each RPI. We're noobs when it comes to video compression/de-compression - so if anybody here can guide what it really means and if it is possible to do it on RPIs and how?

Any other ways we can scale this to 500 screens? Our primary limitation is bandwidth. We want to keep it to a minimum. Please guide.

hippy
Posts: 5964
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Scaling digital signage to 500 screens with limited bandwidth

Fri Dec 01, 2017 6:51 pm

The usual way would be to push a single stream out and then have every screen pick up that stream and output it. You can increase the number of streams up to the bandwidth available.

Do you really have or need 500 screens each showing different content ?

knute
Posts: 473
Joined: Thu Oct 23, 2014 12:14 am
Location: Texas
Contact: Website

Re: Scaling digital signage to 500 screens with limited bandwidth

Fri Dec 01, 2017 9:21 pm

I don't know what sort of compression you've got on your video but 500 sites streaming HD takes a big pipe. Are they all viewing the same video on the same day? Can you send out tomorrow's video overnight? You can use multicast to transmit only once and all sites can receive the data. You might need a scheme to clean up any lost data but that is doable.

We have a system running in about 14 locations with a couple of hundred small computers driving some data displays. These are updated a couple of times a minute with new data via multicast. Since the update rate is high, we don't worry about the occasional lost packet because new data is sent again shortly. If your update rate is one video a day you should have no problem getting that done in a reasonable period of time within a manageable bandwidth.

ghans
Posts: 7873
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Scaling digital signage to 500 screens with limited bandwidth

Sat Dec 02, 2017 7:04 am

No Raspberry Pi model can playback 4K video content properly. 1080P60 with h.264 is
the maximum.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

adishankara8
Posts: 3
Joined: Fri Dec 01, 2017 1:45 am

Re: Scaling digital signage to 500 screens with limited bandwidth

Sat Dec 02, 2017 12:46 pm

hippy wrote: The usual way would be to push a single stream out and then have every screen pick up that stream and output it. You can increase the number of streams up to the bandwidth available.

Do you really have or need 500 screens each showing different content ?
Yes, these screens may or may not be playing the same content at a time.
knute wrote: I don't know what sort of compression you've got on your video but 500 sites streaming HD takes a big pipe. Are they all viewing the same video on the same day? Can you send out tomorrow's video overnight? You can use multicast to transmit only once and all sites can receive the data. You might need a scheme to clean up any lost data but that is doable.

We have a system running in about 14 locations with a couple of hundred small computers driving some data displays. These are updated a couple of times a minute with new data via multicast. Since the update rate is high, we don't worry about the occasional lost packet because new data is sent again shortly. If your update rate is one video a day you should have no problem getting that done in a reasonable period of time within a manageable bandwidth.
We may be changing videos on a daily basis. We think we can compress our videos using h.264 encoding, upload them to OneDrive and then rely on RPi to decode it using hardware acceleration. Streaming is definitely out of the picture, downloading once and playing as per schedule on each RPi sounds more economical.
ghans wrote: No Raspberry Pi model can playback 4K video content properly. 1080P60 with h.264 is
the maximum.
Just tested a 4k video today morning - you're right. I think we may have to settle with HD videos compressed with h.264 for now.

stschake
Posts: 3
Joined: Sat Dec 02, 2017 7:10 pm

Re: Scaling digital signage to 500 screens with limited bandwidth

Sat Dec 02, 2017 7:13 pm

You can stream it on the network with IP *multicast*. That way you only have to send one copy to the network for each unique program and your bandwidth requirements don't scale linearly with the number of Pis that need to receive the program. This is how IPTV usually works.

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

Re: Scaling digital signage to 500 screens with limited bandwidth

Sat Dec 02, 2017 9:45 pm

What's the timeframe for your project? The info-beamer hosted digital signage system might have the option to do secure peer-to-peer distribution of content in the near future. A prototype is already close to being finished. Assuming the Pis can talk and discover each other in your local network, under perfect circumstances new videos/images/etc would only have to be downloaded once from the distribution servers to your network. The devices would then be able to replicate that content between each other locally.

So if you assign a new 200MB video to all your devices, you'd only have 200MB of external bandwidth used. You'd never have to explicitly control how this peer-to-peer distribution works. Instead locally available content would always be handled locally, fully automated. If you install an additional device, it would be able to download almost all of its content from the already existing devices. If that sounds interesting, feel free to get in contact.
info-beamer hosted - A user and programmer friendly digital signage platform for the Pi: https://info-beamer.com/hosted

adishankara8
Posts: 3
Joined: Fri Dec 01, 2017 1:45 am

Re: Scaling digital signage to 500 screens with limited bandwidth

Sun Dec 03, 2017 12:05 pm

stschake wrote: You can stream it on the network with IP *multicast*. That way you only have to send one copy to the network for each unique program and your bandwidth requirements don't scale linearly with the number of Pis that need to receive the program. This is how IPTV usually works.
I'm getting up to speed with multicast, but will it mean that the Pi has to receive its unique program just once from the network and download it on sd card for repeated use throughout the day?

ghans
Posts: 7873
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Scaling digital signage to 500 screens with limited bandwidth

Sun Dec 03, 2017 3:09 pm

Usually multicast is used for live transmission like IP-TV. It can be used in other ways too , though :

http://uftp-multicast.sourceforge.net/

So , you can't you update the content overnight ?

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

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

Re: Scaling digital signage to 500 screens with limited bandwidth

Mon Dec 18, 2017 12:40 am

Hey adishankara8,

just a quick update. There's now a version of the info-beamer hosted that has experimental peer-to-peer support. Once installed, your Pis can detect each other in your local network. If you assign new content to them, they will automatically try to fetch the content from each other if possible instead of fetching it externally. In the optimal case, only one of your devices has to fetch new content using your limited uplink. The rest happens internal to your network. You just use the web dashboard, assign videos/image to your devices and click on Save. The rest happens automatically and fully secure. As far as I know, no other systems offers anything similar. Let me know if you want to test drive the system with a couple of screens.
info-beamer hosted - A user and programmer friendly digital signage platform for the Pi: https://info-beamer.com/hosted

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

Re: Scaling digital signage to 500 screens with limited bandwidth

Wed Jan 10, 2018 6:23 pm

Adding to my previous response: This feature is now publicly available and can be activated (almost) with the click of a button. Learn more here:

https://info-beamer.com/blog/introducin ... stribution

Happy to answer any questions.
info-beamer hosted - A user and programmer friendly digital signage platform for the Pi: https://info-beamer.com/hosted

User avatar
algorithm
Posts: 183
Joined: Mon Nov 25, 2013 9:09 pm
Location: Flatland

Re: Scaling digital signage to 500 screens with limited bandwidth

Thu Jan 11, 2018 10:40 am

Just set up a local cache/proxy? Configure one RPi to download new content externally once per day and schedule all the others to download from it, on random or distributed (maybe by IP address) times during the night. Could be very simple with manual configuration pointing to your local cache or very fancy with firewall rules redirecting traffic etc.

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

Re: Scaling digital signage to 500 screens with limited bandwidth

Thu Jan 11, 2018 11:11 am

algorithm wrote:
Thu Jan 11, 2018 10:40 am
Just set up a local cache/proxy? Configure one RPi to download new content externally once per day and schedule all the others to download from it, on random or distributed (maybe by IP address) times during the night. Could be very simple with manual configuration pointing to your local cache or very fancy with firewall rules redirecting traffic etc.
Sure. That might be a possible solution. But that requires additional work and has a few consequences: First of all: You can't really cache HTTPS traffic (unless you use your own PKI). In the info-beamer case, all communication to the internet always uses HTTPS for both confidentiality (e.g. you can't just see, for example, dashboard API keys that might be required on the devices to fetch additional content) and integrity (you can't just inject modified content). So you can't simply put a cache in the middle unless you either ignore or fix these issues through some other mechanism. Additionally as you said, it requires extra pieces of infrastructure or code (like the machine running the cache) and configuration to make your devices use it. The solution I posted does all that for you without requiring any additional work on your side (except enabling the feature) and devices will automatically distribute content locally if possible while still preserving the confidentiality and integrity properties of HTTPS. Basically every device is automatically the proxy/cache for every other device if it already has the content locally available. There's no explicit configuration required for that.
info-beamer hosted - A user and programmer friendly digital signage platform for the Pi: https://info-beamer.com/hosted

User avatar
algorithm
Posts: 183
Joined: Mon Nov 25, 2013 9:09 pm
Location: Flatland

Re: Scaling digital signage to 500 screens with limited bandwidth

Fri Jan 12, 2018 11:10 am

Yes, I'm sure that for a professional signage project (like OP's, probably) your product might be a good turn-key solution. In the spirit of RPi tinkering, though, my first thought was: just one more Pi and a "download from there" directive.

Hambarde
Posts: 6
Joined: Fri Jun 16, 2017 5:24 am

Re: Scaling digital signage to 500 screens with limited bandwidth

Sun Jan 28, 2018 6:23 pm

I have two solutions for you,
1- use a script to feed in omxplayer with local shared folder. (3 scripts)
2- use locally hosted digital signage.

For first solution.
There are video looper scripts just google it, all files in predefined directory will be played. Keep the script in nohup or use a 2nd script to check video looper running, and if not it will start video looper.

Now use 3rd script for remote directory monitoring tool like inotifywait and if any changes on remote , use Rsync to copy, after Rsync is done copy ask script to kill videolooper script.

After this happens. 2nd script will start video looper again, restarting video looper is required so the script recognise change in directory.

There are free or less costly self hosted digital signage systems, e.g. screenly or Pisignage etc.. (no affiliation but used )

In both solutions, you will need one central system, for first solution you can use Pi, for 2nd solution you need to go as per product.

For 500 screens local server is recommended. Doing this from last 10yrs now.
If help needed ping me back on same forum
Last edited by Hambarde on Sun Jan 28, 2018 10:33 pm, edited 1 time in total.
__________________________________________________________________________________________
:arrow: mail me - [email protected]

Hambarde
Posts: 6
Joined: Fri Jun 16, 2017 5:24 am

Re: Scaling digital signage to 500 screens with limited bandwidth

Sun Jan 28, 2018 6:29 pm

Forgot to add, you cannot run 4k on RPi,
For 4k you can use something like odroid C2 or Intel NUC.

Multicast / streaming to 500 device need too much of bandwidth.
So solution should push file from local server to all screens on LAN, and schedule it to play one by one or as predefined playlist.

Also using local server you will be in control of all devices.
You can even make a script to run on each Pi to report back the status of screen to server.
__________________________________________________________________________________________
:arrow: mail me - [email protected]

epoch1970
Posts: 3701
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Scaling digital signage to 500 screens with limited bandwidth

Sun Jan 28, 2018 6:46 pm

For file transfers perhaps you could consider Syncthing. It is peer-to-peer by nature and discovers remote IP addresses. The transfer protocol is quite efficient and link resilience excellent, IMHO.
On a Pi 3 it can consume a bit of CPU and memory, depending on how much data is being mirrored with peers.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

Return to “Advanced users”