Why does audio slowly get out of sync?

riredale wrote on 5/5/2003, 12:04 PM
I've put more than a few hours sitting in front of Vegas, but I just noticed something very odd. If I do a capture from DV tape and put the avi file on the timeline, I now see that the audio very gradually gets out of sync with the video. If I capture a 4GB file (about 18 min 50 sec) and zoom in on the end of the timeline, I can clearly see that the audio track ends about 1 1/4 frames (NTSC) beyond the end of the video track. If I instead capture a much longer avi file onto my NTFS disk, the lag gradually gets worse--after 1 hour the lag is up to about 4 frames.

Is this typical? Is this due to the "unlocked" audio aspect of the DV standard? Four frames is about 1/7th of a second, something that should be noticeable by many people.

These avis were captured using the "ScenalyzerLive" program, and I intend to go back and try the same thing with VidCap, but I strongly suspect the results will be the same.

This effect might also account for some of the bizarre results I got with a project last fall, where my clips were corrupted by a single frame. In other words, if the audio was longer than the video and I was butting up succeeding clips, then perhaps the end of the video was dragged over an extra frame in order to line up with the audio track. That extra frame, of course, would have come from the beginning of that clip, since Vegas was configured to loop back to the beginning of the clip when extending the duration of the clip.

Comments

Chienworks wrote on 5/5/2003, 12:34 PM
It might be a ScenalyzerLive problem. I just did a 63 minute DV capture with VidCap 4 under XP last night and the sync was effectively perfect right to the last frame.
vitalforce2 wrote on 5/5/2003, 12:54 PM

I have noticed that if you zoom, shuttle, and otherwise hop around the timeline while an avi is playing the audio can go out of sync until you pause and restart whatever's playing. That fixes it--may not be the problem you're talking about, but if you see it in the future be assured that's not another sync symptom.
TheHappyFriar wrote on 5/5/2003, 2:07 PM
can you hear the audio out of sync? at work I'm working on a computer and capturing via ATI AIW 7500. The audio is always a few frames to 1/2 second longer then the video, but it's synced up. There's just a couple frames of blank audio at the end.
johnmeyer wrote on 5/5/2003, 2:35 PM
I have found that if I capture with ANY application other than Vegas, that when I import the AVI into Vegas, the sound is several frames shorter than the video. You can see it right on the timeline. I assume that this has something to do with the Vegas DV encoder, which is only used inside of Vegas. I'm not at all happy about it because there are many reasons to use an external capture application like SCLive (Scenalyzer), especially for analog footage (SCLive has good optical scene detection).

I asked about this here in this forum a month ago, and received a workaround from a user to re-interleave the audio using VirtualDub. This worked the first time I tried it, but hasn't worked since.

Recently, I reset all options using the hidden menu in Preferences, and am finding that DV video captured from my camera is now in sync (I also updated my video drivers, so that may be part of the fix). However, any analog video captured using my ATI 8500DV drivers, whether saved in MPEG-2 or DV AVI format, still has audio that is many frames longer than the video.

John Meyer
riredale wrote on 5/5/2003, 10:31 PM
Sorry, gang, I tried a recapture using the VidCap application, and the audio is fine now. So the issue is with ScenalyzerLive. I had heard that Scenalyzer had switched to the (proper) frame rate of 30*(1000/1001) rather than the 29.97 rate earlier versions had been using. Doing the math shows that the difference would account for nearly all of the discrepancy noted. I thought I had the newer version, but I'll have to check now.

In any event, sorry I brought this thread up without first capturing with VidCap to verify the problem.
jetdv wrote on 5/6/2003, 9:13 AM
The current version for download is dated 11-15-2002. I've been using the 11-15-2002 version which seems to be working fine. According to the "history" file, this is the version that changed to the correct framerate for Vegas.
riredale wrote on 5/6/2003, 1:56 PM
jetdv:
I know, that's what's so weird here. I'm using the current version, which is formally called version 2 but is also known as the November 15th download. I even went and downloaded it again; same effect.

To confirm the problem, I made a tape. I did handclaps at the beginning, and more handclaps 70 minutes later (recording miniDV in LP mode). When I brought that tape into Vegas I made two avis, one with VidCap and the second with ScenalyzerLive. I recorded onto an NTFS drive, so I was not limited by 4GB boundaries.

Anyway, after loading both avis onto Vegas, I synched the handclaps at the beginning (they were about 1/2 frame behind the video frame showing hands together). I then went to the 70-minute portion of the avis. Sure enough, the VidCap showed handclaps in similar sync with video, while the ScenalyzerLive avi showed the audio trailing by about 4 frames.

One temporary workaround is to capture in 2GB chunks, since ScenalyzerLive then gets a chance to re-sync with the beginning of each avi segment. Still, I would like to find out why it drifts in the first place.

