31
$\begingroup$

I imported my video file and for some reason (even though the video is one frame smaller than the audio) the video and audio do not sync after being played back for a certain amount of time. If I were to click on the sequencer and place it at any point in time, the audio and video would start off in sync, but if I were to play it from that point the audio and video would gradually de-sync. Also, the video was recorded in OBS but it plays back well and in sync using VLC.

Here is information about the video file and more info about obs and the video file itself (it was just for testing purposes): https://mega.co.nz/#F!rRcSXCQT!fpjUOjGYzolRO-6zfZgpbA

The easiest way of understanding what I mean would be to listen for the sound of the clicks during the video then pause and start it mid way. You will then hear the video and audio re-sync and start off from where it should have but then gradually de-sync.

$\endgroup$
1
  • $\begingroup$ Also you can try this, for multiple strips with different frame rates. youtube.com/watch?v=3SpVpqsvqwM Makes video editing easy again with blender. $\endgroup$
    – user29276
    Commented Aug 7, 2016 at 18:10

8 Answers 8

36
$\begingroup$

If they start off in sync at any point when you start playing, and gradually goes out sync, it means you don't have AV Sync turned on in the timeline panel.

enter image description here

$\endgroup$
6
  • 1
    $\begingroup$ Yep ... that actually does seem to fix whats been happening. There still is the problem of the tracks not being the same length, but I think that deserves a 2nd question. $\endgroup$ Commented Jan 14, 2014 at 17:25
  • $\begingroup$ Did you adjust the frame rate after you imported the av track? That could cause problems. $\endgroup$
    – Mike Pan
    Commented Jan 14, 2014 at 19:40
  • $\begingroup$ No that wasn't it :s $\endgroup$ Commented Jan 14, 2014 at 20:29
  • 4
    $\begingroup$ The reason why this helps is because on default, blender tries to display every single frame while playing. This means that if your FPS during the playing is even slightly lower than the original footage, the video will get delayed, while the audio continues at the same speed. AV-sync means that blender will skip a frame if the video gets behind on the audio, so it can keep up with it. $\endgroup$
    – Ezra
    Commented Jul 5, 2015 at 20:56
  • 1
    $\begingroup$ Blender 2.92+: Timeline panel -> Playback -> Sync -> Sync to Audio $\endgroup$
    – Nearoo
    Commented Jun 25, 2021 at 7:29
13
$\begingroup$

In the VSE the video and audio tracks are separated and use different ways to measure length. Video is measured in frames while sound is in seconds.

Adjusting the frame rate of the video will alter the playback length of the video but the audio will always take the same amount of time to play.

As an example a short video at 24 fps needs 2763 frames to play.

enter image description here

By changing the frame rate to 25 fps the video remains at 2763 frames but the audio length extends to 2879 frames to maintain the same length in seconds. This will gradually put the audio out of sync with the video.

enter image description here

You need to make sure that the frame rate in the render settings matches the original frame rate of the video so that it's playback time matches the audio length.

$\endgroup$
7
  • $\begingroup$ If only it were that easy. They are both (the editor and the video) set to 60 fps. $\endgroup$ Commented Jan 13, 2014 at 14:21
  • $\begingroup$ It may be the case that the actual footage is not 60fps, but something like 59.94fps, etc. I stumbled upon this question with a footage that says '24fps' in the camera settings, but is actually '23.97fps' when I read metadata in a video player like Media Player Classic. In my case 'A/V sync' only improved it a bit, but it was still going out of sync after some 9 minutes. $\endgroup$
    – hayavuk
    Commented Sep 4, 2014 at 20:02
  • $\begingroup$ @bvukelic And so what did you do to eventually fix it? $\endgroup$
    – KhoPhi
    Commented Jan 20, 2015 at 14:51
  • $\begingroup$ @Rexford Sort of, by correcting the frame rate of the whole project (i.e., I'm not sure how you'd fix it if you wanted to keep the frame rate of the project) $\endgroup$
    – hayavuk
    Commented Jan 20, 2015 at 18:37
  • 2
    $\begingroup$ @Rexford - audio is a time based medium, it has no record of frames. Video is frame based - it is a collection of frames to be played one after the other. Currently blender is only programmed to play the frames in the video based on the render settings. I think this decision would have been the easiest programming solution when it was created, I believe the VSE was created more as a small convenience rather than considering the best way to handle all video editing needs. $\endgroup$
    – sambler
    Commented Jan 21, 2015 at 13:10
4
$\begingroup$

