Audio drifts from video

I’ve just edited a video for 3 hours, so it is kinda important that I can fix this without having to change the source video.

I’ve looked at other posts and I can’t seem to fix it - I recorded the video on my iPhone, but there are also other clips added in. There are a lot of filters and jump cuts used, which I don’t know if that messes with it either.

It looks perfectly fine in Shotcut, but then as soon as its exported, the audio begins to drift as time goes on.

I really don’t want to have to edit this whole thing again so any help is appreciated. If you need more information please let me know :frowning:

That might be the source of the problem. Media recorded from phones can be problematic during editing. When you first brought your iPhone footage into Shotcut, did you get a message from Shotcut asking you to convert the video to something edit friendly? It looks like this:

What’s the fps of your iPhone footage? What kind of audio codec does it produce? You can find this out by selecting the footage in Shotcut and then going to the Properties tab and looking at both the video and audio sections.

No I didn’t get any message like that. And the FPS is something like 29.966…

I converted it to edit-friendly, but it gave me the whole unedited video - so I have to edit the WHOLE thing again. If I could fix this without having to do that, that would be ideal.

There might be a way but it depends on what’s causing the audio to go out of sync. You say that there is other footage in your project aside from the iPhone footage. Are those other clips from other phones? If not, what’s the source? Is the majority of your project footage from your iPhone? Does the whole project’s audio start to go out of sync or just the footage from the phone?

Check your new converted to edit-friendly file that you made from the iPhone footage and see if the audio is in sync with the video from start to finish.

The other video has a frame rate of 29.696970 and the main video has a frame rate of 29.968892.

I don’t know if that is causing issues, but it seems like the video starts to go out of sync after that clip has played - for 2 minutes prior to that it seems to be fine. How do I fix it?

(I removed the clip and Im exporting again to see if it fixed it)

Apart from the main iPhone footage you are using, are those other clips in your project footage from other phones?

I removed the clip and it still has the same problem. The other footage was recorded on a different phone yes.

The whole of the video is recorded on an iPhone - I used pitch filters and video distort filters and it seems like the drift starts to happen after those, are they known to affect this? I have a feeling it might be because of the ‘Speed Compensation’ thing in the Pitch filter…

Also the normal video is fine - its just the edited video that drifts when exported. It also looks fine in Shotcut, so I could detach the audio and try to move it, but I’d be pretty much shooting in the dark.

Remove all of the pitch audio filters and export the project. Let us know if the audio still goes out of sync.

Yep, its the pitch.

Im gonna detatch the audio from the video, then add the filter only on the audio track and see if that works.

(When I did this it still messed up the audio - guess I’ll try an external program to change the pitch and then import the audio)

Would you be willing to send your project’s videos and mlt file to the lead developers so that they can fix it? You can send it to them via private message if you don’t want others to see your project. It may be a bug with the Pitch filter that hasn’t been noticed.

Also, in the future, it still may be a good idea to use the covert to edit friendly feature when using footage directly from phones as they can cause issues in editing.

@shotcut & @brian, it seems that there may still be a bug with the Pitch filter regarding the audio going out of sync.

1 Like

Of course, I’ll do it now :slight_smile:
And as for the version it says: 20.02.17

Thanks for all the help!

You’re welcome. :slightly_smiling_face:

And just to make sure, your Shotcut version is 20.02.17, right?

^^
Yes 20.02.17
Just asking, how do I send a private DM to the developers?

In my experience, the pitch filter can add 20-50ms depending on the compensation being applied. I think that most people can not perceive such a small delay. But maybe in some cases they can. If the delay is much longer than that, maybe something is not working correctly.

As a workaround, the user can modify the “Sync” setting on the clip in the Audio tab of the properties panel.

Sharing the mlt project file would help to better understand the problem.

Click on either the names @shotcut or @brian then when you go to the profile page click on the button that says “Message” which will be on the top right.

I’m having the exact same problem!! I have quite a few clips in my video with the Pitch audio filter, and after each use the video progressively goes out of sync. I tried exporting it without all the Pitch filters and the video was perfectly in sync. Has there been a fix or a way to correct this?? Please help.

Thanks for the ping on this. I have been able to reproduce this problem. I’ll have a fix for the next release. I don’t have a good workaround to offer in the meantime, unfortunately. Maybe try applying the filter to a track instead of instead of a bunch of individual clips (if that works for your need).

Thanks for your reply! I’m glad to hear that there will be a fix! Do you have an approximate timeframe or anything for that? I ask because I really like Shotcut but it’s my 2nd editing program I’m using and I really don’t want to put myself through learning another one. And also does that mean the fix would be in a future update for the program? I also don’t think putting a filter on the whole track would work because I’ve made a lot of snips/cuts and it’s only in very specific parts of the video where I’ve used the Pitch filter.

There will probably be a software update sometime in June.

We are exactly on the same boat! After more than 30 videos I produced in ShotCut, this is the first time I have experienced a progressive video-audio gap after exporting. And in the latest video I’m editing, it’s the first time I ever used the Pitch Compensation tick box (in the clips’ Properties, on the right of the Speed field box) on different and multiple clips throughout my timeline. What I’m trying to do now is un-check all of those Pitch Compensation tick boxes and live with the fact that some of my scenes will have that “chipmunk” sound, until we get the latest version of ShotCut (and hope the issue is fixed by then). As of this writing, I’m exporting my “corrected” project to the default YouTube format. I will get back to you as soon as the export process is finished and see if this temporary workaround has worked.