Autoplay video on Raspberry Pi
This is a complement of Image slideshow on Raspberry Pi post.
Lots of (art) people are using Raspberry Pi instead of DVD players and MP4 players for their installations that play videos in loop. There are many ways how to achieve the result, but the one I liked the most is the following:
- download Raspbian Lite from raspberrypi.org
- copy the downloaded image to the SD card, e.g.
sudo dd if=2020-02-13-raspbian-buster-lite.img of=/dev/mmcblk0 conv=fsync,notrunc bs=4M
- boot Raspberry Pi into freshly installed Raspbian
- copy your video from USB flash drive to the SD card
sudo apt-get update
sudo apt-get install omxplayer
- append this line
/usr/bin/omxplayer -b --loop /home/pi/*.mp4
to file/etc/rc.local
- set the file as executable:
chmod +x /etc/rc.local
- reboot and enjoy!
If you want something more magical (that can discover and autoplay all video files on attached USB stick), you can try VideoPi project by my friend Jakub.