My daughter makes video art and needed a simple solution for showing one of her pieces continually in a loop.
I used an old Raspberry Pi model B for this. I just realised that the only place I had documented this was on my now-deleted Twitter account, and I can’t recall where I learned about this method, so I just had a quick look at the machine in question to try and work out what I did to make it. I’m recording it here in case it’s useful to anyone else or, more likely, me.
The Pi has Raspbian Buster on it, no GUI/desktop, just the command line stuff. It needs omxplayer, which I think was installed by default.
I put the source video MP4 file in the default pi user’s home directory. (I may have transferred the file from a USB stick using fdisk to identify and
sudo mount /dev/sda1 /media/usb-drive/
to mount the drive, but you could also probably transfer the file using SFTP, FTP over SSH).
I also doubtless used raspi-config to force the audio to either HDMI or the 3.5mm audio jack, and maybe alsamixer to set the volume level.
The magic happened by editing rc.local:
sudo nano /etc/rc.local
Then I added some lines so it looked a bit like this:
# By default this script does nothing. # Print the IP address _IP=$(hostname -I) || true if [ "$_IP" ]; then printf "My IP address is %s\n" "$_IP" fi omxplayer -o local --loop /home/pi/video-art.mp4 & exit 0
Now when the Pi reboots, after quite a lot of boot-up text scrolling, the video plays and loops automatically. Connect to your monitor or projector and install in your art gallery!