Windows 7 – Joining .mp4 Files Together Using The Command Line


I was looking for some freeware to join two .mp4 files together (because VirtualDub would not do it) and I stumbled across a handy command line option.

Open a command prompt and type something similar to this:

copy /b "C:\File.mp4" + "C:\File1.mp4" CombinedFile.mp4

This is great and simple option – and no installation required!

Source: http://forums.whirlpool.net.au/archive/1375818

32 thoughts on “Windows 7 – Joining .mp4 Files Together Using The Command Line

  1. WORKS LIKE A CHARM………!!!!!!!!!
    All we need to do is :

    Open the command as an administrator.
    Then open the folder via command where the files (you want to join) are present.
    After which, run the command :
    copy /b “filename.mp4” + “filename.mp4” + “filename.mp4” Result.mp4

  2. I guess that proves Charms don’t work since the files are appended into one larger file BUT when playing the larger .mp4 file with both VLC and Windows Media Player the video stops playing at the end of the FIRST file to be concatenated. What good is that? I want it to continue playing to the end of the last file concatenated. That was the whole purpose of this excersize.

  3. Is there any way to automate this process? I have nineteen folders each with 110 mp4 files to concatenate. The folders contain names like 20100420_1.mp4, 20100420_2.mp4, 20100420_3.mp4….etc

    You can imagine how long and tiring it could take to type all 2090 files!

  4. This didn’t work for me. It only copied the first into the result. (The combined file still has the filesize of both combined though for some reason. It just only plays up to the end of the first one.)

    1. I’m assuming that both files are the same resolution? I haven’t used this technique a whole lot – but I have not had any issues with it.

    2. Just tested myself. This trick only works on transport stream files, like MTS, that have been cut by a camera for file size purposes. MP4 files include a header that has index information, which includes the total runtime of the video. When you use the “copy xxx.xxx /b” command, the OS will blindly stitch the first bits of the 2nd video to the last bits of the first, without changing any data (just running the 1111s and 0000s together). What that means is when you play your new “combined” video, the player/editor first reads the header and gets the index information for only the first file in the series, since it was the first data added. The indexes for the 2nd, 3rd, and so on videos are buried improperly in the binary data in the middle of the new file, and useless.

  5. That command only works for .mpg files that have audio built into the video stream.
    For containers such as .avi & .mp4 you have to use a video editing tool in Windows or in Linux you can use Mencoder “mencoder file1.avi file2.avi -ovc copy -oac copy -o newfile.avi”.
    Not sure if that works for mp4.

  6. Didn’t work with me, just the result file have total size of separated files but when play it, it is only the first file šŸ˜¦
    Thanks for the effort

  7. I too tried this with several mp4 files all identical spec and and origin etc. I ended up with a file the size of all the sum parts but as with others only plays the first added file. Any ideas?

  8. Fastest way to do this is to convert them to MPG using HandBrake then concatenate, then reconvert them to MP4 using Handbrake if you need MP4. So hence, I left them all separate šŸ™‚

  9. Hi Guys,

    I tried to do this, but it keeps telling me “access denied” whenever I try and enter the file path.

    What’s the exact command I should enter? If you don’t mind please just copy/paste exactly what command you used.

    Thanks

    1. Hi Solomon, the command is just what was posted – only the file names need to be changes. I have found that it doesn’t work for all files that I try to join however.

  10. Actually none of the methods here work. The windows command line for combining the files combines them but the index only plays the first file when you replay the video. The VLC method referenced here worked but the audio and video were out of sync and only got worse as the video length increases. After about 2 minutes it is unusable and looks like an old Japanese Godzilla movie. I am ashamed and dismayed that using a windows machine it could possibly be so difficult to do the simple task of combining video clips. I also tried Handbrake. It combined them but the video was just a black screen.
    For the love of God does anyone know how to combine multiple .mp4 files on a Windows machine?

  11. This method does not work for mp4 files, since they possess header/footer data about the clip, you’ll end up with a concatenated file the size of the combined files, but most video players will only play the first clip.

    One scriptable, lightweight solution without re-encoding the files is using FFMPEG (https://www.ffmpeg.org). The batch script below parses the folder of the batch script and concatenates them appropriately:

    (for %%i in (*.mp4) do @echo file ‘%%i’) > mylist.txt
    “C:\ffmpeg\bin\ffmpeg.exe” -f concat -safe 0 -i mylist.txt -c copy “Output.mp4”

  12. Try Joyoshare Video Joiner. It is easier to use than the Windows command line. And also, it can help to join multiple MP4 files together without quality loss.

Leave a comment