my description from another thread...
here's my code:
#!/bin/bash
IFS=$'\n'
function OutputName() {
input=$1
echo $input
input=`echo "$input" | sed -e 's/.[Aa][Vv][Ii]//'`
input=`echo "$input".avi`
output_name=$input
}
if [[ -z "@ARGV" ]]; then
echo "arguements are files to combine"
exit
else
if [[ ! -e $1 ]]; then
echo "no such input video!"
exit
else
first=`find "$1" -printf "%f"`
echo "Input File Found!: $first"
shift
fi
OutputName $first
echo "Output video name will be: "$output_name""
echo
fi
options="--audio-map --force-b-frame --force-unpack --rebuild-index"
appendlist=""
until [ -z "$1" ]
do
# echo "$1"
# echo "$appendlist"
if [[ ! -e $1 ]]; then
echo "no such input video! $1"
exit
else
filename=`find "$1" -printf '"%f"'`
appendlist="$appendlist $options --append $filename"
fi
# echo "$appendlist"
# echo
shift
done
echo "avidemux2_cli --nogui $options --load \"$first\" $appendlist --force-smart --save \"$output_name\" --quit"
thanks for the help!