Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] let mplayer.sh expand movies



hi,

i've got many movies that aren't full pal size, so mplayer needs to expand them.
besides, as the mplayer plugin only allows the selection of one file, i added a playlist mode:

sum your files together in a .pls file, e.g. like that:
cd /video/dvd/fast_and_furious/
find * -iname '*.vob' > fast_and_furious.pls

all files listed in 'fast_and_furious.pls' get then played by mplayer.

here's the modified script:

#!/bin/bash
#
# This script is called from VDR to start MPlayer
#
# argument 1: the file to play
# argument 2: the phrase SLAVE if SlaveMode is enabled

# mplayer options for SlaveMode
SLAVE="-slave -quiet -nolirc"

##############################################################################

if [ "$2" != "SLAVE" ]; then SLAVE=""; fi


FILES="$1"
## playlist files have to be of same kind, may only contain relative path
names
case "$1" in *.pls)
        FILES=""
        for PART in `cat $1`; do FILES="$FILES `dirname $1`/$PART"; done
        ;;
esac

## now the options for mplayer
case "$FILES" in
(*.avi | *.AVI)
        OPTS="-vop expand=720:576 -af volume=+10:0:1:0"
        ;;
(*.vob | *.VOB)
        OPTS="-af volume=+20:0:1:0"
        ;;
(*.ogm | *.OGM)
        OPTS="-vop expand=720:576 -af volume=+10:0:1:0"
        ;;
*)
        echo "file $1 has unknown video file format"
        echo "edit mplayer.sh to support this file type"
        exit 1
        ;;
esac

logger mplayer.sh $1 $2
exec mplayer -vo mpegpes -ao mpegpes $SLAVE $OPTS $FILES

#eof mplayer.sh


-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index