From patchwork Sat Jul 2 19:43:04 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: 11934 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 1Dont7-0005QT-RJ for vdr@linuxtv.org; Sat, 02 Jul 2005 21:42:54 +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 D06EA73534 for ; Sat, 2 Jul 2005 12:42:20 -0700 (PDT) Message-ID: <42C6EE48.3080300@syphir.sytes.net> Date: Sat, 02 Jul 2005 12:43:04 -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> <42BEEA3F.8060707@syphir.sytes.net> <42C5BE53.2090405@syphir.sytes.net> <42C696EF.9010507@syphir.sytes.net> <42C6A3E7.2050903@syphir.sytes.net> <42C6E7D7.20904@syphir.sytes.net> In-Reply-To: <42C6E7D7.20904@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: Sat, 02 Jul 2005 19:42:54 -0000 Status: O X-Status: X-Keywords: X-UID: 3396 C.Y.M wrote: > Juri Haberland wrote: > >>"C.Y.M" wrote: >> >> >>>2) Mplayer prefers to default to APID 1 over APID 0 (probably a mplayer problem, >>>not a mplayer plugin problem). >> >> >>For what do you need the AID stuff anyway, now that audio switching >>works? >> > > > I just want the mplayer plugin to default to the primary audio track when > playing back a .vdr file. The way it is now, if I dont specify AID 0, it will > always default to the secondary audio track (if it exists) when playing back > .vdr files. > With the latest patch to mplayer, the following changes to mplayer.sh work for me.. :) Thanks. Of course more file type cases should be added (like the one for AVI) if you want to use the default AID configuration. Now I can use mplayers default AID auto detection, or I can set the AID of my choice. C. --- mplayer.sh 2004-11-06 13:00:00.000000000 -0800 +++ /etc/vdr/plugins/mplayer.sh 2005-07-02 12:30:33.000000000 -0700 @@ -178,7 +178,7 @@ if test -z "$VO"; then errorcfg VO; exit; else debugvar VO "$VO"; fi if test -z "$AO"; then errorcfg AO; exit; else debugvar AO "$AO"; fi - AOUT="-ao $AO" + AOUT="-ao $AO $AID" if test -z $CACHE; then echolog "*** Option CACHE not set in config file - calling mplayer without Cache!" @@ -481,7 +481,16 @@ declare ORIG_FPS NEW_FPS ORIG_ASPECT VIDEO_FORMAT AUDIO_CODEC declare CMDLINE AOUT REMOTE USERDEF SUFFIX declare FILE="$1" -declare SLAVE="$2" +declare DETECT="1" +while shift; do + if [ "$1" = "SLAVE" ]; then + declare SLAVE="$1" + elif [ "$1" = "AID" ]; then + declare AID="-aid $2" + declare DETECT="0" + shift + fi +done declare -a XResPAL[0] declare -a XResNTSC[0] declare FDSTR="" @@ -540,11 +549,16 @@ choosebesty if test $NEW_X -eq 0 -o $NEW_Y -eq 0; then echolog "*** FATAL: Illegal Resolution ..."; exit; fi + if test $DETECT == "0" -a \( $VIDEO_FORMAT == "DIV3" -o $VIDEO_FORMAT == "XVID" \) ; then + echolog "*** INFO: AVI file format detected. Setting AID to 1" + AOUT="-ao $AO -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" else