Autoplay video on Raspberry Pi
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_rescue 2017-01-11-raspbian-jessie-lite.img /dev/mmcblk0
- 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/*.mp4to file
- set the file as executable:
chmod +x /etc/rc.local
- reboot and enjoy!