| Converts wma/mp3 to mp3s using mplayer and lame. I use it to fill up my K700c memory :) #!/bin/bash
#####################
# convwma
# by Yuan GAO (wolf0403)
# convers wma/mp3 to compressed mp3
# depends: mplayer, lame
# copyleft
#####################
SRC=
DST=
TITLE="$TITLE"
ARTIST="$ARTIST"
if [ -n "$DEBUG" ]; then
MPLAYER=echo
LAME=echo
else
MPLAYER=mplayer
LAME=lame
fi
TMPPIPE=".$p"
while [ -a "$TMPPIPE" ]; do
TMPPIPE=".$p"
done
mknod "$TMPPIPE" p
trap "rm -f $TMPPIPE" EXIT
if [ -z "$TITLE" ]; then
echo -n "Title: "
read TITLE_U
TITLE="`echo $TITLE_U | iconv -t gbk`"
fi
if [ -z "$ARTIST" ]; then
echo -n "Artist: "
read ARTIST_U
ARTIST="`echo $ARTIST_U | iconv -t gbk`"
fi
T=
if [ -n "$TITLE" ]; then
T="--tt $TITLE"
fi
A=
if [ -n "$ARTIST" ]; then
A="--ta $ARTIST"
fi
echo "MPLAYER: $MPLAYER"
echo "LAME: $LAME"
echo "TMPPIPE: $TMPPIPE"
echo "SRC: $SRC"
$MPLAYER -aofile $TMPPIPE -ao pcm "$SRC" >/dev/null 2>&1 &
$LAME -h --scale 3 --abr 48 -m m "$T" "$A" "$TMPPIPE" "$DST"
|