Audio Video unysnced if video shorter than audio

What is your operating system?
Windows 10

What is your Shotcut version (see Help > About Shotcut)? Is it 32-bit?
64 bit, tried it with older versions (19, 21) and the latest one.

Can you repeat the problem? If so, what are the steps?
(Please be specific and use the names as seen in Shotcut, preferably English. Include a screenshot or screen recording if you can. Also, you can attach logs from either View > Application Log or right-click a job and choose View Log.)

I have a video where the audio is longer than the video track. As can be seen here:

Using VLC it shows the first 2 seconds black while you can still hear the audio. So the video starts at ~00:00:02 seconds and audio at 00:00:00 seconds.

Using shotcut it automatically moves the audio so that it aligns with the start of the video track, so the video and audio start at 00:00:00 seconds. That makes the Audio and Video unsynced, and the last ~2 seconds of the video are mute. The following picture shows the time when the video becomes mute in shotcut:

If I cut the first 10 seconds of the video using another program (Handbrake), and then open the edited video with shotcut there is no problem. If I just convert it with Handbrake, or set a constant 60fps with Handbrake the problem still persists.

I tried other video editing tools like OpenShot, and it didn’t have this problem.

Also it is annoying that I can only post 2 links here and 1 image .-.

We already have a change in MLT that might have fixed this problem, but it is hard to say without a clear sample file. I will only look into this further if you can provide a sample file.

I have reduced the video to the first minute, and reduced its quality significantly, put a 60fps constant.
Problem still persists in Shotcut. When u open it with shotcut, if you go at 50 seconds a guy is talking and u can see how it is unsynced with his mouth, and the last part of the video is muted.

Thank you for the sample. I not only reproduced it but also confirmed it is already fixed for the next version via the following bug:

So, I will close this for now. This is how we track outstanding work. You can download a portable nightly from our GitHub Actions page if you want to try it out yourself. This build is currently probably just as stable as the latest release considering all the heavy new work is being done in a separate branch that is not yet in the nightly.

1 Like

Thank you glad I helped, I tried the latest windows build (build-shotcut-windows #913; Shotcut version 23.01.22).

The audio and video is now synced, but I have noticed that the first ~2 seconds of the video, where there is no video track, is now missing. It is like shotcut removed the first ~2 seconds of the audio track.

The video is still 1 minute long in shotcut, but the last ~2 seconds are mute and the video is static.

This build still works for my needs, just wanted to let you know.