Realized by Aksel Vaillant
Computer science student at ENSIM - Le Mans Université (FRANCE)
Under the direction of Ms. Catherine Cléder
From a goverment-region plan, Anne-Laure Fortin Tournès and Anna Street worked on Performing Water and proposed series of webinars designed to bring scholars, activists, and artists together in exploring how water shapes our politics and our thinking practices.
As a group of students from the engineering school of Le Mans - ENSIM, we have chosen for our 4th year's project to create an immersive and interactive exhibition of M. deCaires Taylor works.
More information about our exhibition show here.
Furthermore, my role is to develop something that can synchronize video and audio streams from Raspberry Pi cards and play differents media files, regardless of their extension, on video projectors and speakers.
I will try to explain how I developped and created this program right below this part.
I worked on different packages to see my progress but mainly to propose solutions throught "templates" for my future projects and those in needs.
Through mono package, you will find a client-server architecture able to transfer files. It means you can get files from a client and put specific files on client.
And with monoPilot, you'll be able to work with 2 unix libraries named omxplayer (command-line video player for the Raspberry Pi) and feh (image viewer) which means, from a command-line on server, you can display a picture or play a video on a client.
To finish, in multiPilot, you can control Raspberry Pi cards from a single one and pilot them from the server.
git clone https://github.com/aksel-vaillant/immersive-experience.git
- 1 Raspberry Pi card as server or you can use a PC as well.
- 1 ethernet cable for the server.
- N Raspberry Pi cards as clients.
- 1 pair of hdmi (the output. ie a video-projector, a screen, etc) and ethernet cables for each client.
- 1 Hub to connect your clients and server all together in a proper local network.
help Print this help
stop Stop the server and all clients
select Select a connected client
search Search new clients to etablish a connection
ls List client computer files
get Save a file from client
put Send a file to a client
play Play a video file
display Display a picture
ex Start synchronising all video streams on selected clients
To make the program work, you must first fill the DEFAULT_DIRECTION_FOLDER which contains the server and client files, and add a double backslash at the end.
It is an attribute which is located in the 2 classes : FTPClient and FTPServer.
Example test of the location of the resource files for the client :
private final String DEFAULT_DIRECTION_FOLDER = "...\\src\\main\\resources\\CLIENT_DIR\\";
First, you have to run FTPServer.main, and then, the FTPClient.main.
You can try mono package with a video file or a simple picture to transfer a file throught this architecture.
Ressource https://heptadecane.medium.com/file-transfer-via-java-sockets-e8d4f30703a5
The aim of this part is to connect a client to a server and display different contents such as pictures or videos.
Once all your files are setup and downloaded, you will be able to display and play those contents while piloting Raspberry Pi cards with 2 unix libraries named omxplayer (command-line video player for the Raspberry Pi) and feh (image viewer)
First, you need to make sure you have those unix librairies on your Raspberry Pi cards
sudo install omxplayer
sudo install feh
And for more information, I invite you to check their own documentation with commands and more.
To play a video
omxplayer --display 2 pathFile
--display 2 on HDMI 1 and 7 on HDMI 2
To display a picture
feh -qrYzFD120 --zoom fill pathFile
-q, --quiet Don't report non-fatal errors for failed loads.
-r, --recursive Recursively expand any directories
-Y, --hide-pointer Hide the pointer
-z, --randomize When viewing multiple files in a slideshow, randomize the file list.
The list is re-randomized whenever the slideshow cycles.
-F, --fullscreen Make the window fullscreen.
-D, --slideshow-delay [float] Wait float seconds between automatically changing slides.
--zoom [percent | max | fill] Zoom images by percent.
In this part, I have chosen to add a search command. After 10 seconds, it will generate a message and tell you if the server found new clients (and how much) or not.
From this list made with numbers (1,2,3,...) you will be able to select your Raspberry Pi card.
That's why it's important to turn them on in an order you have thought of before starting the server.
With the ex command, you can prepare and setup the programmation of your cards with correct files.
You only have to write which card you want with which file.
Then, in case your client doesn't have the file yet, it will be download before playing/displaying, you will probably have lil delay.
If you still need some help or didn't understand a part, feel free to check the HELP file with few simple tutorials I made. You will find more information and few useful resources.