Using (a modified version of) "Align Audio to Reference" on CLI
amindfv at mailbox.org
amindfv at mailbox.org
Sat May 11 22:59:47 BST 2024
I would also be very interested in this!
(By the way, the BBC tool trims files to 15 minutes by default before performing its calculations. If you're running it on an hour-long file it might be missing the sync segment entirely.)
- Tom
On Fri, Apr 26, 2024 at 12:07:32AM +0100, Seung Hoon Park wrote:
> Hi,
>
> I've found the 'Set Audio Reference' and 'Align Audio to Reference' feature
> to be incredibly useful so far, and I was wondering if it would be able to
> extract part of the feature where I could obtain the offset between the
> reference and the selected audio clip.
>
> As an example, suppose I have two audio files: one that has been recorded
> as a WAV file typically 1 hour long and is the reference), and another one
> that has been recorded as a short WAV file (typically 4 minutes long).
> After I set the long WAV file as the reference and align the short WAV file
> to the reference, I would notice that the short WAV file is now aligned and
> starts at 00:31:38:09 (assuming the project is configured to be working
> with 30fps).
>
> Given this, I would like to create a script that can return the offset
> between the two audio files – something of the following:
>
> ```
> $ find-offset file1_reference.wav file2.wav
> offset : 00:31:38:09
> ```
>
> Would this be feasible? For the time being, I'm looking at the
> implementation of `alignAudio` in
> `src/timeline2/view/timelinecontroller.cpp`, but I thought it would be best
> to ask about this before proceeding any further...
>
> There exists other tools that do exactly the above, (for example,
> audio-offset-finder <https://github.com/bbc/audio-offset-finder>), but
> unfortunately, it seems like the output generated is incorrect for my use
> cases. I guess looking further into such tools would also be an option, but
> kdenlive's align audio feature has just been more reliable so far.
>
> All best regards,
> Simon
More information about the kdenlive
mailing list