Open latenitefilms opened 2 months ago
When adding this debugging code:
NSLog(@"---------------------------------");
NSLog(@"timelineFrameDuration: %.2f seconds", CMTimeGetSeconds(timelineFrameDuration));
NSLog(@"timelineTime: %.2f seconds", CMTimeGetSeconds(timelineTime));
NSLog(@"startTimeOfInputToFilter: %.2f seconds", CMTimeGetSeconds(startTimeOfInputToFilter));
NSLog(@"startTimeOfInputToFilterInTimelineTime: %.2f seconds", CMTimeGetSeconds(startTimeOfInputToFilterInTimelineTime));
NSLog(@"timelineTimeMinusStartTimeOfInputToFilterNumerator: %f", timelineTimeMinusStartTimeOfInputToFilterNumerator);
NSLog(@"timelineTimeMinusStartTimeOfInputToFilterDenominator: %f", timelineTimeMinusStartTimeOfInputToFilterDenominator);
NSLog(@"frame: %f", frame);
NSLog(@"timelineFpsNumerator: %f", timelineFpsNumerator);
NSLog(@"timelineFpsDenominator: %f", timelineFpsDenominator);
NSLog(@"frameRate: %f", frameRate);
NSLog(@"timestamp: %f", timestamp);
NSLog(@"---------------------------------");
For the first frame of the 29.97fps Compound Clip I get:
timelineFrameDuration: 0.03 seconds
timelineTime: 0.00 seconds
startTimeOfInputToFilter: 37960.22 seconds
startTimeOfInputToFilterInTimelineTime: 0.00 seconds
timelineTimeMinusStartTimeOfInputToFilterNumerator: 0.000000
timelineTimeMinusStartTimeOfInputToFilterDenominator: 8100000000.000000
frame: 0.000000
timelineFpsNumerator: 30000.000000
timelineFpsDenominator: 1001.000000
frameRate: 29.970030
timestamp: 0.000000
For the first frame of the 23.98fps Project/Timeline I get:
timelineFrameDuration: 0.03 seconds
timelineTime: 0.00 seconds
startTimeOfInputToFilter: 37960.22 seconds
startTimeOfInputToFilterInTimelineTime: 0.00 seconds
timelineTimeMinusStartTimeOfInputToFilterNumerator: 0.000000
timelineTimeMinusStartTimeOfInputToFilterDenominator: 8100000000.000000
frame: 0.000000
timelineFpsNumerator: 30000.000000
timelineFpsDenominator: 1001.000000
frameRate: 29.970030
timestamp: 0.000000
So maybe what is needed is a way to enter the "Project/Timeline Frame Rate" in the Effect, and then we can scale the frame number accordingly?
The Final Cut Pro team confirm:
We don’t currently have a method to do what you’re looking for.
Haha, so helpful.
Reported by Dustin Svehlak via email.
Let's say we have a 29.97fps GoPro Clip. We create a 29.97fps Compound Clip, and apply Gyroflow Toolbox - everything works great! If we apply it to a 29.97fps Project/Timeline, it works as expected. However, if we put this 29.97fps Compound Clip in a 23.98 Project/Timeline, things break.
I believe this is due to how Final Cut Pro handles Rate Conform.
As a possible workaround, applying an Automatic Speed Effect to the Compound Clip will fix it - but may not be visually what the user wants, as it'll now be Slow 80%.
Or you could render out the Compound Clip and import it back in (which is less than ideal - and goes against the whole reason Gyroflow Toolbox exists in the first place).
This MIGHT be possible to fix - although I'm not sure that FxPlug gives us the information we need to do the maths.
FWIW - I've tried using a Synchronised Clip instead, creating another Compound Clip with the Automatic Speed Effect applied, etc but none of these workarounds work.
For reference, here's our current method of detecting the current frame:
See: Understanding time in FxPlug
@AdrianEddy - Any ideas?