-
Notifications
You must be signed in to change notification settings - Fork 36
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
Avid's keyframe values different from PyAAF2 interpolation with extreme bezier handles #131
Comments
Thanks for taking time looking at this! I really appreciate it :) I have some ideas what it might be. Any chance you would be able to convert your verified tests to unit tests? It would be super helpful when fixing this issue. We wouldn't want to break any cases you've verified. |
Sure, I'll try to make some tests when I get into the office tomorrow! |
I think my suspicions are correct. These are the coordinates of the points and handles between 0-23
As we can see the first handles x coordinate is actually after the last keyframe. For this case I've been scaling the handle so its if doesn't go beyond that last keyframe. (This is typically what I've done in curve editors I've made in the past) In this case my code is scaling them to.
If I remove the scaling, the results are much closer.
I think you transcribed frame 5 wrong, my avid says its I'm not entirely sure what the implications of not sanitizing the handles in extreme cases is, but it doesn't appear media composer is doing any. |
I'm not sure what's easier for you, if you copy over from my branch or if I do a merge request with a failing test? Let me know if you'd like a pull request! I've added two keyframe interpolation tests, one passing and one failing (this example) here: |
Thanks @austinwitherspoon. Sure, if your cool with it I'll take test from your branch and add the fix so it all be in one nice clean commit :) |
Go ahead! |
Don't preform handle scaling and clamping Add tests for keyframe interpolation
Don't preform handle scaling and clamping Add tests for keyframe interpolation
your tests have been added to the dev branch. |
This is definitely an edge case - most of the test cases I've made have been pretty much identical between pyaaf2 and what is displayed in Avid! So great work!
We've been noticing occasional anomalies though, and I finally was able to reproduce one myself.
If I intentionally push the handles of a bezier curve too far, I can get pyaaf2 to spit out some incorrect values.
I've attached an example aaf file, and here is the code I ran on it:
That dictionary at the top is manually populated with values seen in the keyframe editor in Avid Media Composer.
The script will compare avid's value and pyaaf2's value and if there's a margin of error larger than .1, will print "FAIL"
With this AAF, I get the following output:
Again, this is definitely an edge case as far as I can tell, when you push the bezier handles too far! So it's totally understandable if this isn't a high priority.
The text was updated successfully, but these errors were encountered: