Log in

View Full Version : Part 1: Audio Sync


kthulhu
9th May 2002, 23:04
I'm dividing this post into three parts. They are about things I am trying to do with ogg streams, one things lead to another, but they are three different things.

I regulary get some clips in SVCD and I pass them to AVI/MP3. For some reason audio always gets out of sync with video. To fix this I change the fps of video with Nandub's "Change so video and audio duration match". It always worked, at least for these particular clips.

Now... I decided to test the OGG/Vorbis. But then I found the same audio sync problem.

I made a small tool, similar to "Avifrate", but with the "video and audio duration" option in it. It will only read audio in ogg/vorbis format. With libvorbis' vorbisfile API its very easy to read and get info from ogg/vorbis files.

If you think this tool could be useful you can get it at http://www.kadath.com.ar/frateadj/

If somebody wants support for other audio file I guess I could try and add it.

Neo Neko
9th May 2002, 23:21
Originally posted by kthulhu
I regulary get some clips in SVCD and I pass them to AVI/MP3. For some reason audio always gets out of sync with video. To fix this I change the fps of video with Nandub's "Change so video and audio duration match". It always worked, at least for these particular clips.


Some SVCD have audio delays much like DVD. Stretching the audio only makes things worse in my book. Currently there is no way to set a delay for OGG. Although it is possible. Dumping the audio to PCM and attaching the needed delay as rendered silence to the begining will remedy it as well. :D

kthulhu
9th May 2002, 23:44
MMmmm... Yes. You are right about that. But DVD2AVI shows no delay for the audio track. And in this cases I'm not streching audio, I'm streching video. Anyway... I stopped asking "why?" month ago. I just know that on these SVCD clips, if I do this, audio and video get in perfect sync. :)