It requires you have ffmpeg installed on your mac (change the path to match wherever you installed ffmpeg):
------
#!/bin/bash
echo $1
NAME=`echo $1| rev | cut -d. -f2- |rev`
echo $NAME
/opt/local/binary_downloads/ffmpeg -i $1 -vcodec copy -acodec copy $NAME.m4v
------
Example usage would be, "./convert-2-m4v.sh my-movie.mkv".
That would produce a file named my-movie.m4v .