I know this is an old thread, but I thought it was worth resurrecting... I just had just purchased LOTR Extended box set (bluray) which has the movie spanned across two disks. I convert all my movies to M4V for streaming to my ATV and have been looking long and hard for a way to merge them without much success. I have QT Pro but that didn't work for me. It acted like it worked, but as soon as it was done saving, the file it created, for whatever reason got truncated down to 32 bytes and was useless.
After days of trying, I FINALLY figured out how to get this done while maintaining the chapters AND AC3 audio without having to do any actual re-encoding. A few notes.
1) I used windows based programs (all free)
2) This method requires the files to be in MKV format for the merging process. If you haven't already encoded the original disks (using handbrake) do so using the MKV container, it will save you a step. (don't worry, it will be remuxed into a M4V container later)
Programs Needed:
XMedia Recode
MKVMerge/MKVToolnix
I'll describe the processes assuming you already have the encoded M4V files.
1A) Launch XMedia Recode and drag your M4V files into the queue
1B) Select the 1st file in the queue. In the FORMAT tab chose the CUSTOM profile, MATROSKA VIDEO format and MKV file extention. Make sure Output Stream type is set to "video and audio"
1C) In the VIDEO tab. Make sure MODE is set to COPY. If you fail to do this step, the video will get re-encoded instead of simply remuxed into a different container.
1D) In the AUDIO tab, select COPY for the mode and AC3 for the codec (assuming you're working with an AC3 stream) You may also have more than one audio stream, make sure you select the stream and choose your settings accordingly.
1E) Click on "add job" button
1F) Repeat these steps for the second video. It is imperative that the settings you select for both segments are identical or the merging processes in "Step 2" will fail
1G) Click the "ENCODE" button. You can chance your destination at the bottom. The process goes a bit faster if the input and output files are on two separate drives.
(The entire processes above can be skipped if you encode directly to MKV from the originals)
2A) Once the above processes is done, you should have 2 MKV files (or more if you're combining more than 2 segments) make sure the file names are identical with a 001 appended to the first segment and 002 to the second.
2B) Launch mkvmerge. Click and drag the first segment into the "input files" queue. Click on APPEND button and select the second segment.
2C) Click on "start muxing" Once this processes completes you should have a 3rd MKV which is (almost) the finished product. I like to open the file and make sure it's working and audio is in sync, then proceed to the final step (3)
3A) Open XMedia Recode and load the new MKV file created in the previous step into the queue.
3B) Select APPLE for profile and sub profile most suitable for your application.
3C) In the VIDEO tab set MODE to COPY
3D) In the AUDIO tab, select the audio stream. Set MODE to COPY and CODEC to AC3.
3E) Click on ADD JOB and then ENCODE
Don't let the "encode" button frighten you, as long as you selected "copy" in the video tab, it will not processes the video but simply change the container to M4V.
It's somewhat of a processes, but that should get you a merged M4V file with AC3 audio and chapters intact. Unfortunately after several days of searching and trying different apps, I was unable to find a program that successfully merged M4V files. QT came close only to deflate me at the end. MPEG Streamclip (another suggested app) came even closer, it merged the video perfectly but completely stripped out the audio.