Scriptaki gia metatropi wma se mp3 meso vlc

voger vogernewsletters at yahoo.gr
Sun Sep 2 14:25:50 EEST 2007


Είχα βρεί αυτό στο linuxquestions.org

#!/bin/bash
#
# wma to mp3

function wma2mp3 () {

if [ ! -f "$1" ]; then
  echo "File $1 not found!"
else
  wav=`ls "$1" | sed -e 's/.wma/.wav/' | tr -d "*"`
  mplayer -ao pcm "${1%%.[Ww][Mm][Aa]}.wav" "$1" &&
  mv audiodump.wav "$wav" && unset wav &&
  lame -h -b 192 "${1%%.[Ww][Mm][Aa]}.wav" "${1%%.[Ww][Mm][Aa]}.mp3" &&
  rm -f "${1%%.[Ww][Mm][Aa]}.wav" ||
  echo "There was a problem with the conversion process!"
fi

}

# convert all wma files in directory
if [ $# -eq 1 -a -d "$1" ]; then
  for file in $1/*.[Ww][Mm][Aa]; do
    wma2mp3 "$file"
  done
  exit
fi

# One or more wma files were given
for file in $*; do
  wma2mp3 "$file"
done

# Not enough information
if [ $# -lt 1 ]; then
  echo
  echo "Usage:wma2mp3 myfile.wma"
  echo "wma2mp3 /directory/containing/wma/files"
  echo "wma2mp3 myfile.wma myfile2.wma myfile3.wma"
  # You have to use quotations for the arguement below.
  # Failure to do so will result in only one file being
  # converted. Namely, the first one it comes across...
  echo 'wma2mp3 "*.wma"'
  echo
  echo "For converting .wma's that have spaces in the"
  echo 'name, use the directory option OR "*.wma"'
  echo
  exit
fi

exit
__________________________________________________
Χρησιμοποιείτε Yahoo!;
Βαρεθήκατε τα ενοχλητικά μηνύματα (spam);   Το Yahoo! Mail διαθέτει την καλύτερη δυνατή προστασία κατά των ενοχλητικών μηνυμάτων  
http://mail.yahoo.gr 




More information about the Linux-greek-users mailing list