Log in

View Full Version : OGM audio drift


Kent Wang
2nd July 2003, 22:32
Sample is Animatrix. I don't have this problem with anything else.

Anyway, I used GordianKnot for the DivX 5 video stream. Then I mux together with vdmod (latest version). The audio becomes less and less sychronized throughout the film.

But, I checked the Frame Rate Control tool in vdmod and noticed that it lists the frame rate at 29.9700 (or something like that, I'm at work and can't remember perfectly), and the option below it "Adjust frame rate to match audio length" lists the frame rate to be 29.9702. So I tried that option and didn't notice changes. But, this does seem kind of funny that the frame rate is off like that.

This is true with both Ogg and WAV audio streams. I'm pretty sure it's vdmod's treatment of the framerate with OGMs.

Suiryc
3rd July 2003, 17:35
There is no special treatment of the framerate concerning OGM files.
The 29.9702 is the framerate that should be used for the video and audio to lasts exactly the same time. Since most of the time video and audio don't last exactly the same it's common that the proposed framerate differs from the real one.

In your example the difference is of 0.0002 frame per second.
This means a difference of 1 frame (33.4 ms) every 5000 seconds (= 1h23). So if your video lasts 1h23 the difference of duration between the video and the audio would be of 33.4ms, which seems quite good for me (both streams lasts about the same, I don't think a lot of people would notice a delay of 33.4ms that's why you didn't notice anything by applying this framerate).

How long lasts your clip ? And according to you what is the delay between video and audio at the end of the clip ?
What audio did you use ? (Vorbis ?, mono/stereo ? what samplerate ?).

DDie
3rd July 2003, 20:30
I got to know by someone who regularly compresses DV-Rips to OGMs. The MP2-stream contained "time-stamps" (i dunno the right expression for it) which cause BeSweet to adjust the timing of the Audio file.. :(

Solving this problem can be done by using another audio converter.

Kent Wang
3rd July 2003, 21:22
Originally I noticed it with Ogg (straight from AC3 with OggMachine). I also tried Azid to just decompress to WAV. Both drift.

soulfx
4th July 2003, 00:25
Vorbis, VirtualDubMod, and AviSynth have nothing to do with this. I did this movie a couple of weeks ago and found the _source AC3_ ripped from the original VOB sets (with DVD2AVI) to have a different time durration then the video stream. Animatrix is like the title suggests an anime type movie. Anime movies often come with their set of "challenges."

This is not a bug or issue in any format, program, or encoder. The source AC3 audio extracted from the original VOB files are off initially, this will cause anything you do after it to be off as well.

Your first idea of using VdubMod's "Adjust frame rate to match audio length" will work to fix the problems you have. At least it worked for me, but I had IVTC'd down to 23fps. Make sure to Direct Stream it back out to a file.

No need to keep searching for bugs in Vorbis, BeSweet, OggMachine, Azid, whatever. There are none. The source audio is off therefor everything else you encode it into will be off as well. I'm just guessing, but I believe the reason why it plays okay in the VOBs and on the DVD is because of those time-stamps that DDie was talking about.

Toward the end of the movie the video/audio sync (before you match the video framerate to the audio) is off by quite a bit. If I remember correctly it's someplace around 800ms. Very noticable, but also very easy to fix.

Kent Wang
16th November 2003, 20:10
Indeed, VdubMod's "Adjust frame rate to match audio length" worked.