Created
December 1, 2018 13:52
-
-
Save salmanfarisvp/e327ada579991c229e84eac9cdeb766c to your computer and use it in GitHub Desktop.
Raspberry Pi video Looping Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
setterm -cursor off | |
VIDEOPATH="/home/pi/videoloop/" | |
SERVICE="omxplayer" | |
while true; do | |
if ps ax | grep -v grep | grep $SERVICE > /dev/null | |
then | |
sleep 1; | |
else | |
for entry in $VIDEOPATH/* | |
do | |
clear | |
omxplayer $entry > /dev/null | |
done | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment