<p>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)</p>

CC BY-SA 3.0
2014-12-05T22:19:59.693Z
But the video is 30fps. what would I change to reflect that?
octuplex
CC BY-SA 3.0
2014-12-06T06:45:36.617Z
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
CC BY-SA 3.0
2014-12-05T09:12:20.477Z
2014-12-05T09:12:20.477Z
tomh
<p>Interesting that LW shows it as '24 fps' since audio technically doesn't have a frame rate, which is a video concept.</p>

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

<p>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... (-:</p>

CC BY-SA 3.0
2015-01-11T08:22:00.967Z
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
CC BY-SA 3.0
2015-01-11T09:27:40.500Z
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
CC BY-SA 3.0
2014-12-05T22:20:46.050Z
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
CC BY-SA 3.0
2014-12-05T11:40:00.300Z
2014-12-05T11:40:00.300Z
Jim Mack
<p>In the question <a href="https://video.stackexchange.com/questions/14529/sync-separate-audio-to-videobad-camera-audio-free-nle-recommendations">Sync separate audio to video+bad-camera-audio, free NLE recommendations</a> I detailed how I manually did A/V sync for audio recorded separately from the video, with audacity and ffmpeg.</p>

<p>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.</p>

CC BY-SA 3.0
2015-01-11T13:02:48.893Z
2015-01-11T13:09:20.890Z
2017-04-13T12:46:08.110Z
Peter Cordes
<p>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.</p>

<p>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.</p>

CC BY-SA 3.0
2014-12-05T16:21:10.957Z
2014-12-05T16:21:10.957Z
AJ Henderson
<p>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.</p>

<p>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.</p>

<p>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.</p>

<editing><audio><sync>
Video desyncs with the audio over time
octuplex
# Video desyncs with the audio over time

(Asked by: username_0 on 2014-12-05)

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.

**Tags:** editing, audio, sync


---

## 4 answers

### Answer by username_1 on 2014-12-05. Score: 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)

> **Comments:**
> **username_0**: But the video is 30fps. what would I change to reflect that?  
> **username_1**: 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.  

---

### Answer by username_2 on 2014-12-05. Score: 1

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

As @username_1 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... (-:

> **Comments:**
> **username_0**: 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.  
> **username_3**: 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=...`  
> **username_3**: 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.  

---

### Answer by username_3 on 2015-01-11. Score: 1

In the question [Sync separate audio to video+bad-camera-audio, free NLE recommendations](https://video.stackexchange.com/questions/14529/sync-separate-audio-to-videobad-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.


---

### Answer by username_4 on 2014-12-05. Score: 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 username_2 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.


---

