View Full Version : Xvid 1.0 rc1 - problem joining files without packed bitstream
Zarxrax
31st January 2004, 22:29
I encoded some files with 2 b-frames, but with packed bitstream disabled. Next, I joined the files together. When I play it back now, the audio get's more out of sync each time it gets to a part where the file was joined, I'm guessing due to the b-frame lag on each clip. On dev-api-3 builds of xvid however, I did this all the time and never encountered any sync issues. It would be nice if the old behavior could be restored to xvid. But in the meantime, is there any way that I can fix this, short of reencoding everything again?
Koepi
31st January 2004, 23:44
You're not using a vdubmod build > 1.5.4.1?
Please report back if using that build above solves your issue.
Zarxrax
1st February 2004, 00:50
I have tried both vdubmod 1.5.4.1 and a program called AVI Joiner. They both produce the same output.
K-Dash
1st February 2004, 00:56
When you join files encoded with bframes, make sure you connect them with iframes otherwise there will be a delay in the video.
Zarxrax
1st February 2004, 01:02
Well I am joining entire files, not cutting them at all, so of course they begin on an I frame :p
K-Dash
1st February 2004, 06:36
A solution to this is to calculate how many frames each video clip has and then do the same with audio clips then cut out out the exact audio frames for each clips accordinly to the video and merge them all together.
crusty
1st February 2004, 21:41
That's not a solution, that's a workaround.
@Zarxrax: Try avimux and see if the result is the same.
Zarxrax
1st February 2004, 22:53
With AVImux as well, the joined files get increasingly out of sync.
Something has confused me even more than this though. Last night, I tried to make another encode. Rather than encoding to seperate files and then joining them together, I used avisynth to join all of my avs files together before encoding, like DirectShowSource("avs1.avs")+DirectShowSource("avs2.avs")+...
And when I checked the result this morning, the audio is STILL getting out of sync! I simply don't see how this is possible, and it may not be an issue with xvid after all. But that leaves the question, what IS the problem. All of my files seperately have perfect synchronization... but when joined, either before encoding or after, they lose sync. Something tells me that this sort of situation shouldn't even be possible, and yet it is happening!
Koepi
1st February 2004, 23:59
Maybe the framerate set to the file is simply wrong. This happened to me when I captured files, the app didn't do some fancy resampling of the sound and i had framerates like 24.857 fps - if you join them (forced) to be 25 fps, audio will get out of sync.
Another thing (when you're capturing): don't use audio compression during capturing. This will have the effect you're describing. Capture to some (lossless / close to lossless) format first and reencode in a nice 2pass mode. This never produced bad sync here.
Regards
Koepi
Zarxrax
2nd February 2004, 01:06
Well the framerate for all of the files is 23.976. I am encoding an anime episode, and had to split it into 4 parts in order to properly IVTC it (opening, episode, ending, preview). So I have 4 avs files for these 4 parts. If I play or encode each of these files, every one has perfect sync.
Ok, I just did a small test just now, and discovered this is NOT an issue with xvid. Mod can move, change, delete this or whatever.
I just encoded a single part of my episode to a huffyuv file, then joined it to itself 4 times. Sure enough, at each join it got more and more out of sync. I've never experienced anything like this at all O_o
Edit: Upon further testing, I found that using AlignedSplice in my avisynth script rather than UnalignedSplice, it will join the scripts properly. I find this strange considering I have encoded other episodes this exact same way and always just joined the avi's together, and they came out just fine. But whatever -_-
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.