From patchwork Sun Jun 26 17:47:43 2005 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "C.Y.M" X-Patchwork-Id: 11923 Received: from c-24-10-6-146.hsd1.ca.comcast.net ([24.10.6.146] helo=nofear.bounceme.net) by www.linuxtv.org with esmtp (Exim 4.34) id 1DmbEp-0006Vz-L7 for vdr@linuxtv.org; Sun, 26 Jun 2005 19:48:12 +0200 Received: from [10.1.1.66] (hades [10.1.1.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by nofear.bounceme.net (Postfix) with ESMTP id 1BB2373534 for ; Sun, 26 Jun 2005 10:47:39 -0700 (PDT) Message-ID: <42BEEA3F.8060707@syphir.sytes.net> Date: Sun, 26 Jun 2005 10:47:43 -0700 From: "C.Y.M" Organization: CooLNeT User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Klaus Schmidinger's VDR Subject: Re: [vdr] mplayer.sh and AID 0 References: <42BED1B2.4050301@syphir.sytes.net> In-Reply-To: <42BED1B2.4050301@syphir.sytes.net> X-Enigmail-Version: 0.92.0.0 X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: syphir@syphir.sytes.net, Klaus Schmidinger's VDR List-Id: Klaus Schmidinger's VDR List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Jun 2005 17:48:12 -0000 Status: O X-Status: X-Keywords: X-UID: 3257 C.Y.M wrote: > I was just debugging mplayer.sh because I could not get it to play a .vdr file > with an audio track set to "0", then I realized that if the AID is set to 0, the > mplayer plugin does not actually specify 0 for the AID track (it just leaves it > blank). The following changes to mplayer.sh fix the problem. > > while shift; do > if [ "$1" = "SLAVE" ]; then > declare SLAVE="$1" > elif [ "$1" = "AID" ]; then > declare AID="-aid $2" > shift > fi > if [ "$AID" = "" ]; then > declare AID="-aid 0" > fi > done > Here is a patch for mplayer.sh-0.8.6 which fixes the AID problem for "-aid 0" and also automatically increments the AID by 1 when an AVI is detected. There was also a video resolution missing from the NTSC "direct video" detection. Regards, C. --- plugins/mplayer.sh.orig 2004-11-06 13:00:00.000000000 -0800 +++ plugins/mplayer.sh 2005-06-26 10:16:27.000000000 -0700 @@ -481,7 +481,17 @@ declare ORIG_FPS NEW_FPS ORIG_ASPECT VIDEO_FORMAT AUDIO_CODEC declare CMDLINE AOUT REMOTE USERDEF SUFFIX declare FILE="$1" -declare SLAVE="$2" +while shift; do + if [ "$1" = "SLAVE" ]; then + declare SLAVE="$1" + elif [ "$1" = "AID" ]; then + declare AID="$2" + shift + fi + if [ "$AID" = "" ]; then + declare AID="0" + fi +done declare -a XResPAL[0] declare -a XResNTSC[0] declare FDSTR="" @@ -540,15 +550,20 @@ choosebesty if test $NEW_X -eq 0 -o $NEW_Y -eq 0; then echolog "*** FATAL: Illegal Resolution ..."; exit; fi + if test $VIDEO_FORMAT == "DIV3"; then + echolog "*** INFO: AVI detected. Increasing AID by 1" + AID=$(($AID+1)) + fi + if test $MPEG_DIRECT == "true" -a \( $VIDEO_FORMAT == "0x10000001" -o $VIDEO_FORMAT == "0x10000002" \) -a \( \ \( $PAL -a $NEW_FPS == "25" -a \( \( $ORIG_X == "352" -a $ORIG_Y == "288" \) -o \( $ORIG_Y == "576" -a \ \( $ORIG_X == "352" -o $ORIG_X == "480" -o $ORIG_X == "528" -o $ORIG_X == "544" -o $ORIG_X == "688" -o $ORIG_X == "704" -o $ORIG_X == "720" \) \) \) \) -o \ \( $NTSC -a $NEW_FPS == "30" -a \( \( $ORIG_X == "352" -a $ORIG_Y == "240" \) -o \( $ORIG_Y == "480" -a \ - \( $ORIG_X == "352" -o $ORIG_X == "480" -o $ORIG_X == "512" -o $ORIG_X == "640" -o $ORIG_X == "704" -o $ORIG_X == "720" \) \) \) \) \ + \( $ORIG_X == "352" -o $ORIG_X == "480" -o $ORIG_X == "512" -o $ORIG_X == "544" -o $ORIG_X == "640" -o $ORIG_X == "704" -o $ORIG_X == "720" \) \) \) \) \ \) ; then - CMDLINE="$MPLAYER -vo $VO $AOUT $FDSTR $CACHESTR $REMOTE $USERDEF" + CMDLINE="$MPLAYER -vo $VO $AOUT -aid $AID $FDSTR $CACHESTR $REMOTE $USERDEF" else - CMDLINE="$MPLAYER -vo $VO $AOUT -vop $VOP:$NEW_FPS,expand=$NEW_X:$REAL_Y:-1:-1:1,scale=$NEW_X:${NEW_Y}${DETC} $SPEED $FDSTR $CACHESTR $REMOTE $SUBTITLES $USERDEF $FORCEIDX" + CMDLINE="$MPLAYER -vo $VO $AOUT -aid $AID -vop $VOP:$NEW_FPS,expand=$NEW_X:$REAL_Y:-1:-1:1,scale=$NEW_X:${NEW_Y}${DETC} $SPEED $FDSTR $CACHESTR $REMOTE $SUBTITLES $USERDEF $FORCEIDX" fi fi