Making a video installation with Raspberry Pi
Equipment needed
- 1x Raspberry Pi for each video
- 1x screen/projector for each video
- 1x SD card for each Pi (32GB raccomended)
- HDMI cables to connect to screens/projectors
- Power cables
- Keyboard + mouse for each Pi
Prepare the SD card
This tool has been tested on the following Raspberry PI models:
- Raspberry Pi 1
- Raspberry Pi 2
- Raspberry Pi 3
- Raspberry Pi 4
- Raspberry Pi Zero W
- Syncing multiple video channels via Ethernet is possible with the models with Ethernet port (Raspberry Pi 1, 2, 3 & 4)
- Syncing multiple video channels via WiFi is possible with the models with integrated WiFi (Raspberry Pi 3, 4 and Zero W)
Download and burn the image
You can download the .img files here:
Download conductor.img
(9.26GB)
Download follower.img
(8.98GB)
or you can transfer them from the interaction Station hard drive.
Download Raspberry Pi imager
Download it here
We are going to use it to burn the .img file on our SD card.
Use Raspberry Pi imager to flash the SD card with the image
Raspberry Pi device >Select your model of Pi
The ones we have at the station or at the rental are RPi4 Model B. If you are using another one the model is written on the Pi itself.
Operating System >Use custom image >conductor.img
Upload the .img file you just downloded
Storage >Select your SD card
FLASH!
Configure the Raspberry Pi for playing a video on a loop
Connect the Pi to a screen, keyboard and mouse:
- Notes on Raspberry Pi 4:
- The Raspberry Pi 4 has two HDMI (micro HDMI) outputs. You will need to use "HDMI0", that is the left output next to the power connector.
Insert the SD card that you just flashed in the Pi.
Plug in the power adapter.
When you see a video playing press repeatedly the keys
CRTL + C
to escape the looping video.
To get into the graphic interface type:
startx
and hit the key Enter.
Insert a USB stick with your video (video coded: H264, the file name shouldn't contain spaces or non alphanumerical characters)
Go to “File Manager”
Search for your video in folder /media/root/PEN_FAT32
Copy your video and place it in /home/pi/video-sync-loop/videos
Go back to the folder video-sync-loop and edit video-sync.config
adjust the configuration so that it says:
playback_mode=loop
Or, if you are syncing videos adjust so it says:
playback_mode=sync
Name the video in:
Video_filename=yourvideoname.mp4
(swap yourvideoname.mp4 with the name of your video)
Save the file
Restart the Pi by typing:
sudo reboot now
And pressing the key 'Enter'. Your video should automatically start looping after rebooting
Configure multiple Raspberry Pis for playing multiple videos in sync
Notes:
- You need as many Raspberry Pis as videos.
- All Raspberry Pis should be the same model.
- The videos should be of the same length.
- The videos need to have the same file name in all Pis, even when different videos.
- The Pis will act as either conductor or follower.
- There can only be one conductor. There might be one or multiple followers.
Conductor
Change the config file:
cd /home/pi/video-sync-loop/ nano video-sync.config
Adjust the configuration so that it says:
playback_mode=sync
Look for is_conductor and set it to true:
is_conductor=true
Synchronising the Pi units via WiFi
Open a Terminal window, then type:
sudo nano /etc/network/interfaces.d/wlan0
Look for the line that starts with address, and set it to:
address 172.24.1.1
Change the ESSID to a unique name for your (group of) Raspberry Pi's, so your conductor doesn't conduct another group's screens.
look for
wireless-essid [yourid]
and change what comes after to a unique name. Make sure it's the same across your devices.
To save the changes:
press CONTROL + S (at the same time) to save
Close the terminal window
When back in the terminal, type
sudo restart now
and hit enter to restart the Raspberry Pi
Synchronising the Pi units via Ethernet
Type:
sudo nano /etc/dhcpcd.conf and type:
Look for the line that starts with static ip_address, and set it to:
static ip_address=192.168.1.1/24
Followers
Change the config file:
cd /home/pi/video-sync-loop/ nano video-sync config
Look for is_conductor and set it to false:
is_conductor=false
Synchronising the Pi units via WiFi
Type:
sudo nano /etc/network/interfaces.d/wlan0
Look for the line that starts with address, and set it to:
address 172.24.1.2
(Only if there is only one follower. Otherwise increment this number (172.24.1.3, 172.24.1.4, etc) for the other followers)
Synchronising the Pi units via Ethernet
Type:
sudo nano /etc/dhcpcd.conf
Look for the line that starts with static ip_address, and set it to:
static ip_address=192.168.1.2/24
(Only if there is only one follower. Otherwise increment this number (172.24.1.3, 172.24.1.4, etc) for the other followers)
Other options in the config file
To edit the config file, in the terminal:
cd /home/pi/video-sync-loop/ nano video-sync config
Selecting the Audio output
By default the sound will come out of the Audio jack of the Pi (you need to connect an amplified speaker to it). In case you'd like to have the audio played via HDMI you need to change the line:
audio_out=headphone_jack
to: audio_out=hdmi
And save the file. If you use nano as an editor, you can save the changes by pressing the keys CTRL and X at the same time and pressing the key Enter to confirm.