doorbuzz/videoplayer.sh

25 lines
549 B
Bash
Raw Normal View History

2015-04-08 22:16:20 +02:00
#!/bin/bash
if [ ! -f black.png ]
then
convert -size 1920x1080 xc:#000000 black.png
2015-07-27 23:24:07 +02:00
convert level2_round_grey.png -background black -gravity center -extent 1920x1080 black.png
2015-04-08 22:16:20 +02:00
fi
killall feh
trap "killall feh; killall omxplayer" 1 2 3 15
feh -F -x black.png &
#feh black.png &
2015-04-08 22:16:20 +02:00
while true
do
if [ "$(python ./spacestatus.py)" = "False" ]
then # test on false, so in case of network fail, it defaults to playing
sleep 60
else
ls ~/*mp4 |
2015-04-08 22:16:20 +02:00
while read video
do
omxplayer "$video" </dev/null
sleep 2
2015-04-08 22:16:20 +02:00
done
fi
done