From 9532298bcb5917d222acfc3df5693f7a5b5cb41b Mon Sep 17 00:00:00 2001 From: Elektroll Date: Tue, 5 Feb 2019 19:26:09 +0100 Subject: [PATCH] =?UTF-8?q?'script.sh'=20hinzuf=C3=BCgen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 script.sh diff --git a/script.sh b/script.sh new file mode 100644 index 0000000..5230241 --- /dev/null +++ b/script.sh @@ -0,0 +1,23 @@ +#!/bin/sh +# get rid of the cursor so we don't see it when videos are running +setterm -cursor off -background white -foreground white + +# set here the path to the directory containing your videos +VIDEOPATH="/home/pi/Videos/" + +# you can normally leave this alone +SERVICE="omxplayer" + +# now for our infinite loop! +while true; do + if ps ax | grep -v grep | grep $SERVICE > /dev/null + then + sleep 2; +else + for entry in $VIDEOPATH/* + do + clear + omxplayer -r -o hdmi --aspect-mode fill $entry 1>/dev/null 2>/dev/null + done +fi +done