Audio lag in exported movie

Using Shotcut 24.11.17 under Windows 11 Pro all updates done.

Source movies taken with Canon Vixia HF R800. MediaInfo V24.12 reports all files are 60FPS, 35MB/S, with a constant frame rate of 59.94FPS.

Audio was recorded by four Rode Wireless GO II mics. ShotCut says each file is 48KHz, 32-bit floating point PCM. I split them 2 on Left and 2 on Right, picked to get some decent sound separation in the final movie.

Movie plays fine in preview. Perfect sound sync from start to finish.

My first export attempt I wanted max quality since my next step is to do some zooming effects (you may have seen my other post about how to do that). So I picked the output preset “H.264” under “Lossless”. The 1:26:38 long project became a 268Gb MP4 file. MediaInfo says it has a constant frame rate of 60FPS, 443 MBs - AAC audio, Variable bit rate 297 kbs, compression mode “lossy”. Playback in VLC 3.0.21 starts out fine at the beginning, but by the end it is lagging the video by about 5 seconds. The VLC player clock shows the movie as 1:26:43 - 6 seconds longer! Video playback stops at 1:26:38, sound keeps playing another 5 seconds!

For my second export I tried “H.264 Main Profile” under “stock” group. This produced a 6GB MP4 file. MediaInfo says it has a constant frame rate of 60FPS, 9950 kbs - AAC audio, constant bit rate 257 kbs, compression mode “lossy”. Playback in VLC is same as first: increasing lag, audio plays 5 seconds longer than video.

For my third attempt I tried the “YouTube” profile under “stock” group. This produced a 9GB MP4 file. MediaInfo says it has a constant frame rate of 59.94FPS, 14.6Mbs - AAC audio, variable bit rate 305 kbs, compression mode “lossy”. Playback in VLC is GOOD video and audio stop together at 1:26:38, no sync issues observed.

My question is why? I need to understand what happened so I can avoid it. I still have a need to do some windowed zooming on this movie, I assume best results would be to use max quality version of exported source.

Thanks in advance!

Richard Cooke

Why did the frame rate change from the others? This change might be the explanation. The export presets do not affect the export frame rate, which is based on the project’s Video Mode. The things you described should not affect frame rate, but perhaps something you changed but did not mention. What is Frames/sec really set to in Export before you make changes? Click Reset to see.

Thanks for the reply!

I made no settings changes - that I am aware of. When I started the project, it was set to adapt the settings from the first movie I added. One sec while I open the project settings and see what they say:
It says “HD 1080p 59.94”. AFAIK it has always said that, at least I have no memory of ever looking at it let alone changing it.

What test would you like me to try next?

I found this FAQ:
https://www.shotcut.org/FAQ/#i-have-trimmed-my-video-andor-created-my-project-now-how-do-i-save-or-share-it

Which has a step I did not do: “Press RESET”

So I followed these instructions using the Pro Res 422 preset.

The resulting MP4 file is 6.77Gb, has a constant frame rate, and WORKS! Sound stays synced and ends with the video!

So now my question is which preset would yield the highest quality movie for use in another round of editing? I still have to fix volume levels in a few places, and I want to try zomming in on choir faces. Meanwhile, I will re-test witth the same presets I used first, but add pressing RESET before export.