A simple script to loop a video from USB on boot.
Based on this article but modified to work with VLC and USB drive. https://community.spiceworks.com/how_to/135908-loop-a-single-video-on-a-raspberry-pi
Install VLC and screen
sudo apt install vlc
sudo apt install screen
Put script in homefolder (/home/pi). Make it executable with
chmod +x /home/pi/videoloop
Format a USB drive with exFat, or modify the code to other filesystem. Rename video to 1.mp4 and put in the root folder of the USB drive.
Put this in cron with crontab -e.
@reboot echo "crontab loaded, waiting 10 sec" && sleep 10 && /home/pi/videoloop start
* * * * * echo "Checking if video has stopped" && sleep 1 && /home/pi/videoloop repair
Reboot it and it should start playing on boot.
Rewrite script to look for playlist instead of specific file.