Adding a transition de-syncs audio

I’m not sure if this a bug or not but I have the following setup:

  • A video and audio track.
  • Two clips in the video track, C1 and C2.
  • I have an mp3 in the audio track that covers all of C1.
  • I move C2 into C1, causing a transition to be created.
  • Export
  • The audio is de-synced by however long the transition is on all clips after C1.

If I remove the audio track, this doesn’t seem to happen.

I’m on MLT7 7.16.0 and Shotcut 23.05.14 on FreeBSD.

Let me know if there is anything else I can do to help. I searched the FAQ but didn’t spot this.

I’ve been playing around. To reproduce:

  • You will need two video clips and an audio clip.
  • Add the video clips.
  • Create an audio track.
  • Add the mp3 to it and cut it so it ends with the first video clip.
  • Either cut the mp3 such that it ends before the transition and create the transition OR create the transition with Ripple turned on so that it cuts the mp3 when you drag the second clip over the first.
  • Export and the audio in the second clip is delayed by the transition duration. Note that, for me, preview playback is NOT delayed and works fine.

Other things: on my system shotcut and export crash if I have an audio clip in the audio track overlapping the transition. Not sure what’s going on here or if it’s related.

Can you explain what you mean by the audio is “delayed”? Does it skip ahead during the transition? What does it sound like?

A screenshot of your Shotcut window might help to illustrate your description.

Also, as a test, you could try to convert your clips to edit friendly. To do this, select the clip, go to the properties panel, and then click on the “Convert…” button.

What I mean is the audio is not in-sync with the video. And “delayed” is the wrong word because it’s the video that is delayed relative to the audio. So if I add a 1 second transition, the audio will now be one second faster than the video on the clip I am transitioning into.

I’ve included a screenshot.
shotcut

I converted the clip as well, but the no luck.

I even did an experiment where I detached the audio and then placed it exactly how it should be and it still comes out de-synced.

The preview does play it properly synced, though.

I did another test where I cut the audio track clip so it doesn’t quite align with the transition and the audio STAYS SYNCED. So that’s great! I don’t know why this is. Something about the snapping/magnet?

EDIT: I take below back, I was confused.

Also, I think this only seems to happen when it’s the first thing in the timelines like that. As I’m adding transitions to later clips, it doesn’t seem to be a problem. I’m still experimenting.

I did not reproduce this following your good and detailed steps using our Shotcut 23.05.14 build for Linux. This uses a MLT git checkout on that date with a few additional fix commits over 7.16.0. One of them looks like it could be applicable to cause this. Here is the MLT bug report with the fix commit mentioned:

1 Like

Ah-hah!!! Yes, this fixes it!

In my example, clip 1 has no audio track. This also resolves Shotcut crashing when I would skip to the spot in the transition!

Thank you.

Excellent!

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