#!/bin/bash

if [ -z $1 ]
then
    echo "USAGE"
    echo "recode_all_to_mp4.sh '<FileNameOrWildcardFileNames>' <OutputDir>"
	echo "BE SURE TO PUT THE FileNameOrWildCardFileNames INTO QUOTES!"
    exit
fi

inputWildCard=$1
outputDir=$2

inputList=`ls $inputWildCard`

for input in $inputList
do
    inputBaseName=`basename "$input"`
    ffmpeg -i "$input" "$outputDir/$inputBaseName.mp4"
done
