#!/bin/sh if [ -z "${1}" ] || [ -z "${2}" ]; then echo "Usage: wma2ogg file.wma outputfilename [title]" echo "Example: wma2ogg http://ml.gazeta.pl/6/3533/wdr060806.wma woobiedoobie \"Woobie Doobie\"" exit fi mplayer -vo null -vc dummy -af resample=44100 -ao pcm:waveheader "${1}" if oggenc audiodump.wav -o "${2}.ogg" --title "${3}"; then rm audiodump.wav fi