Skip to content

Instantly share code, notes, and snippets.

@cqx931
Last active May 28, 2024 17:53
Show Gist options
  • Save cqx931/2212d003491a28abbab97fd6f6c5e64d to your computer and use it in GitHub Desktop.
Save cqx931/2212d003491a28abbab97fd6f6c5e64d to your computer and use it in GitHub Desktop.
Video player with raspberry pi

With USB

https://videolooper.de/

Without USB

  1. Flash the sd card with system bullseye 32 bit

  2. 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment