-
Notifications
You must be signed in to change notification settings - Fork 1
/
autoplay.sh
executable file
·56 lines (44 loc) · 1.88 KB
/
autoplay.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/env bash
PLAYLIST="${1}"
#Sets the playlist to play:
# TEST (default)
# DEFAULT
# MOVIES
# C64
##Turns off cursor blink on display
setterm -cursor off > /dev/tty1
##Clear the term before firing up omxplayer
clear > /dev/tty1
if [[ -z "${PLAYLIST}" || "${PLAYLIST}" == "TEST" ]] ; then
omxplayer --loop --no-osd -z --no-keys --aspect-mode stretch /home/pi/Defcon28-Badge/videos/ellctor_loop.mp4 > /dev/null 2>&1 &
clear > /dev/tty1
elif [[ "${PLAYLIST}" == "DEFAULT" ]] ; then
echo "Default Playlist"
## Play some videos
while true; do
clear > /dev/tty0
omxplayer --fps 24 --no-osd -z --aspect-mode stretch /home/pi/Defcon28-Badge/videos/default.mp4
clear > /dev/tty0
omxplayer --fps 24 --no-osd -z --aspect-mode stretch /home/pi/Defcon28-Badge/videos/DC_Movie.mp4
clear > /dev/tty0
omxplayer --fps 24 --no-osd -z --aspect-mode stretch /home/pi/Defcon28-Badge/videos/DC64.mp4
clear > /dev/tty0
done
# setterm -cursor on > /dev/tty0
elif [[ "${PLAYLIST}" == "MOVIES" ]] ; then
echo "Movies"
omxplayer --loop --fps 24 --no-osd -z --aspect-mode stretch /home/pi/Defcon28-Badge/videos/DC_Movie.mp4 &
elif [[ "${PLAYLIST}" == "C64" ]] ; then
echo "C64"
omxplayer --loop --fps 24 --no-osd -z --aspect-mode stretch /home/pi/Defcon28-Badge/videos/DC64.mp4 &
elif [[ "${PLAYLIST}" == "DCZIA" ]] ; then
clear > /dev/tty1
omxplayer --loop --no-osd -z --no-keys --aspect-mode stretch /home/pi/Defcon28-Badge/videos/dczia2020.m4v > /dev/null 2>&1 &
elif [[ "${PLAYLIST}" == "DCZIA_W" ]] ; then
clear > /dev/tty1
omxplayer --loop --no-osd -z --no-keys --aspect-mode stretch /home/pi/Defcon28-Badge/videos/dczia2020_wide.m4v > /dev/null 2>&1 &
elif [[ "${PLAYLIST}" == "ALL" ]] ; then
echo "ALL"
clear > /dev/tty1
for a in /home/pi/Defcon28-Badge/videos/* ; do omxplayer --no-osd -z --no-keys --aspect-mode stretch $a > /dev/null 2>&1 ; clear > /dev/tty1 ; done
fi