View Full Version : cannot append segment: video streams have different data formats

24th September 2005, 20:28
I can't append 2 avi xvid files; Virtualdub says "cannot append segment: video streams have different data formats". I checked with Gspot and with the file information in VirtualDub, and both files are identical.

The 2nd file was generated from the first, I used full processing mode and then selected the xvid codec in the compressions options.

If I save the file using direct stream copy then it will append to the first.

The only different thing that I noticed between the 2 files is that if I select video > frame rate, under the heading "change so video and audio durations match" it gives different numbers in parentheses (25.069 for the original file, and 24.988 for the reencoded file).

The files are very short, about 12 seconds, and I had to re-save them from the original file because it had VBR audio (that whole thing about saving the audio in WAV and then importing it and reprocessing it). But that probably isn't an issue because if I save both files without sound it gives me the same error.

From reading the internet, I have found that there seems to be an issue with the slightest frame rate offset and Virtualdub rejects the append. This could very well be the problem, from what I noted above about estimated frame rates being different, though Gspot and Virtualdub both say the 2 files have a frame rate of 25.000.

I have been all over the internet with this for 2 weeks now. Please help :)

25th September 2005, 01:30
1) Open VirtualDub

2) Load the first original file

3) Set BOTH "Video" and "Audio" to "Direct Stream Copy"

4) From the "Video" dropdown menu, click on "Framerate", select "Change framerate to" and enter 24.999 ("frames per second")

5) Save with a new filename

6) Keep VirtualDub open

7) Load the second original file

8) Save with a new filename

9) Close VirtualDub

10) Open VirtualDub

11) Load the first NEW file

12) Set BOTH "Video" and "Audio" to "Direct Stream Copy"

13) From the "File" dropdown menu, select "Append segment" - and select the second NEW file

14) Save with a new filenam

11th October 2005, 03:17
It didn't work, and I'm using the new Virtualdub.

Do you know that this works?

11th October 2005, 03:30
Do you know that this works?

Yes I do - Otherwise I would not have provided it to you...

It didn't work

A) Exactly what happened?

B) For EACH of the two NEW .AVIs, please do the following:

1) Load the original video file into VirtualDub (or one of its many variants) or NanDub

2) From the "File" dropdown menu, select "File Information"

3) Post (here) EVERYTHING you see (BOTH video and audio information), or post a screen capture .jpg of the information box

16th October 2005, 03:39
Here's the VirtualDub file info on both clips (when different it will be noted):

Frame size: 512x384, 23.975 fps (41710 us)
Length: 177 frames (0:07:38) ////////// 105 frames (0:04:38)
Decompressor: XviD MPEG-4 Codec
Number of key frames: 1 /////////// 2
Min/avg/max/total key frame size: 29195/29195/29195 (29K) //////////// 5515/8963/12412 (18K)
Min/avg/max/total delta frame size: 7/16627/76685 (2858K) ///////////// 7/5722/24125 (576K)
Data rate: 3203 kbps (0.14% overhead) /////////////// 1109 kbps (0.41% overhead)

Sampling rate: 48000Hz
Channels: 2 (Stereo)
Sample precision: N/A
Compression: Fraunhofer IIS MPEG Layer-3 Codec
Layout: 166 chunks (0.50s preload) //////////// 94 chunks (0.50s preload)
Length: 147329 samples (0:07:36) ////////////// 87332 samples (0:04:36)
Min/avg/max/total frame size: 520/887/10000 (144K) ///////// 585/929/10000 (86K)
Data rate: 160 kbps (2.63% overhead) ////////// 160 kbps (2.52% overhead)


The original file is Xvid mpeg-4 codec. File has VBR audio encoding, so I export WAV file and then use this as the audio source, and set compression to Lame MP3 at 160 kb and CBR.

Export first clip using direct stream.

Export second clip using full processing mode. In select video compression I can choose 2 xvid codecs: xvid and yv12. I select xvid and leave all the configure options at their default, since I don't understand them.

Close VirtualDub 1.6.11, and then relaunch it.

Open both newly generated clips. Frame rate is 23.976. Set frame rate at 23.975 and save both avi's with direct stream copy.

Close VirtualDub 1.6.11, and then relaunch it.

Open clip one (with new frame rate). Try to append clip two (with new frame rate). Gives me message that segments can't be appended because video streams have different data formats. [If I try to append clip one with clip one it works.]

16th October 2005, 03:59
Data rate: 3203 kbps (0.14% overhead) /////////////// 1109 kbps (0.41% overhead)

I'm guessing that this is the source of your difficulty...

16th October 2005, 08:32
I doubt it. Bitrate and mux overhead shouldn't cause it to fail. Also it doesn't have anything to do with the frame rate, because that produces a different error message.

As I understand it, the "different data formats" error refers to the BITMAPINFOHEADER in the AVI files; they must exactly match in both files. Unfortunately you will have to examine the headers in VirtualDub's hex editor to see what's different about them. It could be something as simple as the "biBitCount" field, which you can probably change without messing up anything.

Here are some references that might help:


Apart from manually editing the headers, the only sure way to get VirtualDub to join these files is to recompress both of them using the same codec with all of the same settings. You will suffer a bit of quality loss, but it's definitely easier.

Another alternative is to search Google for some other program which can join AVI files, and isn't as picky as VirtualDub.

25th October 2005, 08:17
Data rate: 3203 kbps (0.14% overhead) /////////////// 1109 kbps (0.41% overhead)

I'm guessing that this is the source of your difficulty...

I think I will find the answer to the problem with the hex editor suggested by fcc in the post below. I just wanted to point out that the big difference in data rates was because I forgot to set the kbps while creating the avi's for this post, but I've done this a hundred times before, with bitrates very close to each other and the problem occuring. Still, I think I might finally settle this with the hex editor. Thanks very much to both of you for your help. I hope this will finally settle it.

25th October 2005, 08:38
Do let us know what you discover...

25th October 2005, 12:49

27th October 2005, 04:06

Very interesting article.

Using HEX editor I was able to see that the frame rate is in H&0080 - H&0088.
For a file with a frame rate of 1.0000 it reads "01 00 00 00 01 00 00 00". With a frame rate of 10.0000 it reads "01 00 00 00 0A 00 00 00".

For my 2 files that I can't append this block of data is identical: "4B 10 00 00 A0 86 01 00" (the frame rate is 23.975). No differences in frame rate between the 2 incompatible files.

Anyhow, I did get from the article some of the limitations of VirtualDub, and I now realize that this wasn't a problem on my part, just that VirtualDub wasn't intended for this purpose (appending).

27th October 2005, 05:46
just that VirtualDub wasn't intended for this purpose (appending).

As I've used VirtualDub's "Append" tool literally hundreds of times, I'm baffled by your statement. Would you please explain why you say this?

27th October 2005, 08:26
It's not meant for appending random stream A with random stream B, but to re-join files that were previously split for whatever reason (e.g. filesize limits) for example with VirtualDub's "save as segemented AVI" function.

You can find this in the blog entry.