Join multiple M4V to one file (maybe MKV?)
If you have ffmpeg installed, see this article that basically says to create a file that has all of the names, or to use the following command

  Concat Protocol

ffmpeg -i 'concat:input1|input2' -codec copy output


Or 

 Concat Video Filter 

ffmpeg -i opening.mkv -i episode.mkv -i ending.mkv \
 -filter_complex '[0:0] [0:1] [1:0] [1:1] [2:0] [2:1] concat=n=3:v=1:a=1 [v] [a]' \
-map '[v]' -map '[a]' output.mkv


Or

Concat Demuxer

$ cat mylist.txt
file '/path/to/file1'
file '/path/to/file2'
file '/path/to/file3'

$ ffmpeg -f concat -i mylist.txt -c copy output


Which one to use

concat protocol: use with formats that support file level concatenation (MPEG-1, MPEG-2 PS, DV).

concat filter: use if you need to re-encode such as when applying filters.

concat demuxer: use when you want to avoid a re-encode and your format does not support file level concatenation.
If in doubt try the concat demuxer.

When in Doubt, choose Demuxer

This article was originally published here

Also, see http://ffmpeg.org/faq.html#How-can-I-join-video-files_003f