: if [ ! "$1" ]; then exit 1 fi # Some defaults, there are other modifables that you # can pass into the environment. e.g. # # aid=2 delay=0.2 mkmenpilot ... # scale=${scale:=320:-2} br=${br:=192} expand=${expand:=320:240} # # filenames are arguments can be full pathnames to (presumably) # mpeg2 files (single vob rips from mplayer). # # e.g. # mplayer dvd://1 -dumpstream -dumpfile mpeg-rip.vob # # Output is XVID format avi container. # Tested on Insignia Pilot NS-4V24 # for file in "$@"; do dname=`dirname $file` bname=`basename $file` bbname=`expr "$bname" : '\(.*\)\..*'` bbname=${bbname:=$bname} if [ "$DEBUG" ]; then echo mencoder "${file}" -ovc lavc -lavcopts vcodec=mpeg4 -oac mp3lame -lameopts cbr:br=${br} -noodml -vf-add scale=$scale${expand:+,expand=$expand}${crop:+,crop=$crop} ${aid:+-aid $aid} ${delay:+-delay $delay} -ffourcc XVID -o "${bbname}.avi" else mencoder "${file}" -ovc lavc -lavcopts vcodec=mpeg4 -oac mp3lame -lameopts cbr:br=${br} -noodml -vf-add scale=$scale${expand:+,expand=$expand}${crop:+,crop=$crop} ${aid:+-aid $aid} ${delay:+-delay $delay} -ffourcc XVID -o "${bbname}.avi" fi done