# Concatenating mpegs together

**URL:** <https://boards.straightdope.com/t/concatenating-mpegs-together/198328>\
**Category:** Factual Questions\
**Created:** [August 29, 2003, 12:34am UTC](https://boards.straightdope.com/t/concatenating-mpegs-together/198328 "2003-08-29T00:34:03Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![SlickRoenick](https://avatars.discourse-cdn.com/v4/letter/s/e68b1a/32.png) [@SlickRoenick](https://boards.straightdope.com/u/SlickRoenick)\
**Post date:** [August 29, 2003, 12:34am UTC](https://boards.straightdope.com/t/concatenating-mpegs-together/198328/1 "2003-08-29T00:34:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Rabid\_Squirrel](https://avatars.discourse-cdn.com/v4/letter/r/e0b2c6/32.png) [@Rabid\_Squirrel](https://boards.straightdope.com/u/Rabid_Squirrel)\
**Post date:** [August 29, 2003, 12:44am UTC](https://boards.straightdope.com/t/concatenating-mpegs-together/198328/2 "2003-08-29T00:44:45Z")

</div>

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

> [@](#):
>
> copy +file1.mpg/b +file2.mpg/b +file3.mpg/b newfile.mpg

, 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

---

<div class="post-metadata">

**Author:** ![spinky](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@spinky](https://boards.straightdope.com/u/spinky)\
**Post date:** [August 29, 2003, 12:52am UTC](https://boards.straightdope.com/t/concatenating-mpegs-together/198328/3 "2003-08-29T00:52:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Skeptico](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@Skeptico](https://boards.straightdope.com/u/Skeptico)\
**Post date:** [August 29, 2003, 12:58am UTC](https://boards.straightdope.com/t/concatenating-mpegs-together/198328/4 "2003-08-29T00:58:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Rabid\_Squirrel](https://avatars.discourse-cdn.com/v4/letter/r/e0b2c6/32.png) [@Rabid\_Squirrel](https://boards.straightdope.com/u/Rabid_Squirrel)\
**Post date:** [August 29, 2003, 1:08am UTC](https://boards.straightdope.com/t/concatenating-mpegs-together/198328/5 "2003-08-29T01:08:09Z")

</div>

**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](http://www.virtualdub.org/features) is a free video editor, but tends to be a bit flacky with MPEGs. I suppose you could Google a mpg==\>avi program.

---

<div class="post-metadata">

**Author:** ![Hodge](https://avatars.discourse-cdn.com/v4/letter/h/5f9b8f/32.png) [@Hodge](https://boards.straightdope.com/u/Hodge)\
**Post date:** [August 29, 2003, 2:15am UTC](https://boards.straightdope.com/t/concatenating-mpegs-together/198328/6 "2003-08-29T02:15:06Z")

</div>

[TMPGEnc](http://www.tmpgenc.net/e_main.html)

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

---

<div class="post-metadata">

**Author:** ![ftg](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ftg/32/2801_2.png) [@ftg](https://boards.straightdope.com/u/ftg)\
**Post date:** [August 29, 2003, 3:26am UTC](https://boards.straightdope.com/t/concatenating-mpegs-together/198328/7 "2003-08-29T03:26:54Z")

</div>

Do **not** use the copy command in this case.

I have been using [Easy Vid Joiner](http://www.doeasier.org/joiner/) recently. So far so good.

---

<div class="post-metadata">

**Author:** ![Monstre](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@Monstre](https://boards.straightdope.com/u/Monstre)\
**Post date:** [August 29, 2003, 3:29am UTC](https://boards.straightdope.com/t/concatenating-mpegs-together/198328/8 "2003-08-29T03:29:42Z")

</div>

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”

---

<div class="post-metadata">

**Author:** ![ftg](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ftg/32/2801_2.png) [@ftg](https://boards.straightdope.com/u/ftg)\
**Post date:** [August 29, 2003, 4:09am UTC](https://boards.straightdope.com/t/concatenating-mpegs-together/198328/9 "2003-08-29T04:09:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Monstre](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@Monstre](https://boards.straightdope.com/u/Monstre)\
**Post date:** [August 29, 2003, 5:07am UTC](https://boards.straightdope.com/t/concatenating-mpegs-together/198328/10 "2003-08-29T05:07:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Bakhesh](https://avatars.discourse-cdn.com/v4/letter/b/3da27b/32.png) [@Bakhesh](https://boards.straightdope.com/u/Bakhesh)\
**Post date:** [August 29, 2003, 8:20am UTC](https://boards.straightdope.com/t/concatenating-mpegs-together/198328/11 "2003-08-29T08:20:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![johncole](https://avatars.discourse-cdn.com/v4/letter/j/5f9b8f/32.png) [@johncole](https://boards.straightdope.com/u/johncole)\
**Post date:** [August 29, 2003, 11:27am UTC](https://boards.straightdope.com/t/concatenating-mpegs-together/198328/12 "2003-08-29T11:27:56Z")

</div>

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

It is available [here](http://www.microsoft.com/windowsxp/moviemaker/downloads/moviemaker2.asp)

---

<div class="post-metadata">

**Author:** ![SlickRoenick](https://avatars.discourse-cdn.com/v4/letter/s/e68b1a/32.png) [@SlickRoenick](https://boards.straightdope.com/u/SlickRoenick)\
**Post date:** [August 30, 2003, 6:43pm UTC](https://boards.straightdope.com/t/concatenating-mpegs-together/198328/13 "2003-08-30T18:43:55Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ftg](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ftg/32/2801_2.png) [@ftg](https://boards.straightdope.com/u/ftg)\
**Post date:** [August 31, 2003, 12:59am UTC](https://boards.straightdope.com/t/concatenating-mpegs-together/198328/14 "2003-08-31T00:59:11Z")

</div>

**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.

---

<div class="post-metadata">

**Author:** ![spinky](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@spinky](https://boards.straightdope.com/u/spinky)\
**Post date:** [August 31, 2003, 8:01am UTC](https://boards.straightdope.com/t/concatenating-mpegs-together/198328/15 "2003-08-31T08:01:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![neutron\_star](https://avatars.discourse-cdn.com/v4/letter/n/51bf81/32.png) [@neutron\_star](https://boards.straightdope.com/u/neutron_star)\
**Post date:** [August 31, 2003, 9:22am UTC](https://boards.straightdope.com/t/concatenating-mpegs-together/198328/16 "2003-08-31T09:22:20Z")

</div>

> [@](#):
>
> \*Originally posted by ftg \*  
> \*\ ***SR** , it probably did a conversion on the files.

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.

> [@](#):
>
> TMPGEnc is designed to produce (S)VCDs and mpgs that are a “bit off” from the standards get converted in the process.

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](http://www.dvdrhelp.com/tools?listall=1#Basic%20Video%20Editors) tools. Some of them are freeware.

> [@](#):
>
> (An AVI to VCD would do likewise, but that’s another converter.)

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.

---

<div class="post-metadata">

**Author:** ![ftg](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ftg/32/2801_2.png) [@ftg](https://boards.straightdope.com/u/ftg)\
**Post date:** [August 31, 2003, 9:41pm UTC](https://boards.straightdope.com/t/concatenating-mpegs-together/198328/17 "2003-08-31T21:41:03Z")

</div>

**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.
