How can I concatenate or merge 2 or more MP4 files, in a final output MP4 file also?

I have tried in the DOS window to use the COPY command (I have read it somewhere) but it doesn't function well.

link|improve this question
Also see superuser.com/questions/43588/… for more information. Not sure if I would classify this question as a duplicate though. – Breakthrough Jul 23 '11 at 13:55
feedback

5 Answers

I'd reccomend usind ffmpeg, which is available for Mac OS X, Linux and Windows.

Here's a good examaple on how to concatenate two movies: http://www.ffmpeg.org/faq.html#SEC27

In the last step, you just need to make sure you make an MP4 container, for the resulting file.

link|improve this answer
As I understand the ffmpeg FAQ answer given, this cannot be done with MP4 (presumably H.264) video, because it's not one of the "privileged formats". – ttarchala Oct 1 '10 at 9:35
@ttarchala: I'd try if it can be done. I've converted into MP4 with FFmpeg before, but never concatenated two movies. Also: I'd like to point out, that FFmpeg has a very fast developement. What didn't work with one version, might work in just the next one. – polemon Oct 1 '10 at 19:57
Not all builds of FFMPEG have MP4 support. For one thing it's a patented technology and arguably it's illegal to distribute MP4 encoders in the USA without paying a fee. However, many builds can do this. – CarlF Sep 23 '11 at 19:25
@CarlF: As for Linux and Mac OS X, this is not an issue, really. The code can be distributed freely, so basically, whoever builds their own FFmpeg, all is good. As for patenting, I'd like to share a comment: I won't find the site off hand right now, but the first patent to expire for AAC (which is partially defined in MPEG-4), is in 2022. And that's just the first one, there's many more that need to expire till it's completely legal... – polemon Sep 25 '11 at 0:45
feedback

MP4Box can do this, though you might want to use a GUI for it like YAMB or My MP4Box GUI. (N.B.: It's not my program personally, that's just the name.) MP4Box binaries for Windows are available from this site.

link|improve this answer
feedback

You would need to use some kind of video editor or comparable program. I've had good luck with avidemux for simple tasks like this.

link|improve this answer
feedback

Update: Just checked avidemux as I had it installed, after reading that other answer. It’s what you are looking for (didn’t think it can do MP4 because of its name…).

I think VirtualDubMod is mp4-capable, I didn’t use it though so I dunno for sure.

You may want to check out MeGUI. It’s a rather complex and feature-rich app and tools.

The tool for embedding in a container (mp4 in your case) is called muxer, that one can probably not concatenate them though.

You can use it in combination with VirtualDub. Virtualdub to concatenate the video streams, and the muxer to make it an mp4 again (without having to reencode).

link|improve this answer
feedback

I'm doing it with mencoder, after having converted them to avi with ffmpeg

here's a simple script, assuming you have 15 files, named 01.mp4 ... 15.mp4

#!/bin/bash
for i in `seq 1 15`;
do
if [ $i -lt 10 ]; then
    j="0$i"
else
    j="$i"
fi

echo converting file $j.avi
ffmpeg -i $j.mp4 $j.avi

echo adding file $j.avi to list
z="$z $j.avi"
done 

echo doing append
mencoder -oac copy -ovc copy $z -o all.avi

cheers

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.