Audio sync issue when exporting video

I’m having trouble exporting video to mp4. In the editor when running the timeline the audio and the image are synchronized, but when I export the video the audio is ahead of the image. How can I export the project with synchronized audio and video?

I’m using version 18.06.02

Does the same thing happen with 18.03? (the last most stable version)

https://github.com/mltframework/shotcut/releases/tag/v18.03

I’ll try this version. Thanks.

Hi, folks.

TL;DR: Try subtracting a single frame of audio or video from your timeline at a regular interval for longer videos.

Writing this as a thank you/update to this locked thread:

(Audio Aligns With Video In Shotcut, But Goes Out Of Sync After Export))

I really struggled with this for a long time. All of the replies were extremely helpful, and put me somewhat on the right track, but I still had issues. Almost bought video editing software, but when I looked into it, it seems this problem is just endemic to using a separate audio and video source. So I would just be paying for a bunch of features I would never use and still have the same problem with a new program I’d have to learn. So I kept at it.

I had issues with variable frame rate. As suggested in the other thread, I used handbrake to convert. Situation improved but not solved. I tried matching my audio properties to the export settings. Situation improved but not solved. I tried to learn about some of the more complex fixes suggested with no luck–major boomer problems.

For context, I’m an educator recording lectures. The problem doesn’t really become noticeable until about 10-15 minutes into the video. But it gets really bad anything 20+. So I tried cutting up into segments, and nothing worked until…

I figured out that the rate the sound and video get exported is constant but not completely synched, kind of like cars set on cruise control side by side at 60mph. Except one car is actually going 60.07mph and the other 60.13mph. They’ll stay side by side for a good amount of time, but the longer they drive, the more out of sync they’ll get. My solution was pretty basic and boomerish, but it worked perfectly and saved me a ton of time with splicing up videos and such. I simply zoomed in as far as I could about ten minutes into the video and cut a single frame of video (and not audio) from the timeline (in my case the video seemed to be creeping ahead slightly faster than the sound). I then cut one video frame around the 15, 20, 25 min marks, etc. This won’t keep the two cars synced at 60mph, but it brings the faster car back to parallel close enough that the eye can’t tell the difference. No doubt the variance will differ depending on settings and the audio source you’re using, but if you’re struggling with a similar problem and can’t seem to fix it, this is how I finally solved this very difficult problem (at least for me).

Boomer-fix plugin version 03.2020. Writing in the hopes that this is as helpful to at least one person as everyone else here has been to me. Thanks.

Thank you for sharing your pragmatic solution! But I am going to close this old thread because things are very contextual with respect to version in software. Also, because I have noticed that long-running, popular threads attract spam. In the future and to others reading this, if you have a solution or comment about something closed feel free start a new topic and link to the old thread.