The only reason I want to continue using ScenalyzerLive for capture is that it uses the video timestamp as the file name, making it very easy to track all my clips. I also like the visual clip presentation--it's an elegant solution to the capture hassle.
jetdv wrote on 5/6/2003, 2:14 PM
Is the same true when the audio is captured into a separate WAV file in Scenalyzer. I use scenalyzer to capture 4-channel audio events with Video + Stereo 1 in the AVI file and Stereo 2 in a WAV file (stereo 2 is my Wireless). I've never seen a noticable drift between my Vidcap captured other cameras and the Scenalyzer captured files (going by EARS - I've never LOOKED).
mikkie wrote on 5/6/2003, 3:13 PM
The video and audio clocks and the speed of those clocks are very different, which just about always causes some problems - thankfully these are normally taken care of by the software. Unthankfully, a whole lot of stuff can keep the software from doing it's best IMO, like the brand of audio card, driver version, what else is running and so on, and some setups are easier to break then others.

In my experience, whether you're capturing whatever or heaven forbid, converting a DVD, when the audio doesn't end with the video, stretching it with Vegas is IMO as close to flawless as one can hear. I normally hit the button to go to the end of the timeline, drag the audio (assuming the audio is longer) so it's shorter then the video track, hit the button to go to the end again, click undo to put the audio back, then control-drag the audio to match. Sounds complicated but takes about 2 seconds with no delay in rendering.

FWIW, if you're off by a frame, or even 4 or 5, in most cases you can't see a lip sync prob., so maybe don't kill yourself trying to fix a problem *if* you don't see one.

Be careful about audio not reaching both ends of your rendered project if you are feeding the rendered video to winmedia encoder 9 - it might refuse to take the video.

There are many ways (reasons) that the audio can drift out of sync, and in very stuborn cases, simply splitting the timeline repeatedly can force sync in most editors.

RE: bad frames... I've come across instances with video out of V/Dub that has anomolies when placed on the Vegas timeline - the last frame of a clip actually showed the first frame. It appeared a timing issue IMO as dragging the clip one frame shorter then back seemed to correct the problem in most cases. I'm not saying you used V/Dub, but only that this is a possible problem I've seen crop up enough that I usually check the end of a clip I import just to be safe when not adding transitions.

It would be possible for the audio extending to force a blank frame where the clips butt. OTOH, if you're only talking a frame (or a few) at the end of the timeline, (depending on proj length) I doubt if it is enough to cause this.

Trivia: if you're really into this, there are a few sites you can search for that break the differences in clocks down with tables and all, showing just how difficult a task this is, and how well software compensates.
etal wrote on 5/6/2003, 4:03 PM
Maybe I missed it in the string, but are you having problems when using a particular DV format? There is a differnece in the in camera recording process between miniDV and DVCAM. The higher-end pro and 'pro-sumer', 3CCD cameras that can use DVCAM, record the audio and video signals at the same speed. However, when using DVcamcorders that record to miniDV, the circuitry that processes the audio and video streams do not "sync". The audio will always lag, and unfortunately doesn't show up until your 30+ minutes into your source tape. I've been bitten by this only on long miniDV recordings. Yes, it does show up earlier, about fifteen minutes in, but only off by a frame or two. And if you post for web and render at 15fps anyway, it will be largely missed. Happy cutting.
PAW wrote on 5/6/2003, 5:27 PM

In SCLive under File -> Options -> General there is an option to keep DV audio in sync.

Have you tried this?

Regards, PAW
riredale wrote on 5/6/2003, 11:13 PM
PAW:
Yes, I tried the "Keep DV audio in sync" both ways, same result.

etal:
I remember reading about miniDV having "unlocked" audio, but in this instance it was very clear that VidCap did a perfect job of keeping audio in sync while ScenalyzerLive did not.

mikkie:
A single frame is no big deal; heck, recording audio from 50 feet away can give bigger delays than that. But if I intend to capture a 90-minute miniDV tape, that implies 6 or 7 frames of delay, and not only would that be very obvious, but it also screws up my editing, in that the audio track is longer than the video track, and could create all sorts of mayhem when appending clips.

jetdv:
I haven't tried doing a wav file separately (yet).


Finally, I have found that if I take the end edge of the audio track and do a control-drag back to make it line up with the end of the video track, then the sync is perfect again. This implies that I will need to re-render the whole clip, which can take 30 minutes. But it's no big deal in that I'm used to running multiple instances of Vegas, with the re-rendering taking place in the background at idle priority so it has no effect on my foreground Vegas work. It's just one more step in the project, and one I'd rather avoid. But I do like ScenalyzerLive!