#!/bin/bash
# Usage: mp42wav filename.mp4
# Use MPlayer to dump filename.mp4 to audiodump.wav
mplayer "$1" -ao pcm
# Move audiodump.wave to filename.wav
mv "audiodump.wav" "${1%.mp4}.wav"
# This has two purposes. One it announces via a beep that we're done.
# Two it switches MPlayer back to the OSS sounddriver.
mplayer /usr/share/sounds/Beep.ogg -ao oss