2005-08-18 20:00:57 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Author: Jonas Jermann
|
|
|
|
# Description: A hack to allow mencoder to encode from an audio only file
|
|
|
|
|
2008-07-07 06:47:01 +00:00
|
|
|
if [ "$1" = "" ]; then
|
2005-08-18 20:00:57 +00:00
|
|
|
echo "Usage: $0 <\"input file\"> <\"output file\"> <\"options\">"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2006-03-22 11:26:27 +00:00
|
|
|
options=${3:-"-oac mp3lame"}
|
2009-05-13 02:58:57 +00:00
|
|
|
|
2006-03-21 06:09:32 +00:00
|
|
|
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
|