forked from thintux/omxplayer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
omxplayer
executable file
·53 lines (42 loc) · 1.41 KB
/
omxplayer
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
#!/bin/sh
#mount -t nfs -o rsize=32768,wsize=32768,intr 192.168.10.1:/data/video /media
OMXPLAYER="./omxplayer.bin"
FBSET="/usr/sbin/fbset"
FONT="fonts/FreeSans.ttf"
if [ -e /usr/share/fonts/truetype/freefont/FreeSans.ttf ]; then
FONT="/usr/share/fonts/truetype/freefont/FreeSans.ttf"
else
FONT="fonts/FreeSans.ttf"
fi
if [ -e /usrlocal//bin/omxplayer.bin ]; then
OMXPLAYER="/usr/local/bin/omxplayer.bin"
elif [ -e /usr/bin/omxplayer.bin ]; then
OMXPLAYER="/usr/bin/omxplayer.bin"
else
OMXPLAYER="./omxplayer.bin"
fi
if [ -e /usr/local/bin/omxplayer.bin ]; then
export LD_LIBRARY_PATH=/opt/vc/lib:/usr/local/lib:$LD_LIBRARY_PATH
elif [ -e /usr/bin/omxplayer.bin ]; then
export LD_LIBRARY_PATH=/opt/vc/lib:/usr/lib:$LD_LIBRARY_PATH
else
export LD_LIBRARY_PATH=/usr/local/src/omxplayer/ffmpeg_compiled/usr/local/lib:/opt/vc/lib:$LD_LIBRARY_PATH
fi
if [ -e /usr/local/lib/omxplayer ]; then
export LD_LIBRARY_PATH=/opt/vc/lib:/usr/local/lib:$LD_LIBRARY_PATH
elif [ -e /usr/lib/omxplayer ]; then
export LD_LIBRARY_PATH=/opt/vc/lib:/usr/lib/omxplayer:$LD_LIBRARY_PATH
else
export LD_LIBRARY_PATH=$PWD/ffmpeg_compiled/usr/local/lib:/opt/vc/lib:$LD_LIBRARY_PATH
fi
XRES=1920
YRES=1080
if [ -e $FBSET ]; then
echo 0 > /sys/class/vtconsole/vtcon1/bind
fbset -xres 1 -yres 1
fi
$OMXPLAYER --font $FONT "$@"
if [ -e $FBSET ]; then
fbset -xres ${XRES} -yres ${YRES}
echo 1 > /sys/class/vtconsole/vtcon1/bind
fi