Copy link to clipboard
Copied
Hello,
I have a script I am using to generate shot names for clips based on edit points throughout a 22 minute timeline. The script finds every cut in a long video track and then makes a subclip that length with the appropriate name, so I can essentially drag all the subclips into a new track above and the shots are all in order and properly named, and for the most part it works great. However, as it goes down the timeline the edits / subclip ins and outs will drift by a frame here and there. I am guessing this is perhaps the slight difference between 23.976 and 23.98 over a 22 minute sequence? I am not sure where the discrepancy is coming from, but I am finding the in and out points by "clip.start.seconds" and "clip.end.seconds".
Any ideas why its going wrong or how to make it more accurate?
Thanks!
Copy link to clipboard
Copied
What sort of source footage are you using?
Can you post some of the actual script you're running?
PPro's time math is in ticks, 254016000000 per second.
Where does the 23.98 come from? Is that perhaps a rounding error, for 23.976 footage?
Copy link to clipboard
Copied
Hi Bruce,
Thanks for your reply. Here is some code to show you how its working:
if (firstVideoTrack) |
{
for (var i = 0; i < firstVideoTrack.clips.numTracks; ++i)
{
var clip = firstVideoTrack.clips;
$.write("clip at " + clip.start.seconds);
var clipStart = clip.start.seconds;
var clipEnd = clip.end.seconds;
The way it works is I have a 22 minute mov with alpha that I put in a track above all my edits, and then each time there is a shot change, I make a cut in it. The script looks for every cut in that track and then makes a subclip with that in and out:
projectRoot.createSubClip (clipName, clipStart, clipEnd, 1, 1, 1);
There is no reference to framerate in the script, so it may not be a 23.976 rounding issue, I've just seen that in the past that drift can be caused by that slight difference, but you pointed out the accuracy of PPros math. I thought perhaps it was just that maybe my variable for clipStart and clipEnd were possibly being rounded and that wasn't frame accurate? I tried calling a double instead of var but it said illegal use.
What I would like is to take all of the subclips generated by the script and drop them back into another track and have it perfectly align with my cuts. Currently it is correctly generating all the shot names and clips, but quite a few of them are off by a frame, which ripples down the timeline.
Copy link to clipboard
Copied
What sort of source footage are you using? You say .mov, which is a wrapper; what's the codec? This isn't iPhone footage, is it? Variable frame rate media is guaranteed to come out of sync.
Copy link to clipboard
Copied
Sorry, I should have mentioned that! My main footage is H264 renders of storyboard sequences, and the Alpha file is an Animation Quicktime.
Copy link to clipboard
Copied
And both are a frame rate of 24.00 fps.
Copy link to clipboard
Copied
I'm pretty sure, but I'd like to confirm: your .mov files are definitely NOT from an iPhone? VFR files often lie about their frame rate.
Copy link to clipboard
Copied
No nothing is from an iPhone. I am using Storyboards out of Storyboard pro and the Animation mov is just an empty RGB+ Alpha straight out of After Effects