View Full Version : Synching audio by stretching?

18th June 2004, 01:52
I'm backing up my DVDs to CDs, but I came across an interesting problem. I'm reencoding the video as XviD using VDubMod and seprately converting the audio to Ogg Vorbis via BeSweet. Then I use mkv merge to mux them all together (audio + video + chapters + subtitles).

The problem is the audio is in synch at the beginning of the video, and progressively gets more and more out of synch as the video goes on. While I believe this is a XviD issue and not an audio issue (because the audio is in synch with the subtitles during the whole film, but the video is not), I don't know of any fast way of stretching the video, since I'd have to use AssumeFPS in AviSynth and then guess at what it's supposed to be. I also never changed the FPS in VDubMod and I'm not using B-Frames so I my best guess is that this is a codec encoding/playback error. BeSweet appeared to have detected the delay at the beginning of the audio, but that only makes the audio in synch at the beginning of the movie.

Since changing the video would be so difficult and the audio lags behind as it gets near the end of the film, I thought about stretching the audio and just dropping the subs. Mkv merge has a feature in it where you can tell it to stretch the audio, which seems to be the answer. I don't think the pitch change would be too noticeable, but I'm not sure how to figure out how much I should stretch it.

Also, does stretching with mkv merge actually reencode the audio, or does it just store some data in the container telling the player to play back the audio at a slower rate? Thanks in advance!


[Edit] This occurs in all DVDs that I convert, not just one :confused:

18th June 2004, 16:05
i don't think it'll reencode

to get the values just try

20th June 2004, 03:28
also you could change the framerate of the video by using a vfr file and just enter the basic fps and no variations

20th June 2004, 08:37
Originally posted by E-Male
also you could change the framerate of the video by using a vfr file and just enter the basic fps and no variations
Yeah, I was able to speed up the video so the synch was close enough to the audio not to notice it. It still seems odd that it happens with every DVD, so I'm going to try encoding with GK from now on and see how that turns out. Thanks for the advice!

21st June 2004, 08:51

Your PC have a strange behavior ;)

The problem you have could also be caused because of the decoding process. If your PC isn't fast enough or you use a decoder that use a lot of resources, it could cause that. You may want to try ffdshow to decode (use few cpu resources) and Media Player Classic as video player. Don't use any postprocessing and/or filters (sharpen, noise, etc...).

If you use XviD or DivX, make sure you don't use any film noise.

If it doesn't help, you could maybe open your video file in VDmod and use the 'change framerate so video and audio match' (or something like that, I don't remember the exact term) option, and use 'direct stream copy'. You don't re-encode, just change the video FPS so it fits the audio length.

Another thing you should also check it's if the audio output isn't broken. If it's, when you mux into Matroska, it'll skip the 'bad frames' and you'll have a delay between video and audio.

I hope some of this will help :cool: