view TOOLS/aconvert.sh @ 34799:b1b974133fa1

Avoid repeating mixer error messages from ao. This avoids continuous printing of e.g. "[AO_ALSA] Unable to find simple control 'PCM',0." even after MPlayer switched to software volume control.
author reimar
date Sun, 06 May 2012 09:08:12 +0000
parents 0f1b5b68af32
children
line wrap: on
line source

#!/bin/sh

# Author: Jonas Jermann
# Description: A hack to allow mencoder to encode from an audio only file

if [ "$1" = "" ]; then
    echo "Usage: $0 <\"input file\"> <\"output file\"> <\"options\">"
    exit 0
fi

options=${3:-"-oac mp3lame"}

mencoder -demuxer rawvideo -rawvideo w=1:h=1 -ovc copy -of rawaudio -endpos `mplayer -identify $1 -frames 0 2>&1 | grep ID_LENGTH | cut -d "=" -f 2` -audiofile $1 -o $2 $options $1