PDA

View Full Version : Sync problem after muxing - need help


jrjazzman
5th July 2003, 18:34
Hi. I am capturing using a Pinnacle DC10+ and Studio 7. My capture file is about 60 minutes and exhibits no sync problems when played in media player. I'm feeding the file into CCE via VirtualDub, and then muxing using bbMpeg. The resulting .mpg file starts in sync but gradually ends up 1-2 seconds out of sync by the end of the 60 minutes. My searching and reading makes me think this has something to do with the capture file. There are probably a total of 60 dropped frames from the entire 60 minute .avi. I'm not sure how these are handled, but if there is some sort of repeat command inserted for the droped frame and either Vdub or CCE is ignoring it, that could cause my sync problem. Has anyone had this type of sync problem? Any ideas for me?

Thanks!

Jeremy

jrjazzman
6th July 2003, 01:06
An update. I tried avisynth -> virtualdub -> CCE, thinking that avisynth would "populate" the dropped frame positions with actual images. However, the resulting .mpg noticeably loses sync after 20-30 minutes.

I installed the Morgan MJPEG codec and I'm giving it a whirl. The theory here is that the Pinnacle decompressor may be causing the problem.

Thanks

jrjazzman
6th July 2003, 05:01
The Morgan MJPEG decompressor did not help. I am totally stumped. If the .avi is 100% in sync, why would cause the .mpg to slowly lose sync?

jrjazzman
6th July 2003, 17:05
For the sake of helping anyone else who may have this problem and what is turning out to be an unprecedented schizophrenic episode, I am posting my 3rd reply to myself. I just noticed that my capture file has a frame rate of 29.975, not the expected 29.97. For my 60 minute clip, that's a difference of 18 frames, or a little over a half a second, and is plenty to produce the noticeable sync degredation I'm experiencing. Damn Pinnacle for having such poor capture software (Studio 7 & 8).

Anyhow, I think that since, essentially, the .wav file associated with this video clip will end up being about .5 sec too short for the accompanying set of video frames (once they're "tightened" to 29.97 fps), I should be able to "stretch" the .wav file by .5 seconds and everything will match up perfectly. Ha!

Jeremy

jrjazzman
6th July 2003, 22:00
Ok this is the last post. Just wanted to let anyone know that the stretching worked.

So, if you're capture program gives you a frame rate other than 29.97 and you're converting to, say, mpeg-2 which requires exactly 29.97, you'll have to strech or shrink your audio file. Here's the formula for doing so:

Z = Y / X

Z = audio scaling factor
Y = capture file frame rate
X = desired frame rate

So, in my case:

Z = 29.975 / 29.97
Z = 1.000166834

So, my new audio file length is calculated as: 3195.558 seconds * 1.000166834 = 3196.091. Only a 1/2 second difference, but it is exactly what I needed.

Oh, I used Goldwave to scale the audio file. Many other programs work well I hear, such as Cool Edit, sound forge, etc. I don't know of any totally free progs that do it.

Thanks

Jeremy