running a projector with raspberry pi 3


12 posts
by colleen » Wed May 31, 2017 2:42 pm
I am brand new to raspberry Pi. I am a video artist and I usually use media players to run my projectors. I would like to find out if it will work to load loop software onto a RP3 and run my projector. I am on a mac.

Also, and more challenging, could I run two separate projectors, with different videos, that sync, off one RP?
Posts: 7
Joined: Wed May 31, 2017 2:02 pm
by DougieLawson » Sat Jun 03, 2017 1:56 pm
Get one RPi per projector and run your sync'd stuff with http://piwall.co.uk.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.
User avatar
Posts: 28159
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
by tvjon » Sat Jun 03, 2017 4:00 pm
colleen wrote:...if it will work to load loop software onto a RP3 and run my projector.

I am on a mac.

Also, and more challenging, could I run two separate projectors, with different videos, that sync, off one RP?



Looping videos works fine on any RPi.
What video inputs do your projectors have?

Me too, though only on old intel mac's. but less & less since using RPi's, as they do a pretty good job all round.
Presumably you generate the videos on your mac?

What format are they?

Do you have any of your work online?

Depending on what you need (you haven't really told us much...) you could run 2 videos independently from one RPi.
Posts: 520
Joined: Mon Jan 07, 2013 9:11 am
by colleen » Mon Jun 05, 2017 12:26 am
thanks for the reply. I have 2 projectors, each with HDMI. I need two separate videos to play but exactly in sync. (I now have 2 RPi's that I have looper on each already working, but it is impossible to get them to sync. The projectors will be installed in a gallery and I would like the pi's to stay looping every day for the run of the show and just have the projectors power up each day. I would either need to get a third Pi to run the two RPis and find out how to set that up (?!) but it is a miracle I even got the two RPis to each loop and run the projectors.
Posts: 7
Joined: Wed May 31, 2017 2:02 pm
by colleen » Mon Jun 05, 2017 12:33 am
DougieLawson wrote:Get one RPi per projector and run your sync'd stuff with http://piwall.co.uk.


Thanks for responding! Would piwall work to run two separate videos looping continuously (for the 7 week installation)? I just need the two separate videos to begin at the same time and stay in sync with each other. I have 2 RPi with looper on there from adafruit but it will be too hard to get them to sync.

It seems a piwall is for blending one video across many monitors?
Posts: 7
Joined: Wed May 31, 2017 2:02 pm
by colleen » Mon Jun 05, 2017 12:36 am
Presumably you generate the videos on your mac?
yes Premiere Pro.

What format are they?
h.264 / .mp4 files

Do you have any of your work online? not this work yet

Depending on what you need (you haven't really told us much...) you could run 2 videos independently from one RPi.[/quote]
that would be perfect. How can I do that?
Posts: 7
Joined: Wed May 31, 2017 2:02 pm
by DougieLawson » Mon Jun 05, 2017 6:46 am
You may need to write your own software. Take a look at MQTT (with Mosquitto) as a way to send a message (publish) that will sync your subscribers.

If your clocks are sync'd then a message that says "start video #3 @ 07:47" would mean they'll start at the same time.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.
User avatar
Posts: 28159
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
by tvjon » Mon Jun 05, 2017 12:24 pm
colleen wrote:.... you could run 2 videos independently from one RPi.

that would be perfect. How can I do that?[/quote]


Attached is a photo, shrunk to fit the forum's file size limit, of 2 of my (different makes, sizes, etc.) screens, attached to a single RPi3, so HDMI on 1, VGA on the other, displaying a H264 file (not generated by me, but handy for testing). Many projectors have VGA input as well as HDMI but if only HDMI input available, a VGA to HDMI adapter works fine. It's the same file played through 2 different interfaces to highlight synchronisation. Obviously in practice you'd have 2 different files.

A sticky thread, a few posts up from yours:

https://www.raspberrypi.org/forums/view ... bfba4e10a3

gives you lots of details.

I used this setup over a year ago at a Cheltenham RPi meeting demonstrating different graphics files running simultaneously on 2 big screens, where they had excellent large screen Philips monitors, & it was hard to decide which was showing VGA or HDMI.

Only you can decide if the quality, degree of synchronisation, etc. is adequate for your needs, (which is why I asked if you had anything publicly available). It's probably worth getting one of the kits though, if only to show you its possibilities in your art projects. The DPI/vga666 interface can be extended to 8 bits per colour, & a pcb for such is available from a forum contributor. ISTR a ready made board (not the same as in the thread above) is available from an Asian supplier.

As you can imagine, it's somewhat easier to achieve better synch' if everything emanates from one RPi.

I am too, making a possibly rash assumption here that you don't need (synch'd) audio to each of your two h264 videos?

The program used to display h264 files, is actually included in the Raspbian OS µSD card example source files:

/opt/vc/src/hello_pi/hello_video

A small modification to allow looping files is described in a forum post somewhere in the multimedia sub-forum. It displays only h264 files, not audio. You can of course have a "sound track" playing from an amplifier connected to RPi's audio output which is independent of the 2 videos.

Good luck with your show.

2displays.jpg
2displays.jpg (63.82 KiB) Viewed 245 times
Posts: 520
Joined: Mon Jan 07, 2013 9:11 am
by colleen » Tue Jun 06, 2017 3:24 pm
DougieLawson wrote:You may need to write your own software. Take a look at MQTT (with Mosquitto) as a way to send a message (publish) that will sync your subscribers.

If your clocks are sync'd then a message that says "start video #3 @ 07:47" would mean they'll start at the same time.


thanks so much. I am so absolutely new to this so this is way over my level of understanding. I somehow got the RPi going and with looper but that is because I found a step by step tutorial that I just followed. I may just insert the two memory sticks at the exact same time so they are in sync. I was able to do this once- they are about .5 second off but I can live with that. as long as I keep the RPis powered up they will loop forever this way. And then I will just turn projectors on and off each day- the loop just keeps going and is not affected by the projector. If there is a power outage I will have to re-sync the RPis-- hopefully this won't happen. But I ordered 2 long hdmi cords so I will have access at ground level to the players and can manually slot the thumb drives at the same exact time.
Posts: 7
Joined: Wed May 31, 2017 2:02 pm
by colleen » Tue Jun 06, 2017 3:31 pm
tvjon wrote:
colleen wrote:.... you could run 2 videos independently from one RPi.

that would be perfect. How can I do that?


thank you for this information. I am afraid it is way above my understanding, unfortunately!

also, right, no audio for this show. I understand the two sources: hdmi with VGA would be fine etc from one RPi, but I don't know how to program one to be able to do this. (I have the 2 RPis right now looping because of a step by step tutorial...)

Anyway, I will keep reading up on what you've sent and see if I can make sense of it. Thank you!
Posts: 7
Joined: Wed May 31, 2017 2:02 pm
by tvjon » Wed Jun 07, 2017 9:01 am
There isn't any "programming" as such.

The RPi Foundation engineers (both present & (I think) one no longer directly associated with the Foundation), have already done the rather low-level programming involved.

Us end users just have to configure the interfaces to suit the resolution of the display devices (projectors in your case). In fact you've already done that for the HDMI interface as you now have that working.

Reading through that thread is a great idea.

The vga kit cost is so low in relation to what you already have, that there is little loss in buying one to see if it suits your purpose.

Really, instead of software programming, using the kit involves hardware soldering. There's only a few parts to it, & if you don't feel confident soldering, no doubt you can find a friend, colleague, or family member who can help.

I've no idea of course what your "looper" program is, but since it looks like you are a determined soul, here's a program to actually display & loop a .h264 file on your setup. Assuming it works ok for your files, hopefully it will encourage you to continue...

Just unzip the file, perhaps to the folder where your h264 videos live, open a terminal, & type:


open-term.jpg
open-term.jpg (12.45 KiB) Viewed 170 times


./splash file_name.h264 how-many-loops-to-do

so for example:

./splash video1.h264 60

That will send your file to HDMI connected device (if you want to increase your projector bulb life, just connect a TV or monitor instead).

Now, if you fit a VGA666 board to your pi, you'll want to specify *which* display, so adding a display number to the command line thus:

./splash video1.h264 60 0

does the same as the example above, &

for the vga connected projector:

./splash video2.h264 60 4

RPi is a great resource for anyone who wants to learn, likes to experiment, & particularly in circumstances where the available budget is (very) low.

A few short years ago. it would have cost thousands to build a system like you're contemplating, & RPi has the considerable advantage of being configurable in very flexible ways.
Attachments
splash.zip
(10.82 KiB) Downloaded 4 times
Posts: 520
Joined: Mon Jan 07, 2013 9:11 am
by colleen » Mon Jun 19, 2017 3:30 am
A few short years ago. it would have cost thousands to build a system like you're contemplating, & RPi has the considerable advantage of being configurable in very flexible ways.[/quote]


THANK YOU for this great information and encouragement. I am going to try this! (I will find someone who can help with the soldering part... )
many thanks again. and apologies for slow reply- just finding your response now- thanks.
Posts: 7
Joined: Wed May 31, 2017 2:02 pm