Audio & Video is out of sync after exporting

Hi there long story here but it’s an important read and I’m begging for help.

I’ve spent a long time editing a video and the video and audio are not in sync after exporting. So a bit of context, it’s combined with the two below recorded videos, and I’ve made a lot of cuts and added video/audio effects, as well as a few images and audio clips. Also to note, my video is almost 15 minutes long. In Shotcut while editing, everything plays normally with no lag amongst the videos and audios. Sure it’s a bit laggy when playing it through the Project preview, but I managed to deal with that because the actual audio and video were in sync and I thought it would all come together once I exported it. So I did that, and it starts out fine, but you realise a few minutes in that the audio and video are slightly out of sync. It gradually becomes worse throughout the video and by the end it’s like 1-2 seconds out of sync which is a considerable amount. Watching the exported videos back, the video is lagging behind the audio. I’ve tried all the below presets and tried changing the frame rate and the quality and nothing. I thought i should also add that I tried another free program called Blender for video editing, and that was out of sync as well after rendering. I read about that program having a lot of issues though and that was also on an old laptop. I just bought this laptop and I read a lot of good things about Shotcut, so I tried it. This is pulling my hair out because I’m new to video editing but I enjoy doing it, an more importantly, I’ve worked so hard on this but every export is just the same issue. Parallel processing has also always been unchecked the whole time (as a default). Can anyone please help me?

Recorded videos (2)

  1. iPhone 8 Plus video camera mov file
    Resolution: 1920x1080
    Frame rate: 29.968871
  2. Screen recording - recorded in OBS Studio mp4 file
    Resolution: 1920x1080
    Frame rate: 60

Shotcut version 20.04.12
Exported in many different presets mainly the three below, but same issue every time
H.264 High Profile
Youtube
DNxHD (HD 1080p 29.97 fps)
Tried changing advanced export settings in both (frame rate and codec quality)

Computer
Windows 10 - 64 bit
9th Gen Intel Core i5
Installed RAM: 16 GB
Storage Size: 512 GB
Graphics: NVIDIA GeForce GTX1050

Sorry about the long paragraph but if anyone could help me out that would be greatly appreciated. And obviously whatever other details is needed, please let me know. I’m happy to provide screenshots and/or the actual videos themselves I’ve exported.

1 Like

Are you exporting using Hardware Encoding. Some users who have experience audio sync problems on exporting found that this was the cause of their problem.

I had the same problem. Do NOT use preview as affirmation of A/V Sync. Go by your wave forms and Markers. See my bug report also. In my case it was 6 frames off. I just did a video with my iphone 8 instead of my go-pro and once again preview audio was slightly out of sync, but my wave-forms line up. Exported with perfect audio sync in Pro-Res 4:2. Then I use handbrake to get that down to a more manageable size.

That’s kind of strange, but I’ll have to give it a go!

So to clarify, you’re saying that I have to detach the audios from my videos and adjust them to be 6 frames back? Does this also explain why my exported video starts off fine and it gradually gets worse? How will moving the audio affect different parts of the video where it’s not laggy in the beginning, but the by the end it’s a lot different, as well as along the way?

No, the Hardware Encoder has been unchecked the whole time actually.

Yes to all of your questions. My videos too would start if In sync and then get out of sync. I spent a whole weekend trying to figure it out. All I know is that myself and another user both have had to do this. My editing style is this. Audio is always on a separate or multiple tracks. Get the audio in sync in the preview then get the play head to the beginning of your project. Then move the play head by 6 frames using the up/down arrows in the preview window. Now move your audio file to the new placement of the play head and export. Let us know

Okay I’ll have to try this. But just to note something - I had also saved my video prior to adding effects separately and all that (so with all my cutting and editing done) and I just exported that to see if there was any issues, and that’s perfectly in sync. The file with a lot of video and audio effects is the one that’s lagging behind. Is there any explanation behind this?

I do not have an answer to that situation. My videos all had the issue whether they had transitions, effect, or key frames in them. All my audio has always been a separate source file from the start. Is your audio compressed? Is it a constant or variable bitrate file? These are also things to consider if you have not. You can check directly into the properties tab of your clips and it will tell you if the audio was saved in constant or Variable.

I’ve looked in the Properties tab in Shotcut and I’m unable to locate anything do with constant or variable bitrate. Are you able to show me where it is? I’m still fairly new to Shotcut. Also just some random things I’ve noticed, does ‘Scan Mode’ under the Videos tab in Properties as well as ‘Pitch Compensation’ relate to this issue at all? Also just wanted to state that I really appreciate your help on this.

I will get that screenshot for you tomorrow. My system is at work. Have a great night. If you want to look still tonight here is some guidance. The properties tab is beside the playlist and export tabs

Thanks again, I really appreciate that. I feel like that ‘Pitch Compensation’ may have something to do with it. I just watched my exported video back again (the fully edited one with the lag) and I was concentrating on where the lag increases and I’m FAIRLY certain that it increases directly after each time I’ve used a ‘Pitch’ filter on a clip, and most of the time I’ve decreased the pitch in a lot of my clips. I might try ticking Pitch Compensation and I’ll let you know how that goes. Thanks again x2!

Okay, your situation is different then mine as I use Audacity to work with my audio. You using the pitch filter, I assume for some comedic /silly purposes, would be different than what I do. If you are using pitch filter for any cleanup then I would definitely try using another audio program to do this outside of shotcut.

Just to clarify, do you mean I should use audio filters outside of Shotcut prior to rendering?

Define Filters. All my audio is recorded separate from the video. We do instructional videos, so I am always using audacity to reduce the noise floor (static) and normalize the volume so that they are equal among each recorded take. I get the room reverb out if needed when we shoot in a warehouse style environment. I also EQ the sound, but I have never used audio Filters to make effects in Shotcut. I recommend using different tools for what they are best at and defined to do. Pro-logic is an awesome DAW if you are strictly recording audio and a bunch of separate audio tracks. This only works with MACs and is way more than what you would need for just simple projects. Audacity can handle vocal audio just fine. It is not specialized for mixing multiple tracks like Pro-Logic and other Digital Audio Workstations. You typically work with one track at a time. It is not limited to one track as you can insert as many as you want and mix. It is just not as graphically friendly towards multi-track. Very powerful and free, just a little bit of a learning curve

Odd situation, but for the future recordings use a “Clapperboard” as it gives a audio and video sync point. I use electronic clapperboards in business but you can make your own too! Take a look at this
https://www.youtube.com/watch?v=FYBsN7JGXjY

Wanted to just say thank you to Camzl1. I had done all this work editing my video only to discover the same frustrating video lag issue. I had started with a video file with attached audio, which I promptly detached and then followed the advice to not sync my audio to video through the preview, and instead advanced the audio six frames, which worked. So strange, but very glad for these forums because I would never have thought to try that.

2 Likes

This topic was automatically closed after 90 days. New replies are no longer allowed.