Difference between revisions of "Making a video installation with Raspberry Pi"

From Interaction Station Wiki
Jump to navigation Jump to search
Line 1: Line 1:
===Prepare the SD card==
+
=Prepare the SD card=
  
 
''This tool has been tested on the following Raspberry PI models:''
 
''This tool has been tested on the following Raspberry PI models:''
Line 11: Line 11:
 
*Syncing multiple video channels via WiFi is possible with the models with integrated WiFi (Raspberry Pi 3, 4 and Zero W)
 
*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 ===
+
= Download and burn the image =
  
 
Download the image:  
 
Download the image:  
http://interactionstation.wdka.hro.nl/downloads/video_multi_channel_sync_4.img
+
http://interactionstation.wdka.hro.nl/downloads/video_multi_channel_sync_pi_4_2020.img
  
 
Download etcher
 
Download etcher
Line 22: Line 22:
  
  
=== Configure the Raspberry Pi for playing 1 video on a loop ===
+
= Configure the Raspberry Pi for playing 1 video on a loop =
  
*Connect raspberry pi to a screen, keyboard and mouse.
+
Connect the Pi to a screen, keyboard and mouse:
*Insert the SD card that you just flashed in the Pi.
+
*Notes on Raspberry Pi 4:
*Plug in the power adapter.  
+
*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.
  
When Raspberry starts up press repeatedly the keys CRTL and C (at the same time) to escape the looping video.
+
 
 +
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 and C (at the same time) to escape the looping video.
  
 
To get into the graphic interface type:
 
To get into the graphic interface type:
Line 35: Line 40:
 
and hit the key Enter.
 
and hit the key Enter.
  
Insert a USB stick with your video (t
+
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”
 
Go to “File Manager”
Line 51: Line 56:
 
Video_filename=yourvideoname
 
Video_filename=yourvideoname
  
save the file
+
Save the file
 +
 
 +
Restart the Pi by typing:
 +
reboot now
 +
 
 +
And pressing the key 'Enter'
 +
 
 +
And your video should automatically start looping
 +
 
  
restart the Pi and your video should automatically start looping
+
= Configure multiple Raspberry Pis for playing multiple videos in sync =
  
== Video installation with 1 video playing on a loop ==
+
== Notes: ==
 +
*You need as many Raspberry Pis as videos.
 +
*All Raspberry Pis should be the same model.
 +
*The video should be the same in all Pis.
 +
*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
 +
Look for is_conductor and set it to true:
 +
  is_conductor=true
  
 +
If synchronising the Pi units via WiFi:
  
== Video installation with multiple videos playing in-sync ==
+
== WiFi interface ==
 +
Type:
 +
  nano /etc/network/interfaces.d/wlan0
 +
Look for the line that starts with address, and set it to:
 +
  address 172.24.1.1
  
You need one Raspberry Pi per video.
+
If synchronising the Pi units via Ethernet:
  
 +
== Ethernet interface ==
 +
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
  
 +
If synchronising the Pi units via WiFi:
  
 +
== WiFi interface ==
 +
Type:
 +
  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)
 +
 +
If synchronising the Pi units via Ethernet:
 +
 +
== Ethernet interface ==
 +
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.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)
 +
 +
 +
 +
== Syncing multiple video over WiFi ==
 +
Check at the beginning of this guide if your Raspberry Pis have an integrated WiFi adapter.
 +
 +
 +
Edit video-sync.config
  
  
== configure raspberry pi for syncing ==
 
 
setup wifi
 
setup wifi
 
host …  
 
host …  
 
master  
 
master  
 
slaves
 
slaves
 
===Notes on 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.
 

Revision as of 11:39, 30 June 2020

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 (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

Download the image: http://interactionstation.wdka.hro.nl/downloads/video_multi_channel_sync_pi_4_2020.img

Download etcher https://www.balena.io/etcher/

Use Etcher to flash the SD card with the image


Configure the Raspberry Pi for playing 1 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 and C (at the same time) 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

Name the video in Video_filename=yourvideoname

Save the file

Restart the Pi by typing: reboot now

And pressing the key 'Enter'

And your video should automatically start looping


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 video should be the same in all Pis.
  • 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

Look for is_conductor and set it to true:

 is_conductor=true

If synchronising the Pi units via WiFi:

WiFi interface

Type:

 nano /etc/network/interfaces.d/wlan0

Look for the line that starts with address, and set it to:

 address 172.24.1.1

If synchronising the Pi units via Ethernet:

Ethernet interface

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

If synchronising the Pi units via WiFi:

WiFi interface

Type:

 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)

If synchronising the Pi units via Ethernet:

Ethernet interface

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.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)


Syncing multiple video over WiFi

Check at the beginning of this guide if your Raspberry Pis have an integrated WiFi adapter.


Edit video-sync.config


setup wifi host … master slaves