Hello, I installed freevo last month and I'm very happy with it. It's a very nice program and has evolved quite well. Good work to all developers and beta testers.
I have a little problem with mplayer parameters.
I wish to have different configurations of mplayer depending on the number
of channels of the stream being played.
I suppose it is not possible to do in the 1.4.1 stable version. �It is
possible to do in the CVS version? I think it can be a nice addition to be
able to change mplayer sound options depending on the number of channels of
the stream.
What I do right now is to use a wrapper script that pass the audio options to
mplayer depending on the number of channels it detects.
If the stream is stereo I use mplayer's filters to enhance the sound using the
rest of the speakers of my 5.1 system.
If the stream is already 6 channels I play as is.
The script is as follows:
---------------------------- Cut -----------------------------------
#!/bin/sh
LC_ALL=C
PARAM_1="-channels 6 -format 16 -af
pan=5:1:0:0:0:0:0:1:0:0:0:1:0:0:0:0:0:1:0:0:0:0.5:0.5:0:0:0,sub=60:5"
PARAM_2=$PARAM_1
PARAM_6="-channels 6 -format 16"
NUMCHAN=`mplayer -channels 6 -vo null -ao null -frames 0 -identify "$@" 2>/dev/null |
grep "^ID_AUDIO_NCH=" | cut -c 14-`
[ "xxx$NUMCHAN" = "xxx" ] && \
echo "No stream or invalid number of channels" || \
echo "Stream has $NUMCHAN channels"
case "$NUMCHAN" in
1) PARAM=$PARAM_1 ;;
2) PARAM=$PARAM_2 ;;
6) PARAM=$PARAM_6 ;;
esac
echo "[EXEC] mplayer $PARAM $@"
mplayer $PARAM "$@"
----------------------------- Paste --------------------------------------
--
Ahora nosotros somos los cuervos que rompen el silencio...
signature.asc
Description: Digital signature
