6

I record footage with OBS and do voiceovers recorded in audacity. I process the audio in audacity, then sync the audio with the video. However, since I started doing it this way, the audio and video are not syncing up.

It starts out fine with a definite sync point (countdown from 3 and then I do something like click on something) but as the video progresses, the video starts lagging behind the audio. near the end of a 20 minute video, the disparity is nearly 3 seconds.

Someone brought up framerate. the footage is 30 FPS and Lightworks lists the audio as 24 FPS. The mic is set to 44100 Hz as well, if that helps.

1

Make sure the sample rates in both systems are the same. I don't know what OBS is, but if I was using Final Cut for video editing, I would make my project 48kHz, and make sure any external recordings were also at 48kHz. Even with the same sample rates, audio will drift over periods of more than a few minutes. Either sync it up manually in chunks, or use something like Pluralize to do it for you. (Or have a fixed sample clock between all your devices when you record- probably not possible)

  • But the video is 30fps. what would I change to reflect that? – octuplex Dec 5 '14 at 22:19
  • The frame rate only refers to video. Audio isn't split by frames - you should only need to set sample and bit rates to be the same. – tomh Dec 6 '14 at 6:45
1

Interesting that LW shows it as '24 fps' since audio technically doesn't have a frame rate, which is a video concept.

As @tomh suggests, make sure the sample rates for the project is 48K, and that you export a 48K WAV file from Audacity.

If that doesn't cure, you can use Audacity to 'pre-stretch' the audio by some percentage. Find sync points near the beginning and end of the piece (the longest stretch you can), then compute the difference as a ratio. Using 'Effect..Change Tempo', apply the inverse of that ratio. It's possible that this number will apply for everything you do, so write it down... (-:

  • How do you set the sample rates in audacity if you don't mind my asking? Audacity has a hell of a lot of buttons. – octuplex Dec 5 '14 at 22:20
  • There's no point in resampling the audio to 48kHz, unless your video software is going to do that anyway. (project rate is set in the bottom left corner.) The important point is finding a sync point at the start AND end, because the clock for your audio runs at a slightly different speed from your video. You can either stretch the audio with audacity, or tweak the video FPS from what it thought was 30fps back to ACTUALLY 30fps, assuming your audio clock was accurate. ffmpeg -vf setpts=... – Peter Cordes Jan 11 '15 at 8:22
  • oops, mis-stated things for the video stretching case: A camera with an inaccurate clock will think it's recording at 30fps, but actually record anywhere from 29.95 or 30.05. I've only done one of my samples so far, but probably the same speed-correction will work for others. So what I did was stretch the video to match the audio, ending up with a 29.97fps video (coincidence that that is close to color NTSC fps), because that's what my digital camera actually recorded at, assuming my laptop audio samplerate clock is accurate. – Peter Cordes Jan 11 '15 at 9:27
1

In the question Sync separate audio to video+bad-camera-audio, free NLE recommendations I detailed how I manually did A/V sync for audio recorded separately from the video, with audacity and ffmpeg.

44.1kHz vs 48kHz has nothing to do with the drift. The problem is that the camera's clock isn't exactly the same speed as the laptop's clock, so even though they both think they're recording 1 second per second, they drift relative to one another. You need to stretch the video or the audio by 3 secs per 20mins, not just resample.

0

The other answers both cover the ideal case pretty well, but there is another less ideal case. Depending on your type of video, it is possible you have either bad clock sync or dropped frames. Bad clock sync will hopefully be corrected by the stretching method Jim Mack mentioned, but if the clock is irregular (pretty unlikely in this day) then you could have something pretty much unsalvageable without a lot of manual effort.

The more common issue that can be seen is dropped frames. In the event that either the camera, or in the case of anything on tape, the transfer lagged, then frames can be dropped from the video. In the event of dropped frames, audio can drift when the missing video information is skipped. For these cases, you have to try to identify where the dropped frames are and drop audio from those points to stay consistent with the video. Again, this is a pretty painstaking and manual process, so I hope that one of the other answers helps before you get stuck with one of these non-ideal scenarios.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.