Log in

View Full Version : Joining a re-encoded credits at lower bitrate


victorhooi
23rd May 2005, 07:54
hi,

I'm trying to shrink an Xvid-encoded movie by about 8 megs, so I decided to re-encode the credits at a lower bitrate using VirtualDub.

I managed to select the frames I wanted to re-encode, and re-encoded it with a two-pass Xvid encode at around 500 kbps. However, when I tried to append it onto the beginning of the original file (resaved with the credits cut off, of course), VirtualDub complained with:


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


I also tried using a one-pass quantitizer 25.0 encoding, and joining that to see if a two-pass encoding was the problem, but that also failed to with the above error. Both one/two pass videos play fine on their own, though.

What sort of restrictions are there on joining two Xvid video files? (ie different bitrates - that should be ok, right?) Where can I find out more info on the exact params/format used in the original? Or is there any other way I can get around this error?

Incidentally, when I first tried to open the original file, VirtaulDub came up with:

VirtualDub has detected an improprer VBR audio encoding in the source AVI file and will rewrite the audio header with standard CBR values during processing for better compatability. This may introduce up to 31054 ms of skew from the video stream. If this is unacceptable, decompress the *entire* audio stream to an uncompressed WAV file and recompress with a constant bitrate encoder.

I don't think this would affect the issue, since I used VirtualDub to resave both AVI files before trying to join them, but I just thought I'd mention it - then again, anybody know the best way to resolve the VBR issue as well?

Anwyay, any help would be appreciated, and thanks in advance.

cya,
Victor

Didée
23rd May 2005, 08:39
First off, for encoding the credits you should use the same XviD version that was used for the original encoding. More exactly, the "bitstream version" must be the same.

Then, perhaps the tips mentioned here (http://forum.doom9.org/showthread.php?s=&threadid=94099) might be of help.

victorhooi
23rd May 2005, 11:20
Thanks for the quick response.

I used the MPEG4Modifier program suggested in the other thread, and both the files have "packed bitstream" disabled. The re-encoded credits report as XviD0038 under "User Data" in MPEG4Modifier, but the main movie (direct stream copy of the original AVI file, with credits chopped off), doesn't report anything under User Data at all - all I know is that it is a Xvid video of some sort.

Is there any other way of checking the XVid bitstream version of a file?

Reading the thread you suggested above (I saw your post there :D), I also tried AviMuxGui, but no matter what I did, I couldn't seem to get AviMuxGui to join audio/video properly...*sigh*...either the files didn't join at all, and I only got half, or the video joined, but the audio was completely out of sync (as in, completely and utterly mangled). Nonetheless, I *did* manage to get it to work eventually by using AviMuxGui to produce a AVI file with out-of-sync audio, then using mmg to extract the Xvid stream from that file, and combine it with the audio track from my original file - hackish, but it works :cool:

Thinking back, if I could somehow work out what encoding paramters/version were used for the original XVid file, I could use VirtualDub to append the segments - GSpot wasn't much help, reporting only that they were Xvid files, so I have no idea on how to find out what Xvid bitstream version was used.

Hmm...last question - would you have any idea why AviMux was able to join the files (at least the video part) and VirtualDub wasn't?

Well, thanks so much for your help dude - the video is fine, the audio and subtitles are in sync, and hopefully I learnt a bit more.

Maybe we could put all your wisdom and advice in a faq somewhere, so that newbies like me don't keep posting the same question and annoying you guys =) ?

cya,
Victor