blob: a3011eb944531f1b67cb8eff5c6325449e8c346f (
plain)
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
|
#!/bin/bash
#
# This script is called from VDR to start MPlayer
#
# argument 1: the file to play
# argument 2: (optional) the phrase SLAVE if SlaveMode is enabled
# argument 3: (optional) the phrase AID x to select audio stream x
# where to find mplayer
MPLAYER="mplayer"
# mplayer options, -vc will be added below
# add "-lircconf <lircrc>" to enable LIRC support
OPTS="-vo mpegpes"
# mplayer options for SlaveMode
SLAVE="-slave -quiet -nolirc"
#####################
FILE=$1
type=`file "$FILE"`
while shift; do
if [ "$1" = "SLAVE" ]; then
sopt=$SLAVE
elif [ "$1" = "AID" ]; then
aopt="-aid $2"
shift
fi
done
case "$type" in
*AVI*)
VC="ffdivx"
;;
*MPEG*)
VC="mpegpes"
;;
*)
echo "Unknown video file format $type"
echo "Edit mplayer.sh to support this file type"
exit 1
;;
esac
exec $MPLAYER $OPTS -vc $VC $sopt $aopt "$FILE"
|