Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request/Suggestion] Support unpredictable frame drops and unmatching speed/pitch (drift correction) #12

Closed
alopatindev opened this issue Dec 29, 2023 · 5 comments

Comments

@alopatindev
Copy link

alopatindev commented Dec 29, 2023

If anyone considers implementing this feature in AudioAlign/Aurio and/or suggests possible ideas for implementation, please share them here. Thanks!

@protyposis
Copy link
Owner

What you are describing is generally referred to as drift correction. Drift is usually, but not necessarily always, related to pitch change.

unpredictable frame drops in both tracks

This can be interpreted as a case of non-linear drift (w/o pitch change).

unmatching overall average speed (often with higher pitch for faster audio)

This can be interpreted as linear drift, which is the simplest case (e.g., PAL speed-up).

AudioAlign already includes tools to handle drift semi-automatically, but I'll need to validate. Could you provide example files?

@alopatindev alopatindev changed the title [Request/Suggestion] Support unpredictable frame drops and unmatching speed/pitch [Request/Suggestion] Support unpredictable frame drops and unmatching speed/pitch (drift correction) Dec 29, 2023
@alopatindev
Copy link
Author

alopatindev commented Dec 29, 2023

Could you provide example files?

Sure, here are some examples of problematic extracted audio tracks (password is SyncWithDriftCorrection, size is ≈11 GiB, sha256sum is dff403ac3d1958eff2636b3806af8a58cc21a37bb64e36dae2cef5e7813fbaf2).

Please note that some of these files may contain multiple audio tracks, sometimes with wrong language labels. Thanks!

@protyposis
Copy link
Owner

Thanks, here's an example video with the The_OC set. I'm not sure what dubbed vs. restored means, but I used the dubbed_1 and restored files as they seem to be two different languages with a different runtime. I transcoded them to .wav because direct FFmpeg decoding in AudioAlign isn't super stable yet. The aligned tracks are perfectly in sync:

Recording.2023-12-29.211558.mp4

Looking at the alignment graph, we can immediately see that there's

  • linear drift (diagonal line instead of horizontal)
  • a few obvious "frame drops" seen as glitches in the diagonal line (circled in red):

image

@alopatindev
Copy link
Author

Wow, thanks for checking it; that's really great that AudioAlign can handle such cases!

@andonagio
Copy link

This is awesome. Is it possible to achieve this via command line? I have a batch of files with frame rate/pitch issues that need to be synced up, and I'd rather not do each one manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants