I tried hunderds of times and combinations and variations but cannot get this right. It doesnt matter if I use xvid/divx/vdub/vdubmod/gknot and heaven knows what other encoding/decoding/muxing software, the result is always the same: in case of movies larger than, say, 300 Mbytes (I'm ripping extras off a dvd) the movie starts off fine, audio/video sync correct. If I search in the movie using the time-slider it goes out of sync. I've tried with wmp, radlight, bsplayer and have all the proper codecs installed. I've tried with ac3/wav/mp3 but all the same. I use dvd2avi, then vfapi then vdub for the ripping. Hard: Athlon 1200, 512 ram, sb16 sound card. As I've said, I've tried every combination imaginable but nothing works. I'm doing this for quite a few weeks now and its really getting on my nerves. In case of smaller movies (<300MB) everything seems to be OK. Please, any bit of info is strongly welcome!
Hi powerdub, thanks for the reply. The movie stays out of sync until the end, but I discovered something that might help: as I've said, this happens only in case of relatively large files. Now, as I'm ripping extras, these films are usually 10-60 minutes long. If the .VOB I'm using contains two or more movies, the result will be out of sync. BUT: the first movie will always be fine and problems start when the second one starts. I was planning on splitting them with vdub, but then I should be able to split the audio tracks as well. So it seems I have to split it 'before' muxing and have to split the audio accordingly. Am I right? And if so, how do I split .AC3 tracks?
And one more thing: if I split and .AVI, is it a must to have a keyframe both at the beginning and at the end? Because sometimes a movie just does't end near a keyframe.
Well, I dont know much about keyframes, I just follow the afterdawn article for ripping into xvid/divx.
Yes, you are right. After encoding, I have an AVI with, say, three shorter movies in it and the first plays well and I can fast forward it also, no problem. When the second one starts it is out of sync. If I watch the AVI and doesn't ff, the result is the same: the second movie starts off out of sync.
I have had the same problem with LiveCaptures of more than 10 mins. Audio gets progresively out of sync. After 40 mins it will be 2.5 secs.
I have found the solution! :-)
In VirtualDub you can stretch the audio by a factor. In my example I esitmated the video delay to be 2.5 sec in a 40 mins video.
Total frames @25 fps: 60000
2.5 sec * 25fps = 62.5 frames (delay in frames)
60062.5 / 60000 = 1.001041667
Audio to be stretched by a factor of 1.001041667
That's the value you need to set.
Leave video processing at direct stream copy:
Set audio processing at Full:
Select use advanced filters, choose filter.
First add input, then stretch and then output. It should connect the 3 filters with arrows.
Select stretch and hit configure. That will bring up the ratio box. Enter the value you calculated and hit ok.
Save the AVI and your A/V sync problem should be sorted.
Hope this will help. Any comments are very welcome. Will this impact audio quality... etc...!
Its really up to you how many keyframes you want to have in the final output. But like the article says, the more keyframes the larger the file size. In the second movie,
When you use the divx codec, do you change the max keyframe interval or do you leave it at its default--300?
Does the audio decrease gradually in the second video or does the desynchronization stay the same throughout?