0

I have 2 .AVI files - one 625 MB (duration 1:02:45) and the other 925 MB (duration 1:32:12). I wish to combine the files into one .AVI file. In a command window I issue the command:

copy /b *.avi combined.avi

combined.avi results with a size of 1.51 GB (which is correct) but the duration is shown as 1:02:45 and, of course, when I try to play the combined.avi, it finishes at 1:02:45.

Can anyone explain why I am not receiving a correctly merged file?

  • 2
    This is probably due to the metadata in the first .avi file. It tells the player what codec etc to use and how long the video is I think. – Devan Apr 08 '15 at 00:30
  • I would try to run `copy /b second.avi + first.avi combined.avi` see if this gets the opposite effect. (shows 1:32:12 duration) btw which version of windows are you using? – Devan Apr 08 '15 at 00:36
  • Devan:Thanks. WIndows 7. Re running second + first gives 1:32:12. Are you saying that I can't successfully merge the files? – Paul Richards Apr 08 '15 at 00:59
  • No but I'm saying that you may need to strip out the metadata before the copy so it will create it while doing the copy Refer to [this post for removing metadata](http://superuser.com/questions/767544/how-to-remove-title-and-other-metadata-from-video-files) – Devan Apr 08 '15 at 01:04
  • I stripped out the metadata but the combined file is only 1:02:45 (using 1 + 2) – Paul Richards Apr 08 '15 at 01:17
  • Sorry about that. So looking at [this](https://msdn.microsoft.com/en-us/library/windows/desktop/dd318189(v=vs.85).aspx) it looks as though part of the avi standard includes a RIFF header section on the file that specifies the length of the video much like i was suggesting before. But this will not be able to be stripped out with the instructions I provided. I think you are going to be stuck with using a video converter simliar to FFmpeg. – Devan Apr 08 '15 at 01:44
  • Devan: thanks for you help. I found Karan's solution (below) provided the answer. – Paul Richards Apr 08 '15 at 02:17

1 Answers1

1

Devan mentioned in the comments above why you can't simply merge two AVIs using the copy command. However re-encoding shouldn't be required if both files match in terms of audio and video codecs used, resolution and so on.

Use AviDemux or VirtualDub to open the first AVI and then use File > Append for the second.

Ensure you have Copy selected for both Audio and Video in AviDemux's main window (along with AVI as the Format):

enter image description here

Similarly if you're using VirtualDub ensure you have Direct Stream Copy selected under both the Audio and Video menus.

Karan
  • 55,947
  • 20
  • 119
  • 191