Skip to content

Instantly share code, notes, and snippets.

@salmanfarisvp
Created December 1, 2018 13:52
Show Gist options
  • Save salmanfarisvp/e327ada579991c229e84eac9cdeb766c to your computer and use it in GitHub Desktop.
Save salmanfarisvp/e327ada579991c229e84eac9cdeb766c to your computer and use it in GitHub Desktop.
Raspberry Pi video Looping Script
#!/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