Audio Alignment Implementation

Well, in that comment I was referring more to the amount of decimal points.

You’re welcome. :slightly_smiling_face:
I actually have some longer files for you if you want to further test your drift program. If you’re interested, let me know and I’ll PM them to you.

By the way, does your drift detection program also do the adjustment of the file or it does just give the number that needs to be entered to adjust for the drift?

There are two programs drift and the “shell script” undrifted_and aligned_xml.sh. The program drift only reports the numbers: lag and speed adjustment. It also reports which one of the two clips needs to be push forward.

The script undrifted_and aligned_xml.sh uses those numbers to generate an XML mlt file that can be used as a Shotcut clip. You don’t need to adjust the speed of the audio file. It is done on-the-fly by the timewarp producer.

Since I want drift integrated in Shotcut, and since I do not know much about file type conversion, I opted for not dealing with it. Using the output of the drift program, you (probably) can use ffmpeg if you want to adjust the speed of the audio file. Before undrifted_and aligned_xml.sh, I was using this:

$ ffmpeg -y -stats -i “$x” -v error -vn -ar 48000 -filter:a “atempo=.9995” “$OUTFILE”

I’d love to have it tested by other people. :sweat_smile:
I don’t have time right now to do any further testing. I will start recording and editing video classes for a course I am giving on December. It is an intensive course. So, I will have no time.

I think a good starting and simple UI would be like this:

  1. Right-click on some clip entry (something.wav) in a track.
  2. Select “align to timeline”.

Then, this entry would be moved to the right place, aligned to the rest of the timeline. :slight_smile:

1 Like

@andrecaldas, have you checked out the latest beta here?

Your feature just got added into Shotcut along with the program Glaxnimate and the beta’s there for testing. If you have the time, check it out and post your thoughts on it as well as any possible problems you may find in the beta thread above. :slightly_smiling_face:

Sorry I didn’t have the time to test.

I am very very happy it got into beta. I just made a comment on a request of yours: