lpn1160
9th August 2006, 23:03
I wrote this little script, but what I would like to do is get the crop values from mplayers -vf cropdetect and put those values in the script. Something like this
mplayers $1 -vf cropdetect
[CROP] Crop area: X: 1..462 Y: 43..432 (-vf crop=448:464:8:8).0
my script:
if [ -z "$1" ]; then
echo "Usage: No inputfile outputfiles <file> [<file> ...]"
exit 1
fi
mplayer $1 -hardframedrop -vc dummy -vo null -ao pcm:file=audio.wav ; normalize --peak -v -T 0.2 audio.wav ; oggenc -q 3.5 audio.wav ; mencoder $1 -o $2.avi -of avi -ovc lavc -ffourcc XVID -lavcopts vcodec=mpeg4:vbitrate=1500:vmax_b_frames=2:mpeg_quant:mbd=1:keyint=150:v4mv -vf ivtc,crop=448:464:8:8,scale=512:384 -nosound -ofps 24000/1001 -sws 9 ; mkvmerge -o $2.mkv $2.avi audio.ogg && rm $2.avi ; rm audio.ogg ; rm audio.wav
clear
exit 0
any insight would be well appreciated, BTW, I just barely get by on shell scripting, so if this needs any perl, or awk just try and point me to a good guide as I have just started reading up on them and am really weak
Thanks all sooooo much
mplayers $1 -vf cropdetect
[CROP] Crop area: X: 1..462 Y: 43..432 (-vf crop=448:464:8:8).0
my script:
if [ -z "$1" ]; then
echo "Usage: No inputfile outputfiles <file> [<file> ...]"
exit 1
fi
mplayer $1 -hardframedrop -vc dummy -vo null -ao pcm:file=audio.wav ; normalize --peak -v -T 0.2 audio.wav ; oggenc -q 3.5 audio.wav ; mencoder $1 -o $2.avi -of avi -ovc lavc -ffourcc XVID -lavcopts vcodec=mpeg4:vbitrate=1500:vmax_b_frames=2:mpeg_quant:mbd=1:keyint=150:v4mv -vf ivtc,crop=448:464:8:8,scale=512:384 -nosound -ofps 24000/1001 -sws 9 ; mkvmerge -o $2.mkv $2.avi audio.ogg && rm $2.avi ; rm audio.ogg ; rm audio.wav
clear
exit 0
any insight would be well appreciated, BTW, I just barely get by on shell scripting, so if this needs any perl, or awk just try and point me to a good guide as I have just started reading up on them and am really weak
Thanks all sooooo much