AVI joining

Hi :)

I've created an avi using dvd2avi, 'xvid mpeg-4 compression' which I want to join onto another avi with the following details.

AVI size 714,490kb
image size 608 by 256
Audio 5.1 448kbps
video sample size 16 bit
data rate 174kbps
Video compession xvid

I'm attempting to join the two with either nandub or Virtualdub. Normally I have no problem but this is the first time I've created an avi myself and finding it difficult to match the one i'm joining on to.

I ran both avi's through nandub to gain the same frame rate of 23.976.

My created avi had a colour depth of 24 bits, so again I ran this through nandub to set the colour depth, decompression format and output format both set at 16 bit.

I noticed that dvd2avi stripped a 2 channel wav from the original mpeg2, so this was disgarded and I demuxed the actual ac3 and muxed this back to my avi in nandub. Here are the properties details of my avi:

My created avi size 378,326kb
image size 608 by 256
Audio 5.1 448kbps
video sample size 16 bit
data rate 804kbps
Video compession xvid

After numerous attempts and a few less hairs on my head this is the error i get when trying to join the two with nandub.


"Cannot append segment: The video streams have different data formats"

where am I going wrong?

Thanxxx
Emma
 
What build of XviD are you using to encode the parts? Because certain older builds have problems when it comes to joining. I believe Syskin's advice was to remux to OGM's, join and then remux back to an AVI. Also XviD is actually 12bit.
 
The error has told you exactly what the problem is "Cannot append segment: The video streams have different data formats"

First AVI you listed has data rate 174kbps while second had data rate 804kbps. They are NOT the same so no attempt to joining them will work. Rencode the smaller 2nd AVI with the same data rate as the first, then you will be able to join them.
 
Not sure what the xvid build is, how can I find out?

Looked at changing the data rate, I assume this is done in the SBC settings under video....? The only codec setup there is Divx and mpeg4 v2.

M
 
Tried again this time with VIrtualdub. I set the Xvid configuration to 174kbps(to match the larger avi) but the resulting output was different....74kbps ??
How do I get this exact?

Regarding easy video joiner, only once ever tried this when joining mpegs and the output was rather grainy, maybe different with avi's....will have to give it another go.

M
xxx
 
Different average data rates should make no difference. For example a while ago there was a problem with XviD's zones. When you set force keyframe it forced all keyframes instead of just one at the start. As a consequence I ended up with all I frame end credits instead of all quant 16 p/b/i's or whatever I wanted. So my encode was well oversized. I simply redid the credits seperatly and joined them. Now there is no way that the datarates were the same.

You can see what XviD build it is in the about box.
 
You might want to try updating to Koepi's latest RC. Should point out that as far as I know you would have to actually encode the parts with it. I don't think installing RC2 would suddenly make older encodes effected by the bug join.

I just encoded two parts with different bitrates and joined them fine using a current CVS build. Exact same settings for bother parts though, except for the bitrate that is.

Ok tried one h263 and the other mpeg and it still joins fine.
 
Uninstalled my current xvid, which happened to be Koepi’s build -1.0-beta2 05122003, for this new one:xvid-04102002-1 _ALPHA.

Will proceed to re-encode both and take it from there.

Cheers
M
 
Well, i tried but I'm not sure on the settings in virtual dub.

Set to h263 and 2 pass-1st pass (900kbps-greyed out)
The resulting avi was approx a quater the size of the original and wouldn't play anyway.

M
xxx
 
You uninstalled a late 2003 build for a "newer" 2002 build??

Try RC2 or a current CVS build. By the way it looks like some new dshow updates in the CVS, so I will be putting together a new build later.

Small tip to, when installing a different XviD build, load the default settings before encoding. With current builds this should happen automatically though, not for 2002 builds though.
 
Well, I eventually got there. Finding the time is sometimes difficult being a mother of two.
Anyways, now have build 1.0-RC2 07022004.

