How To Combine MPG Video Files the Easy Way

There comes times that you may want to combine a couple (or more) MPG video files into just one larger file. I had this case come up just recently.

I needed to decompile a DVD that I wanted to watch using my thumb drive. Unfortunately, my thumb drive is only 2.0 GB and the movie was over 4. There are several ways to copy a DVD to your computer and I won't get into how to do this now. But, I needed to copy it to my thumb drive in the original VOB structure that the DVD uses instead of one large file.

If you are familiar with DVDs and their layout you will know that they usually breakdown the movie into about 1 GB VOB files.

At the end of the day, after doing the decompiling, I had all the original VOB files on my computer and, if you didn't know it, a VOB file is the same exact thing as a MPG file just with a different extension. So to "turn" them into MPGs I simply renamed each one of the VOB files to an extension of MPG. Now I had the MPG files I neded and I could copy them to my thumb drive seperately,  move them or watch them and then delete as needed. Cool deal I was all set.

But, after all of this was done I still had the individual MPG files on my computer and could use them all combined into on movie file for use later. So how do we do this?

I did a quick Google search for "combine MPG files" and of course it came up with several programs that could do it, but they were not free or they were crippled in some way.

After thinking about it awhile I knew I could do something like this with Windows Movie Maker, but that was going to be a bit of a chore, too. I have to import each one, select the output, etc, etc. So I dug back into my old DOS userbrain and remembered that I could use the good old "Copy" command to combine files. So I did this and I was all set. No program to download, no Movie Maker stuff, just plain old add this file to this file stuff. :)

How It's Done:

If you have 2 or more MPG files that you want to combine simply go to your Windows  Start > Run icon. Click on it and type in CMD. You will then be presented with a new window.

You can then go to the directory that holds your files. If you don't know are not familiar with basic  DOS commands that Windows uses go here for a good listing on how to do this and what they all mean.  

Once you are in the directory (or Folder as Windows like to call it) you simply run the copy program and combine the files like this.

Type in "Copy" and then "/b"  (The "b" command tells it to use Binary mode, very important!") after this type in the names of the MPG files that you want to combine with a "+" (plus) sign after each one.  Its imparative that you type in the file names of your MPGs in the order that you want them combined. Then I entered the name of what Iwanted to movie to be called after I combined them.

In my case I had 4 MPG video files I wantred to combine so I typed in:

"copy /b 1.mpg + 2.mpg + 3.mpg + 4.mpg mymovie.mpg" (without the quotes). 

After it was done copying, and this could take some time if you are copying large files, I now had the movie all combined into one video file I could do with whatever I wanted.

No program to buy, no creating a video with Windows Movie Maker, jsut plain old DOS commands. You can use this with any video files without a probelm at all.

If you have any questions on this let me know.

Thanks to the gang over at SansaCommunity for the tips!

Comments

First off, this is a great little tutorial. Thanks, Brandon C.

But.....

When playing the file in WMP (or any other media player, apparently), the displayed time duration is wrong. In my case I had two videos: File One (20 minutes long), and File Two (40 minutes long), that I joined together into one 60 minute file. Now when I play that video, WMP displays the total length of the video to be 40 minutes, not 60 minutes. When the counter reaches the 40 minute mark, the video continues playing through to the end but the counter remains frozen at 40 minutes.

Also, I noticed that when I add the file to a Nero project, it doesn't show one 60 minute clip in the timeline, but the two separate files the way they were originally.

 

What these two things seems to indicate is that the files aren't truly combined - they're simply displayed together under a single filename. This may be nitpicking, but what I would really like to do is see these two files truly joined together as one.  Is there a method, free or otherwise, to do this?

Thanks.

 

Worked great! Thanks for the insight!! There is a slight pause just before it breaks to the next file...is that normal or is it just my dinosaur PC? It makes no difference to me, it accomplished what I set out to do...thanks again and have a good one. Later, Scheu

 

Connect With Techlore