#!/bin/bash add_mp3() { echo "*** fIrINg uP bLu3t00th pR3sent4ti0n t00l[tm] ***" mencoder in.avi -audiofile music.mp3 -oac lavc -lavcopts acodec=mp3 -ovc \ lavc -lavcopts vcodec=mpeg4:autoaspect -o out.avi } to_win() { echo "*** Encode $1 with msmpeg4 codec (output: $2)" if ! [ -f $1 ] ; then echo "Input file $1 does not exist!"; exit 1; fi if [ -e $2 ] ; then echo "Output file $2 exist!"; exit 1; fi mencoder $1 -o $2 -oac copy -ovc lavc -lavcopts vcodec=msmpeg4 } merge_avi() { /usr/bin/avimerge } add_front_title() { memcoder "mf://*.png" -mf type=png:fps=2 -ovc lavc -lavcopts vco dec=msmpeg4 -oac copy -o simu_msmpeg4.avi } checkpath() { if [ ! -e $RFCOMMPATH ] ; then echo -e "Command rfcomm ($RFCOMMPATH) not found!\n" exit 1 fi } usage() { echo "Usage: `basename $0` targets" echo "Targets" echo " towin input.avi output.avi" exit 1 } if [ ! "$1" ] ; then usage fi case "$1" in towin) if ! [[ $# -eq 3 ]] ; then echo "$0 $1 input.avi output.avi"; exit 1; fi to_win $2 $3 ;; *) usage ;; esac