################################
#####MP4,MKV conversion to AVI##########
################################
################################
##!/bin/bash########################
################################
ls -1 NotConverted/* | while read ark
do
filenamez=$(basename $ark)
filename=${filenamez%.*}
filename=${filename}
#echo $name
clear
echo $filename
echo $filenamez
sleep 2
if [ -e movies/$filename ];thenclearecho "File $filename exists"
else
clear
echo "$filename does not exist!"#ffmpeg -acodec copy -vcodec copy -i $filenamez
$filename.avimencoder NotConverted/$filenamez -o movies/$filename.avi -ovc lavc -
lavcopts vcodec=mpeg4:vbitrate=5000 -oac mp3lame -lameopts mode=2:cbr:br=128:vol=5
fi
sleep 2
done
Create those 2 folders. Not Converted folder contains all your movies that needed to be converted and movies folder contains all output movies that is been converted