#!/bin/bash

### Transcodes the file named in its first arg to the appropriate format for use by eas-detect.
### Sends the result to stdout, and sends all the random mplayer diagnostics to stderr.
###
### Any additional args are args for mplayer (e.g., -really-quiet).

input=$1; shift

mplayer $@ -noconsolecontrols -nojoystick -nolirc -nomouseinput -vc dummy -vo null -af resample=8000:0:0,channels=1 -ao pcm:nowaveheader:file=/dev/fd/3 $input 3>&1 1>&2

# End of file.
