All pastes #2047983 Raw Edit

david

public text v1 · immutable
#2047983 ·published 2011-04-19 00:21 UTC
rendered paste body
#!/bin/bash# wma2mp3 - converts wma to mp3# by dive #slackware # dave @ unrealize.co.ukfunction convertall{	for i in *.wma 	do		mplayer -vo null -vc null -af resample=44100 -ao pcm:waveheader "$i"		lame --preset extreme audiodump.wav -o "`basename "$i" .wma`.mp3"	done	rm audiodump.wav	exit 0}function convertfile{	mplayer -vo null -vc null -af resample=44100 -ao pcm:waveheader "$1"	lame --preset extreme audiodump.wav -o "`basename "$1" .wma`.mp3"	rm audiodump.wav	exit 0}function usage{    printf "%b\n%b\n%b\n" "wma2mp3: Usage:" \    "wma2mp3 FILE" "If FILE is omitted it will convert all files in current dir."    exit 0} [[ $1 == "-h" || $1 == "--help" ]] && usage[[ $1 != "" ]] && convertfile "$1"convertall