6 comments on “Joining Multiple Videos Into a Single File

  1. Thank you for your helpful tutorial. I’m on the hunt for a simple video-joining solution that works flawlessly every time, or nearly every time, without having to purchase a full-featured video editor like CyberLink PowerDirector or Adobe Premiere Pro. After days of searching, I narrowed down the list of promising possibilities:

    Allok Video Joiner and Fast AVI MPEG Joiner – two closely-related programs
    Avidemux
    Briz Video Joiner, which apparently consolidates Briz AVI Joiner and Briz MPEG Joiner
    MKVToolNix Mkvmerge GUI
    MyMP4Box GUI
    Windows command console’s copy /b command

    Didn’t work for me:

    CAT command – I couldn’t figure out how to download this tool from GNU.org.
    VirtualDub – I couldn’t wrap my mind around this program.
    Concatvids.bat – I had to change the Path to point to C:\Program Files\MKVToolNix. After doing so, Mkvmerge still reported that it couldn’t process my MPG files.

    Future NLE possibility: VideoLAN Movie Creator – seems to be still in Alpha stage.

    I bought Briz Video Joiner, impressed with its ease of use, but I soon discovered that it didn’t work entirely as expected, and decided to keep searching. To test out different options, I tried to join 8 simple MPG video files into one MPG file. Each of the 8 has the same specs (MPEG-2 video, 352 x 240, 29.97 fps, YUV color space, MP2 audio, 44.1 KHz, 2 channels), and each is about 25 MB. The correct length of the concatenated video should be 24 minutes, plus or minus one second.

    While it is still clear in my mind, here is what I discovered.

    The two Allok programs

    Allok Video Joiner allows you to join files with different specs (such as different frame rates, or one AVI file and one MPG file). Video Joiner works fine for joining an AVI and an MPG into an MP4 output file. This involves recompression and is not what I’m looking for. I only want to join files with identical specs. Allok Fast Joiner, on the other hand, requires the input files to have the same specs (same frame rates, frame sizes, and so on).

    Both Allok programs have beautiful interfaces, but seem somewhat dated. Both programs are copyright 2004. I like how they report “Mission accomplished” after joining video files. However, they use some awkward phrases on their website. They are apparently not fluent English speakers.

    Both programs only convert 50% of the input files until you pay for them, but only Allok Video Joiner warns you of this. Interestingly, the two programs break up the source videos at different locations when creating the output video. In other words, they seem to have different definitions of 50%.

    Problems seen in output video after joining two simple MPG clips with Allok Video Joiner:
    High-pitched screech a few seconds before the join point.
    Sound cuts out for a few seconds immediately after the screech and up to the join point.

    Problems seen in output video after joining two simple MPG clips with Allok Fast Joiner:
    Pixelation in the first few seconds
    Ghosting in the first few seconds after the join point (that is, after where the second video starts).

    Avidemux

    Either drag the first clip into the window, then Append each one of the rest using Ctrl-A, or drag all of the clips into the window at the same time.
    The only way that you know that a clip has been appended, as far as I can tell, is that the total time changes accordingly. Avidemux is not as user-friendly as any of the full-featured NLE software.

    Avidemux keeps displaying the annoying message, “There are several files with sequential file names. Should they be all loaded?”
    If you append the second and successive files one at a time, keep clicking NO each time.
    If you drag the clips into the window all at the same time, click NO NO NO NO NO NO NO.
    Either way is maddening, and if you click YES, nothing much seems to change. What does YES do, other than mess up the output file? I tried clicking YES after the first clip, or YES YES YES YES YES YES YES after dragging all of the clips, and both times, the output file had glitches such as incorrect length (30 minutes instead of 24m01s).

    Avidemux seemed to join my MPGs together fine, but the choice of Output Format is ambiguous. If you’re doing a clean copy without recompression, shouldn’t Avidemux automatically detect your container type and output using the same container? I tried AVI, MKV, MPEG-PS, MPEG-TS, and Video Only.

    Strangely, even though my source files are MPG files, AVI Muxer was the only Output Format that produced a flawless output file, although with an AVI filename extension. I also tried specifying MPG when saving the output file, and the resulting MPG file also opened just fine. The output file from AVI Muxer, whether .AVI or .MPG, showed the correct length of time during playback (24m01s).

    MKV Muxer and MPEG-TS both produced an output file with correct length of time and flawless video right to the end, but the audio cut out after the first source clip played; in other words, missing audio from the second video clip onwards.

    MPEG-PS Muxer (ff) – DVD option, reported a problem with my MPGs that they are not compatible with DVD output.
    MPEG-PS Muxer (ff) – free option, took forever and clearly was not copying, but instead was recompressing or transcoding in some way. I stopped Avidemux a few minutes into the process.

    Video Only created the output file almost instantly. The output file had no audio, as expected, but the video was fine right to the end.

    Briz Video Joiner

    Briz Video Joiner always starts with the annoying, misspelled message, “Unable to find an optimum video compressor. We advice to install DivX.”

    Keep the check box checked that says, “Join without recompression”.

    The output file seemed to play just fine, but did not show the correct length of time during playback, instead showing only 3m44s. I tried in three different players – Media Player Classic, SM Player, and VLC. The output file had the correct length (23m59s) in Windows Explorer, the file seemed to contain all of the data from the 8 input clips, and I could seek to any part of the video with the mouse. Only the time was inaccurate. If I were to seek to any spot in the output video with the mouse, the time would always show something below 3:44 even when it should be 6 or 7 min into the video, almost like the time was moving in slow-motion. I don’t know what is special about 3m44s or where it is coming from. The first video clip is 2 min 56 sec long, so the hypothesis that it’s somehow related to the join point between the first and second clip seems not to be the case.

    When joining two AVIs that have different specs (different frame rates, frame sizes, and audio), the output video played fine, but the audio didn’t match up after the join point (when the second video clip started to play). Audio from the first video extended past the end of the first video into the second one.

    When joining an AVI and an MPG, the video and audio were completely screwed up.

    MKVToolNix Mkvmerge GUI

    This is a fantastic program but is not so user-friendly. I wasn’t sure how to create a concatenated video. The button on the bottom of the window says Start Muxing, but am I really muxing, if I’m simply joining video clips with no transcoding involved? When I selected the 8 files and used Add, the result was a 250 MB file that only plays the first clip, and was 3m44s. When I selected the first file and then used Append for files 2 to 8, the result was a 250 MB file that played flawlessly.

    MKVToolNix is still working on MKVToolNix GUI. You can click on the icon and see that it is going to be powerful and user-friendly once it’s ready for prime time.

    My MP4Box GUI:

    This program has a gorgeous, K.I.S.S. interface and I wished it had worked. Unfortunately, the output files were broken.

    The output file was appropriately large, but wouldn’t play any further than the end of the first video (2m56s) in the joined file. The sound continued but the video froze. When I tried to seek further into the video, the video and audio both reset to the end of the first video clip (2m56s) in the concatenation.

    Windows command console’s copy /b technique

    Shift-Right-click within a folder and choose “Open command window here”, then enter something like:
    copy /b source1.mpg + source2.mpg + source3.mpg Output.mpg

    For me, this produced the exact same flaw as Briz Video Joiner did. The output file had the entire video and audio, but the length of time was wrong, showing 3 min 44 sec instead of 24m01s.

    SUMMARY

    Flawless results
    Avidemux using AVI Muxer = AVI file, about 243 MB, 24m01s both in Windows Explorer and during playback.
    Mkvmerge GUI = MKV file, about 242 MB, 23m56s both in Windows Explorer and during playback.
    (Which time is the “correct” time, 24m01s or 23m56s? No clue, but it doesn’t really matter; the last frame of each video appears to be identical.)

    Good results, except wrong time displayed during playback
    Briz Video Joiner = MPG file, about 248 MB, 23m59s in Windows Explorer, but video playback software consistently shows 3m44s anomaly.
    Windows command console’s copy /b command = MPG file, exactly the same size as the output from Briz, and the exact same time anomaly.

    Poor results
    Allok Video Joiner – screeching and sound cutting out.
    Allok Fast Joiner – pixelation and ghosting.
    Avidemux using MKV Muxer or MPEG-TS Muxer = MKV file, 24m01s, about 216 MB, but NO SOUND after the first joined clip in the concatenation.
    Avidemux using MPEG-PS Muxer = either didn’t work at all, or recompressed instead of doing pure concatenation.
    My MP4Box GUI = MP4 file, unknown time length in Windows Explorer. Video playback software shows 13m6s, but the video stops at 2m56s which happens to be the exact length of the first joined clip. Seek doesn’t work. Something wrong with indexing?

  2. Follow up:

    After watching my concatenated MPG videos closely, I’ve discovered that the ones created with Avidemux using the AVI Muxer (Copy Video Output, Copy Audio Output, and AVI Muxer as the Output Format), which I initially thought were flawless, have audio and video slightly out of sync. Specifically, the audio is delayed a fraction of a second behind the video. There is probably a way to fix this using some kind of offset feature in Avidemux, but I’d rather have a solution that doesn’t require excessive tinkering with obscure settings.

    So, for me at least, I now only have one known way to easily create flawless concatenations of MPG files: MKVToolNix’s Mkvmerge GUI.

    I’ve tried Avidemux and MKVToolNix’s Mkvmerge GUI repeatedly at least a dozen times for each, and each time on a batch of MPG files that have different specs from the previous batch (different frame rates and different resolutions, for example). Each time, consistently, Avidemux’s output has the microsecond audio delay, whereas Mkvmerge’s output is, as far as I can tell, flawless.

    I will try the various video-joining methods on AVI, MOV, MP4, and other formats next, to see if there are any differences in the quality of the output files compared to joining MPG files.

    I’d be interested to see if you or anyone reading your work-in-progress tutorial can try Mkvmerge GUI and see how your results compare. I really like how Mkvmerge GUI does not require you to jump through hoops to concatenate video files. The program looks intimidating at first, but it is quickly becoming one of my favorites. Here is the easiest way I’ve found for joining video files with Mkvmerge GUI in Windows 7; the steps should be similar for other versions of Windows:

    Download and install MKVToolNix for Windows from http://www.videohelp.com/tools/MKVtoolnix. (Since I have Win 7 64-bit, I downloaded the file called “mkvtoolnix amd64 7.5.0 setup”.)
    Click on Start and type “shell:sendto” (without the quotation marks) in the search box.
    This will open the Windows SendTo folder.
    Click on Start – Programs – MKVToolNix.
    Right-click on Mkvmerge GUI and select Copy.
    Right-click in the SendTo folder and select Paste.
    Open the folder where you have your video files with identical specs, that you want to join together into one video file.
    Right-click on the first video file in the series and a context menu appears.
    Scroll down to Send To and select Mkvmerge GUI.
    Mkvmerge GUI opens up, and your first video file will appear in the “Input files” tab.
    Click on Append.
    Mkvmerge is smart enough to open the same folder where the rest of your video files are, that belong with the first one.
    Select the second one with your left-mouse button, hold down the Shift key, select the last one, and click Open, to append the rest of the files to the first one. (Make sure that they appear in the proper order.)
    Confirm the Output filename and click the “Start muxing” button.
    Mission accomplished!

    Is there an easier way to accomplish the same task using Mkvmerge at the command console (Shift-right-click in the video folder, open a command prompt, and type in a command string using Mkvmerge)? I try to avoid the command prompt whenever possible, but if there is a command prompt method that is even easier than the method I just described above, that would be cool.

    • Thanks for posting your experiences Erik.

      I too have problems with Avidemux. I seem to get mixed results. For a long time I used it for concatenating MPGs, but, I’ve found that more recently I’ve had a lot of issues with audio-video sync. The issues could be related to the FFmpeg back-end as I have similar problems with resultant videos from FFmpeg’s command line.

      MKVToolnix is becoming one of my favorites as well. To be honest though, I don’t have a lot of experience with it. It was my final choice at the end of a line of software to concatenate some AVC/MPEG-4 video files. It was the only software that I could find that did it without errors. I haven’t tested it for other formats though.

      As far as an easier method of concatenated with mkvmerge, the only solution I have at the moment is the batch script that I created above. I myself have become quite fond of using a command line, but I definitely understand the desire for a GUI interface. I don’t spend much time on Windows anymore though. I mainly use Linux and FreeBSD, and at times (especially with FreeBSD and certain variants of Linux) using a command line is necessary.

      Above I posted how to concatenate videos on Linux or *BSD using a single command. I believe there’s actually an even simpler command. I don’t have time to test it right now but I believe it would be something like this (from the directory where the videos are located):

      NOTE: videos must be alphabetized in a manner that will cause `ls` to output the order correctly.

      mkvmerge -o “../video_out.mkv” $( ls)

      If that’s not correct then it’s probably like this:

      mkvmerge -o “../video_out.mkv” `ls`

      If mkvmerge supports wildcards from command input you should be able to do this:

      mkvmerge -o “../video_out.mkv” *

      I bring this up because even if you don’t use Linux you can download a Unix-like (Linux-like) environment to your Windows system. I recomment MSYS2 if you’d like to give something like that a shot: http://sourceforge.net/projects/msys2

      • Thanks for the Mkvmerge command-line tips. I will look into MSYS2 on Win7.

        I’m planning to buy a 5 or 6-year-old MacBook Pro from Ebay sometime soon (my first Apple product ever, after decades of stubbornly resisting), so I will also be able to experiment with Avidemux and Mkvmerge in OS X, both in the GUI, and at the command line.

        In the past few days, I’ve thrown myself headlong into this task to find the ideal, inexpensive or free video-joining software, and it is quite frustrating not to find any software that can handle every format with flawless, lossless output. The closest to that ideal still seems to be Mkvmerge GUI, which works with everything other than ASF and WMV. Beyond the inexpensive and free software, I’m reluctant to spend a fortune just to experiment with mid-range video editing software like Cyberlink PowerDirector, or higher-end software like Apple Final Cut Pro X or Adobe Premier, until I have a pressing need to do anything other than simple joining, splitting, and trimming.

        I really like the program called Machete, and bought the full version for $19.95. Even though it only does keyframe editing, the program is relatively easy to use and generates output files quickly. Too quickly, because, if you’re not careful, the default output overwrites your first input file! After buying the full version, I discovered that, alas, it doesn’t work on my MPG, MKV, MOV, and VOB files, but I’m still happy with my purchase because, for me at least, it works flawlessly with AVI, WMV, and MP4.

        After several days of going into “testing trance-mode” (forgetting to eat and sleep), and trying out everything I could dig up online, here is what I found. I would like to attach a PDF with the full details (more than 10 pages long) rather than commandeer your blog with a gigantic copy-and-paste. However, I don’t see any link in WordPress to “Attach PDF”, so if you’d like a copy of the full 10+ pages, just send me an email. I will just copy-and-paste the SUMMARY here, which is kind of an update of what I posted a few days ago.

        These were my experiences with these programs. Other people may have different experiences, of course.

        The best inexpensive or free video-joining programs on Windows 7 for lossless output:

        Best choices for ASF and WMV: AsfBinWin, Machete (Lite or full), or WMV Joiner.
        Best choices for AVI: Machete (Lite or full) or Mkvmerge GUI.
        Best choice for MPG: Mkvmerge GUI.
        Best choices for MP4: Machete full version or Mkvmerge GUI.
        Best choice for MKV: Mkvmerge GUI.
        Best choice for MOV: Mkvmerge GUI.
        Best choice for VOB: Copy /b technique, or Mkvmerge GUI.
        Good choice for most filetypes (when it works, but doesn’t always work): Avidemux – works best when using the AVI Muxer.

        SUMMARY of the free or inexpensive lossless video-joiners:

        Allok Video Joiner – flawed output (pixelation, ghosting, screeching, sound cutting out).

        AsfBin command prompt – took me a long time to figure out how to join two files, but seems to work fine once I understood the syntax. Asfbin -i source1.wmv -i source2.wmv -o output.wmv. Only works on ASF and WMV files.

        AsfBinWin – requires Visual C++ 2008, only works on ASF and WMV files, pleasant interface, easy to use, with quick output.

        Avidemux – Great when it works but doesn’t always work. Interface needs improvement. Shows promise. Triple-platform (Win Mac Linux) and 64-bit, open source.

        Briz Video Joiner – good results, except with MPG files, wrong time displayed during playback of my MPG output file. The time showed as shorter than the output video length.

        Copy /b in Windows command console – same time display problem as Briz for MPG files. Joins but won’t play second source file for AVI, MKV, MP4, MOV, and WMV. Works great for VOB.

        FFmpeg at command console – created video output files, but they wouldn’t play.

        Format Factory – tries to install bloatware or malware four separate times, interface is cluttered and confusing, doesn’t seem to have lossless option despite advertising that it does.

        Free Video Cutter, Free Video Joiner – two programs that seem to be from same author, and neither one supports lossless output.

        Machete Lite – Powerful, intuitive, uncluttered, aesthetically-pleasing, but limited to AVI and WMV in the Lite version, and only does keyframe editing. Be careful not to overwrite source file with output.

        Machete full version – works great for AVI, WMV, and MP4 files, except that the default output filename overwrites the first input filename. Didn’t work for me with MPG, MOV, MKV, and VOB files. Limited to keyframe editing.

        MKVToolnix (Mkvmerge GUI) – flawless results for most video file types including VOB, but doesn’t work for ASF/WMV files. I’ve never encountered an audio-video sync problem with mkvmerge output.

        Movica – apparently there is no support for Win 7 64-bit. Crashed when I tried to run on W7 64.

        MPEG Streamclip – can split files, but doesn’t join files, as far as I can tell. Interface feels outdated.

        My MP4Box GUI – only works with MP4 files, and even then, only sometimes. Some MP4 source files create flawed output. For example, several times, I joined MP4 files with identical specs, but the output would lose audio and freeze up between the first and second source clip, and is not seekable in MPC-HC, SMPlayer, or VLC. Each time I tried to seek further into the video, the slider would reset to the end of the first clip where the audio would die and video would freeze up.

        QuickTime Pro – Do NOT buy, doesn’t work properly. There are literally hundreds of very angry people who gave one-star reviews on Apple’s website.

        SolveigMM AVI Trimmer + MKV – keeps suggesting for me to buy other Solveig products (cannibalizing their own flagship?), but I couldn’t even figure out how to use this one.

        SPG Video Splitter – tries to install malware, and couldn’t figure out how to use.

        VirtualDub – this program looks powerful but didn’t work for me. For MKV, MOV, and MP4 files, “Unknown or unsupported file type”. For ASF and WMV, “Not supported”. For AVI files, “Couldn’t locate decompressor” and something about needing a codec. (I already have K-Lite Codec Pack 1065 Full installed and shouldn’t be missing any codecs.) MPG files opened, but displayed an error, “Anachronistic or discontinuous timestamp”, and the Append AVI Segment choice was grayed out.

        VOBmerge – works great for VOB files only, except that seeking at start of VOB has strange results. If I let the VOB play without interruption, the actual movie starts at about 1min20sec. If I start over and seek to 1min20sec, the movie is already much further in, and if I seek to find the start of the movie, the start seems to be 32sec. This strange behavior happens regardless of the player (MPC-HC, SMPlayer, or VLC).

        WMV Joiner – fantastic, but only works for WMV. Free version only joins two files at a time.

    • Erik,

      For some reason WordPress won’t let me reply to your latest comment, so I’m replying to this older one. It probably only allows replying up to a certain depth.

      I don’t see your email address anywhere (maybe I’m not looking hard enough). I would like to get that .pdf from you though. Please send it to me. My email is antumdeluge@gmail.com. If the file is too big for email would you upload it to a cloud drive or temp file sharing site like http://www.4shared.com/ (I don’t think you need an account)? If I like what I see I may attach it to my WordPress blog.

      I too would like to have a Mac product, not because I’m necessarily a fan, but more that I would just like to be familiar with the platform. A while back I purchased a used G5 (PowerPC), which were known to have issues, and tried to fix it. It worked for a while but I gave up on it. My brother was just given a 2008 Macbook Pro. I helped him re-partition the hard drive. I liked it, it’s a nice machine.

      I’ve had poor experience with professional software. About 6-8 years ago I purchased Sony Vegas Movie Studio for $90 (can’t remember which version and don’t feel like finding my box). It came with two software packages: A video/audio editor and DVD author suite. It had lots of features that I really liked. I loved the layout of the editor. But I was severely disappointed by the lack of format support. The editor would only allow me a small selection of customizations for MPEG video output and the DVD suite forced re-encoding when it wasn’t necessary. Don’t know if I’ll ever purchases professional software again. Seems like you have to empty your wallet for the top-end version to get all the desired features.

      I’m planning on making a HowTo video for setting up MSYS2 on Windows and posting it here on WordPress. Not sure when I’ll have it done though. I’ll try to remember to send you a notification in case you want to check it out or have trouble setting it up.

      Actually, thinking about it, it may not be necessary to install the full MSYS2 environment to use the Linux/Unix commands above. You may only need to download the bash shell (bash.exe) and place it somewhere on your system’s PATH (C:\Windows). Then, from your command line, just type “bash” to start the shell. Not sure if it will work, but worth a try if you don’t want to mess with the full environment.

      You can get the bash executable from MSYS2’s base archive (https://sourceforge.net/projects/msys2/files/Base/). It’s in the sub-folder “/usr/bin”. If you don’t have software that can open a .tar.xz archive you can try 7-zip (http://7-zip.org/). Here are direct downloads for the current MSYS2 base archive:

      64-bit:
      http://downloads.sourceforge.net/project/msys2/Base/x86_64/msys2-base-x86_64-20141113.tar.xz

      32-bit:
      http://downloads.sourceforge.net/project/msys2/Base/i686/msys2-base-i686-20141113.tar.xz

      You may need to extract some .dll dependencies as well for it to work, not sure. I’m going to try this out myself soon. I’ve done it before, seems like it worked without the full MSYS2 environment.

  3. Helpful tip when attempting to join files in Windows 7, when you want to figure out why your video joining software is producing error messages and not joining the files:

    The default Windows 7 detailed display only displays these core details:
    Name, Date, Type, Size, Length.

    To verify that the files are indeed, identical in format (frame rate, compression method, and so on), open the folder with the video files, click on View – Details, right-click on one of the column headers, click More…, and activate (that is, check the check box for) all of the following, in addition to the core details:

    Audio tracks
    Bit rate
    Data rate
    Frame height
    Frame rate
    Frame width
    Item type
    Total bitrate
    Video compression and video tracks

    Then compare the values to see where the video files are NOT identical. This is what is preventing the software from joining the files losslessly.

    You can also checkmark these, for more clues to separate files, but differences here should not affect the ability to join the files losslessly:

    Authors
    Comments
    Creators
    Contains chapters
    Contributing artists
    Copyright
    Date accessed, acquired, created, last saved, and modified
    Media created
    Parental rating
    Participants
    Protected
    Rating
    Title

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s