The accepted answer by @Mike-Pan worked for me, but in 2.82 it's in the bottom left corner at Playback > Sync Mode

enter image description here

Unfortunately, there doesn't seem to be a way to set AV-sync as the default, so I'll have to remember to set that every time I load Blender to do video editing.

$\endgroup$
2
$\begingroup$

I had a lot of difficulty with a similar problem. In particular I had 2 video sources which I recorded with quicktime that had different frame rates. The first one would be synced with the audio but the second one would inevitably not be synced up. I tried various combinations of custom frame rates and frame rate bases but nothing seemed to help. Worse was sometimes the video seemed to by synced with the audio but when I rendered it several hours later I would find it not to be.

What I ended up doing was using a transcoder (http://handbrake.fr/ cross platform mac/windows/ubuntu linux and free) to adjust the frame rates of both video sources to a standard 29.97. This was friendlier to blender and the problems all went away when I set the properties Frame Rate to 29.97 fps before importing to the Video Sequence Editor.

$\endgroup$
1
  • $\begingroup$ Unfortunately didn't work for me. What worked was to use Windows 10 built in Video Editor $\endgroup$
    – Mr. Blond
    Commented Sep 11, 2021 at 7:15
1
$\begingroup$

Here was the best solution I came across.

He just dragged out the end of the video snip by grabbing it then dragging, he added speed effect by selecting the strip and then going to Add > Effects Strip.. > Speed Control, then he made sure the box that says "Stretch to input strip length" in checked in the Speed Controls.

By doing this he was able to change the rendering to match the audio file even within a project that had a different FPS

$\endgroup$
1
$\begingroup$

Blender's video and audio don't sync when editing (Solution):

As a new user to blender I experienced the same problem mentioned above and below by swiftsword94:

"I imported my video file and for some reason (even though the video is one frame smaller than the audio) the video and audio do not sync after being played back for a certain amount of time. If I were to click on the sequencer and place it at any point in time, the audio and video would start off in sync, but if I were to play it from that point the audio and video would gradually de-sync."

Solution:

What I realized after being unable to make them sink up properly is 'Preview mode' is not an accurate representation of what the video will play like after it has been rendered when you click the 'Render' drop-down menu and select 'Render Animation'. After the entire video has been rendered the video and audio should sync up perfectly.

Regards,

enter image description here

$\endgroup$
0
$\begingroup$

I know this is an old question, but the software has changed and I didn't find another Question about this, so I'm posting this here, since I found a somewhat different solution than the existing Answers.

What you'll need to do is to click on the FPS drop-down and select "Custom". This will let you choose some new values One is the standard "FPS" (red arrow) and the other is ":/" (green arrow), whatever that means. It's evidently a modifier to the "FPS" and will take some fiddling around to make it work. These somehow combine to make up the actual "Custom" frame rate (purple arrow).

Blender FPS settings

What I had to do is adjust the two settings until the video and audio were very nearly the same length in the Timeline window. I just kept adjusting things until the video was synced, or at least close enough to not really notice a difference, through the whole video. The original setting for this specific video were at 29.97 FPS, but the video was moving in slow-mo and the audio was just fine. Now the video is moving normally and the audio matches the lip movements and other actions.

$\endgroup$
3
  • 1
    $\begingroup$ The "/" means a division: the frame rate in integers, divided by something, so that you can get fractional numbers, like 29.97 or 23.98, etc, $\endgroup$
    – susu
    Commented Jan 31, 2021 at 1:31
  • $\begingroup$ @susu, good to know! They have plenty of room for a real description, plus a tooltip that should make this more understandable of what that actually means. $\endgroup$ Commented Jan 31, 2021 at 18:27
  • $\begingroup$ You can put a request to make that happen. Please read: what is the place to put feature requests $\endgroup$
    – susu
    Commented Jan 31, 2021 at 18:30
0
$\begingroup$

I ran into this problem today in Blender 4.1 on a Mac, and I only found one solution that worked for me. Although there are plenty of great suggestions already shared in this thread, none of them seemed to work.

The only thing that seemed to fix the problem was starting completely over with an entirely new Blender file. And making sure the very first thing I did after creating the file was change the Frame Rate value to my needs, not later on. Then, only after that point I imported my music file in the Graph Editor using Sound to Samples. Oddly enough, I was able to successfully still use "Play Every Frame" in Sync.

I realize starting an entirely new project file from scratch to do this step first might be a big pain if you've gotten far along in the project file already.

Not entirely sure why this worked, but it did.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .