From 0e7005fcc7483c01aa102fbea358c5ac65a48d62 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 6 Apr 2010 16:13:08 +0200 Subject: hello world --- plugins/mp3/examples/mplayer.sh.example | 48 +++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 plugins/mp3/examples/mplayer.sh.example (limited to 'plugins/mp3/examples/mplayer.sh.example') diff --git a/plugins/mp3/examples/mplayer.sh.example b/plugins/mp3/examples/mplayer.sh.example new file mode 100644 index 0000000..a3011eb --- /dev/null +++ b/plugins/mp3/examples/mplayer.sh.example @@ -0,0 +1,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 " 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" + -- cgit v1.2.3