Reencoded both avi's at default settings: AS@L5/Single Pass/Target Quantizer 4. which gave me a smaller file (578,362kb) than the original. I guess another time I'll toggle with the Target setting.

And......yes they joined :D. The lesson here is to re-encode both avi's, rather than trying to match one with the other.

Incidently, I then tried to encode the joined AVI through DVD2SVCD/CCE for later authoring to DVD, but it spat it out at 67% with the error "Fexp_close failed. the handle is invalid" ???

Thanx for your help and time Celtic.....much appreciated!

M
XXX
 
RC3 is out now.

You re-encoded the AVI or you re-encoded from the original source? Because re-encoding an AVI is not such a good idea.

You encoded a DVD to AVI and now want to go back to DVD? Why not just go DVD-->DVD?
 
Emmaxxx said:
Incidently, I then tried to encode the joined AVI through DVD2SVCD/CCE for later authoring to DVD, but it spat it out at 67% with the error "Fexp_close failed. the handle is invalid" ???
Thats why I dont fart around trying to join them in the first place, just encode each separately and author in Maestro linking the end of Movie 1 to the start of Movie 2. Then it doesnt really matter what form the AVI's were in (DivX, Xvid, etc) as they all get converted to mpeg2 dvd compliant.
 
Better solution would be to use AVISynth to join seeing as how it is being used to frameserve anyway. AVISynth can join as long as the framerate, colourspace and resolution are the same as they should be in this case. If they aren't then it can sort that to.
 
The larger avi is my original source. The smaller one was cropped from DVD source, converted to avi so I could join the two....hence the re-encoding of both avi's to match....yes, in this case it meant farting around but once you're familiar with a process it's not so bad.

Tried the Maestro method of compiling two movies of one split movie and there is a noticable join, perhaps I'm being too much of a perfectionist. Joining with Nandub or Virtualdub has given me a perfect join every time.

As encoding with DVD2SVCD takes a fair while to do, this task is performed over night. So if you have two avi's of say 713,000kb it only makes sense to join them for one nights encode.

But as Celtic as pointed out, it's not a good idea to re-encode an avi...I didn't know this...is it loss of quality?

Regarding AVISynth, this is script based and I have no experience with this.
With this method, it seems a case of matching the two again....aren't we losing quality again?

Thanxx guys

Emma
 
Yes you are losing quality, but that is because you are re-encoding not because of AVISynth.

To join two AVI's with AVISynth it is basically as simple as:
part1 = avisource("part1.avi")
part2 = avisource("part2.avi")
part1++part2

Using ++ instead of just + will ensure the audio is in sync even if the video and audio lengths don't match.

Once again, if you have a DVD source, why screw around like this?

Yes re-encoding AVI's using lossy compression (as in this case) results in a loss in quality, especially when you have the same DCT blocks in both, this compounds any MPEG artifacts.

Should also point out that with AVISynth you could join the AVI with the DVD without the need for converting.

part1 = avisource("part1.avi")
part2 = mpeg2source("part2.d2v").crop(4,76,4,76).LanczosResize(640,272)
part1++part2
of course in this case the second part would have no audio.
could also use trim() to seperate the end credits and use bilinearresize for them.

As I said both need to be the same res, cropping and resizing takes care of this, they should also be the same framerate and both XviD and DVD are YV12 so that takes care of the colourspace.
 
You make it sound so simple.....whooooosh! Straight over my head!

So where do I begin?
I have AviSynth 2.5.
I have 3 avi's of approx 713,000kb eack (original source) which I would like to join, then encode for dvd authoring onto 2 DVD's.
Will the script also handle the AC3?

This really is like learning to ride a bike again......but in this case bumps and grazes are replaced with well chewed finger nails and clumps of hair between my fingers........but hey, I'm willing :)

XXCelticXX
M
 
Two ways to handle AC3 (directshowsource and say AC3Filter or the AC3Dec plugin), however both would result in it being decoded to PCM, when what you really want is to reuse it on your DVD.
 
Top