'Set Audio Reference’ and ‘Align Audio to Reference’

Hi Members,

I’m using my iPhone 10 to record myself performing slide guitar parts in my Kdenlive video project. I loaded the main audio track to which I am trying to align the iPhone 10 videos (with audio) to the ‘main audio’ track. All slide guitar videos (with audio) are the same recordings in the ‘main audio track’ as well . I utilized the ‘Set Audio Reference’ and ‘Align Audio to Reference’ feature and it worked fine on one video but the other video keeps getting tossed in a random location on the timeline.

I tried numerous times to align this other video but cannot figure out why one video aligns properly and the other video continues to be placed in wrong location. Both videos were made only minutes apart with the same iPhone 10. I can align the video manually but really like the ‘Set Audio Reference’ and ‘Align Audio to Reference’ feature as it is spot on (when it works). Appreciate any advice. Thank you all for your time.

I think you have recorded with variable frame rate. Convert the clip in question to a edit friendly format (right click on the clip in project bin and select edit friendly format). Then try again.

Hi Eugen, thank you for the helpful advice. I am recording my video clips at 1080p HD at 60 fps. That is the setting I chose in my camera app. I just learned that although I selected 60 fps, the iPhone camera may ‘vary’ the frame rate depending on factors such as low-light conditions. I do not have a specific selection for ‘variable frame rate’ in my iPhone XR camera settings but I did read that choosing 60 fps is not guaranteed to be a ‘constant’ 60 fps (depending on light-conditions).

For now, all my video clips are recorded using my iPhone XR and when initially loading any video clip into the project bin, a window always pops-up recommending that I ‘Transcode to edit friendly format’ which I always perform. As mentioned, my videos are coming from an iPhone XR and I’m using Win10 for KdenLive).

However, after 'transcoding to edit friendly format", dragging the video clip to the timeline and choosing ‘Align Audio to Reference’, Kdenlive moves the video to an unrelated part of the audio. This occurs even-after I’ve already set the main audio clip as the ‘referenced-audio’ by right clicking on the main audio clip and choosing ‘Set Audio Reference’. On ‘rare’ occasions it works perfectly but for the most part it does not align anywhere close. I always assume user-error first before seeking help but what I am doing wrong has me puzzled. I always ‘Transcode to edit friendly format’ when initially placing new clips into the project bin as mentioned earlier. It has to be something I’m doing wrong but just haven’t figured it out just yet.

However, learning how to ‘manually’ align the video clip to the audio is a technique that I am getting better-at and certainly a good thing to know. Right clicking on the selected clip and choosing 'Edit Duration" is a great feature/tool and find myself using it quite often. Thus for now, I am primarily using this approach to align video clip to audio.

I’m going to guess that the problem is related to how much time elapses between when you started the first recording and when you started the second, and the actual content of the recording.

The autocorrelation is going to look for a local maximum to call the best fit, and it isn’t going to search exhaustively, so it is possible for it to get “stuck in a rut” finding a best fit for a wrong alignment. And it’s much more likely to do that when the content is rhythmic and repetitive than when it has no pattern to it (white noise will align much more accurately than a clean note from an instrument might).

Try trimming whichever track started first, so that their start times are approximately aligned by ear and then give the autocorrelation another shot at it … or maybe opening each recording with some unique key sound that you can remove in post before you begin the actual performance.