Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Maigre
Last active May 1, 2019 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Maigre/ae9bd2ed6005bfcd92d9d844ded9d67c to your computer and use it in GitHub Desktop.
Save Maigre/ae9bd2ed6005bfcd92d9d844ded9d67c to your computer and use it in GitHub Desktop.
#!/bin/bash
# https://blog.kmp.or.at/build-your-own-raspberry-pi-image/
# https://hallard.me/raspberry-pi-read-only/
# http://blog.fraggod.net/2015/11/28/raspberry-pi-early-boot-splash-logo-screen.html
# https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=127042
# http://www.edv-huber.com/index.php/problemloesungen/15-custom-splash-screen-for-raspberry-pi-raspbian
apt-get install -y omxplayer usbmount
# get rid of the cursor so we don't see it when videos are running
setterm -cursor off
# set here the path to the directory containing your videos
VIDEOPATH="/media/usb"
# you can normally leave this alone
SERVICE="omxplayer --no-osd --blank"
while true; do
if ps ax | grep -v grep | grep $SERVICE > /dev/null
then
sleep 1;
else
for entry in $VIDEOPATH/*
do
clear
$SERVICE $entry > /dev/null
done
sleep 1
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment