I’ve made a DAT table with in and out trim points for a movieFileIn to loop between.
This works, but I’m trying to get the movieFileIn to play from the beginning until it gets to the loop points, then loop between them.
My loop points are written in FRAME NUMBER, not INDEX values, but I don’t see how to read current frame, only movieFileIn.index.
tl;dr: How do I export/call a movieFileIn’s current frame number, not index?
drag your moviefilein over a infoCHOP. In the infoCHOP’s scope choose “true_index”. That will give you the current frame of the movie. (and lenght will give you the total number of frame… lenght/sample_rate would give you the lenght in seconds… so on.)
To cue your frame numbers on the moviefileinTOP look for the cuepoint parameter, at the far right there is a box (with a % on it) that allows you to choose your unit type. Set it to frame (it will display a “F”).
You python loop script would look something like this:
Thank you Guarana. This is helpful, but I think i’m still missing something.
I have changed the % boxes to F.
If I manually enter “10” as my cue frame, then pulse it, my infoCHOP shows true_index as 5
If I manually enter “20” as my cue frame, then pulse it, my infoCHOP shows true_index as 10.56
Any ideas?
I’m pretty surprised TD doesn’t have a simple “current_frame” to export. Thanks again for your help.
In the speed CHOP turn the reset par to on, set your reset val to any number - you should see the frame in the moviefilein TOP match your frame number.
Toggling the reset par off you can use the reset pulse to cue your video to a specific frame position.
This approach is also well suited for distributed systems where you’re streaming time to nodes on a network.
I made a 500-frame mov at 30fps- each frame literally has the frame number on it.
If I play it from the beginning, and stop it at frame 200, infoCHOP true_index = 200.
HOWEVER…
If I pulse a cue point to frame 200, it takes me to infoCHOP true_index = 99 – why??
Is there no param that will tell me what frame a video is on?
It sounds like you really want Index not frames as a measure of cue points.
Index will refer to absolute positions in your video. This is a concept I still often fight with as it often initially feels inconsistent with other content creation tools - though I think that’s largely due to complexity that’s often hidden from users/creators.
I should have said index instead of frame but using the trim on the moviefile in modifies a lot of parameters and re-entering those values in the movies index will not do what we want.
Did some testing and looked at matt’s file.
The safest value seems to be python member op(‘moviefilein1’).trueNumImages
That will always give you the total number of frame even if the movie is trimmed.
But then if the movie is trimmed (if I get this right…) entering an index or frame will be relative to the trimmed clip, not the full clip.
So, my advise would be to use the index (in conjunction with matts method if you like) and script the loop with python instead of the movie’s trim. Dont touch that evil trim. movieframes.toe (5.46 KB)