With USB
Without USB
-
Flash the sd card with system
bullseye 32 bit
-
Create a file
autoplay.sh
on the Desktop
-
For one video loop:
cvlc —loop /home/pi/Videos/v1.mp4 —fullscreen
-
For two seperate videos playing on two monitors (raspberry pi 4):
cvlc —loop /home/pi/Videos/v1.mp4 —mmal-display HDMI-2 —fullscreen & cvlc —loop /home/pi/Videos/v2.mp4 —mmal-display HDMI-1 —fullscreen
3.Run the script on start
- Open the terminal and create an autostart directory (if one does not already exist) and edit the
audoplay.desktop
file
mkdir /home/pi/.config/autostart
nano /home/pi/.config/autostart/autoplay.desktop
- Copy the following code into your file
[Desktop Entry]
Type=Application
Name=Autoplay
Exec=bash /home/pi/Desktop/autoplay.sh
- Save and exit with ctrl + x, followed by y when prompted to save, and then enter
- Reboot