Batch convert MKV to MP4 using ffmpeg

I had a bunch of files in mkv format that I needed to convert to mp4 format so that minidlna could serve them to my Xbox 360. Here’s how they can be converted in batch using ffmpeg.
for f in *.mkv; do 
ffmpeg -i "$fn.mkv" -vcodec copy -acodec aac -ac 2 -strict experimental "$fn.mp4";
I used the following pages as resources: