Skip to content

Instantly share code, notes, and snippets.

@n1ckfg
Created May 15, 2024 17:51
Show Gist options
  • Save n1ckfg/3e745175e36afe12bb774303079f604d to your computer and use it in GitHub Desktop.
Save n1ckfg/3e745175e36afe12bb774303079f604d to your computer and use it in GitHub Desktop.
#!/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
@githubarooski
Copy link

omxplayer --no-osd --win "0 0 1600 1200" --loop $entry > /dev/null

removes the seek text that comes up on the loop, loops a single file, and sets custom resolution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment