One last thing. I said " I didn't have to calculate a time-step previously. It was assumed the value of "1" got me to the next frame (and, 0.5 to the next field if used with interlaced material). I got all times in FCP-time, not FCP-translated-to-Motion templates. "
This assumes the input and rendered output are at the same frame rates! So I would still like to get to all frames of an input sequence even if they are in a different frame rate than the timeline they reside in. If that information is hard to get to us via an API call (remember, we often apply our effects to groups/sequences where the footage is "hidden" inside), then I'm willing to have the user specify the input and output frame rates in order to calculate the real time-step I need to get to the next frame in the input.
For example, let's say I put a 60fps piece of footage in a 24fps timeline. If the new FCP timting I'm suggesting assumes "1" is the amount to the next frame in the output, I'm willing to have the user need to specify that the output is 24 and the input is 60 in order to calculate that 0.4 (24/60) is the time-step I need to use to get to the next frame in the input. And that frame "N" of the input is N times this time-step.
Pete
From: Peter Litwinowicz < email@hidden> Date: Wed, 27 Jul 2011 11:21:36 -0700 To: Darrin Cardani < email@hidden>, Pro-Apps-Dev < email@hidden> Subject: Re: More questions: resolution and time with Motion templates in FCP
Does my description above make it any more helpful?
Your description helps to understand what you are doing, but what you are DOING is not helpful. In fact, it will keep us from releasing our Twixtor plugin… and from what I can tell, a real show stopper.
Let's say create an effect that displays a specific frame within the sequence. In Motion this works as I expect. So if I type in 10.0 in the plugin's "frame number" slider, I get frame 10 handed to my plugin for display, at all times on the timeline where I'm asked to create a frame. Let's say I create a templatized version of this effect for use in FCP, based on a 30-frame project. I have to pick some "random" frame duration amount because, remember, our users will probably not have Motion, or if they do they will not want to use it to apply our plugin (if they even understand how to make templates, nor should they have to)
So now say I apply this templatized effect to a 300 frame sequence in FCP. I'm rendering at frame 50 in the timeline, but I'm still wanting to ask for frame 10 (of the 300 frame sequence) as specified by the user. You say: If you ask for frame 1.25 when at frame 35, we'll take 35-1.25=33.75, convert frame 35 into FCPX time, subtract 33.75 from that, and give you that frame. So you'll get the frame that is 33.75 frames before the current one. In other words it figures out the difference in frames and applies that in FCPX's time base. So yes, if you want to access a specific frame number, that no longer works as you'd expect. (But of course, the specific frame number is meaningless to your plug-in in this case, so it doesn't really matter.)
FYI: a specific frame number is NOT meaningless to our Twixtor plugin. Keep reading.
So at any time on the timeline, let's I really want to get input frame 10 of the 300 frame sequence. Even with your explanation (and implied formula) I can't calculate the conversion Motion time vs. FCP time (because I'm not told the FCP duration , only the Motion template duration), I have absolutely no way to calculate what I need to ask for to get frame 10 of the 300 frame sequence. Note that specific frame numbers are VITALLY important to our Twixtor plugin. We allow users to say "play frame 1 at time time, and frame 25 at this time, play frame 75 at this time" we are not asking the user to supply offsets. Why would users want to do this? Watch this tutorial that describes how to remap time in order to accomplish lip sync (or any other audio-to-video matchup that might be needed): http://help.revisionfx.com/album/18/#/tutorial-33
Also note: let's say within Twixtor I want to play a clip at 50%. Once again, I can't do it. At frame N, I can't figure out what I need to calculate to get frame N/2. I leave the proof as an exercise. So even if I don't really need to specify an exact frame number (which I do, by the way :-)), I can't calculate times at a scaled difference.
And it gets worse: if I animate the speed within Twixtor, I need to integrate speed. Which, as you might recall from calculus, requires a time-step difference between frames (so once again I need the FCP to Motion time-calculation details given to me for the specific instance).
I'm frankly confused as to why you made this change in the workings of the FxPlug specification. Your translating times from within FCP is based on the assumption that developers only want to get frames surrounding the current frame. This is strictly not true in our Twixtor plugin. If fact, we rely on getting specific, exact frames… just as the API used to work… and expect (and need) to provide frame times that get a frame at a particular time… not an offset time.
You say: I'm trying to reconcile what you're asking for vs. what we were giving you in Motion 4/FCP 7. Rather than add new API at this point, I'd like to make things work in such a way that you can simply recompile your old code and just have it work. How were you figuring out the time-step value previously?
I didn't have to calculate a time-step previously. It was assumed the value of "1" got me to the next frame (and, 0.5 to the next field if used with interlaced material). I got all times in FCP-time, not FCP-translated-to-Motion templates. My suggestion? So to get our stuff to work I would suggest removing the assumption that FCP times need to be translated to/from Motion-template duration times. In order to keep Apple-supplied time-based Motion templates working, perhaps you can supply a setting "be compatible for FCP 6/7 time" for effects that specify whether the effect(s) want time-translation or not. Easy peasy. Everybody wins, right? And in that case, I would also suggest getting rid of the "get frame by offset" code and simply return to me the exact frame I'm asking for, not an offsetted/translated time.
This suggestion eliminates the need for all this knowledge and assumptions about time translation and gets us back to an API and implementation of the API that works and Is simple to understand to boot.
Pete
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
|