Végül ez lett belőle:
#!/bin/bash
out_ext='mp4'
conv() {
echo "Converting $1 to $2"
ffmpeg -nostdin -i "$1" -an -vcodec copy "$2" &>/dev/null
}
while read; do
in_ext="`tr '[:upper:]' '[:lower:]' <<<"${REPLY##*.}"`"
[ -f "$REPLY" -a x"$in_ext" = x'mov' ] || continue
outfile="${REPLY%.*}.$out_ext"
conv "$REPLY" "$outfile"
done < <(ls -1)
exit 0
tr '[:lower:]' '[:upper:]' <<<locsemege
LOCSEMEGE