Created
May 15, 2024 17:51
-
-
Save n1ckfg/3e745175e36afe12bb774303079f604d to your computer and use it in GitHub Desktop.
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 | |
# https://github.com/greymechanic/loopVideo | |
# clear terminal text, set background to black, and hide the cursor | |
setterm -cursor off | |
setterm -term linux -background black | |
setterm -term linux clear | |
# this is the path to the directory containing your videos | |
VIDEOPATH="/home/pi/Videos" | |
# leave this alone | |
SERVICE="omxplayer" | |
# infinitely loop through any video files in VIDEOPATH | |
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
removes the seek text that comes up on the loop, loops a single file, and sets custom resolution