Concatenating mpegs together

I have several movies i have made on computer and i want to be able to make all 14 of them into 1 big one. Does anyone know what kind of software will do this–even if it’s command-line based? Here’s what i mean:

[movie1].mpeg + [movie2].mpeg + [movie3].mpeg ==concatenating program yields==> [movie1movie2movie3].mpg

Umm, i hope everyone understands.

Make an old fashioned DOS batch file. Quick and dirty, but it works:

  • Make a new text file in the directory with the files in it, eg “text.txt”

  • Open the text file and type in

, where file1.mpg, file2.mpg, etc are the separate files to be joined into a larger file “newfile.mpg”. Save and close.

  • Change the extension of the file to a batch file, eg “text.txt” to “text.bat”

  • Run it

While that does literally do what he asked, I think he is probably looking for some way which results in a valid mpeg file which is the video from all of them spliced together. I’m pretty sure that what you’ll end up with your method is a broken wad of binary data. (and out of curiosity, why use a batch file anyway?)

I don’t know of a way to do what the OP is asking other than by buying some video editing software which most likely does a lot more than you want, and is priced accordingly.

I think Rabid_Squirrel’s method might just work with .mpegs. It definately won’t work with .avi’s though.

ntucker I have done it on at few files before, but I think I got lucky with certain codecs that allowed me to append them together (IIRC, it might be MPEG I). I’ve used it to repair fragmented mpegs from p2p stuff.

VirtualDub is a free video editor, but tends to be a bit flacky with MPEGs. I suppose you could Google a mpg==>avi program.

TMPGEnc

An excellent free video encoding/editing utility (The MPEG equivalent of VirtualDub). Install, go to File --> MPEG Tools -->Merge & Cut.

Do not use the copy command in this case.

I have been using Easy Vid Joiner recently. So far so good.

There’s another trick for joining MPGs together that I’ve seen and tried, and it worked for me. Use Winzip. Create an archive with the files you are joining in order, but make sure to set the compression to NONE. Rename the file from “whatever.zip” to “whatever.mpg”

Monstre’s advice is, umm, “problematic”. I just tested it and it hung my mpeg player. Again, just stick to official mpeg joining software.

Hmm – sorry if it didn’t work for you. That’s one I had seen and tried a few years ago – maybe it doesn’t work on newer MPG encodings? Haven’t tried it recently. Worked for me when I did it.

I’ve used the winzip method, but it seems to stick them together in the wrong order.

The command line option is the best option I’ve found. I’ve used it a lot with not problems. It works fine on Mpegs but not on Avis.

The format of the command I’ve used is…

copy/b file1.mpg+file2.mpg+file3.mpg… filejoined.mpg

I have found the **Windows XP Movie Maker ** to be very useful.

It is available here

I used Hodge’s TMPGEnc and it worked good joining the files. However, it did something i didn’t expect. All 12 of the files i joined added up to be 250MB, and after joining them, i now have a 1.2GB movie that takes a long time to load. So now i have a slightly different question: Anything that can make movies smaller?

SR, it probably did a conversion on the files. TMPGEnc is designed to produce (S)VCDs and mpgs that are a “bit off” from the standards get converted in the process. The blowup you see could happen in TMPGEnc if you were converting the type, e.g., VCD to SVCD. (An AVI to VCD would do likewise, but that’s another converter.)

Converting an MPG to a DivX AVI should get you a pretty small file. But note that each conversion reduces quality. You may not be happen with the result if it has already gone thru a couple conversions.

If either the contatenating method or the zip method work, it’s a fluke. Neither is a general-purpose way of splicing video clips together, and will only work under specific conditions, if any.

A transcode, actually. A repacketization of the MPEG, rather than a reencode. That’s what TMPGenc’s MPEG Tools do. A reencode would have taken much longer.

The default “System (automatic)” setting in MPEG Tools does not produce VCD-compliant MPEG-1 files. You can, however, select that option from the “Type” dropdown box.

SlickRoenick, try the other types of MPEG-1 files (Video-CD, Video-CD (non-standard), System (VBR)) in the dropdown box to see if your file will join correctly with one of those.

If that doesn’t work, you may want to try one of these tools. Some of them are freeware.

TMPGenc will convert movies in AVI-contained codecs to MPEG-1/2 just fine. You just can’t convert movies to AVI codecs with TMPGenc.

The command-line concatation, as others have pointed out, is dirty and doesn’t work in all situations. It won’t strip and rewrite the headers of the MPEGs and whatever else these tools are doing behind the scenes.

neutron star’s right. TMPGenc does convert avi’s to mpegs. It is so sloooow on my system that I stopped using it for that purpose and forgot about it.