tmas73 Posted August 9, 2004 Posted August 9, 2004 I wonder if someone knows a simple calculation to calculate timcode difference TC_Hour - TC_Min - TC_Sec - TC_Frame {Maybe switch between (30fps, 24, 25)} Subtract - TC_Hour - TC_Min - TC_Sec - TC_Frame ------------------------------------------------------- Result TC_Hour - TC_Min - TC_Sec - TC_Frame If anyone could help! Thanks Thomas
VFXdbGuy Posted August 9, 2004 Posted August 9, 2004 I only have time to give you a few helpful hints. I'll try to get back to you with a more detailed explanation. First, be sure to have a framerate field. Next, you have to reduce the in and out timecodes to their coresponding number of frames. Now the math is simple, right? (frames per hour, frames per minute, etc.) If you plan to create a new timecode as a result of adding or subtracting frames (i.e. when using handles) then you have a final step of reconstituting the new timecode from the number of frames. I have found the MOD and INT functions to be very handy for this. Frames, for example is MOD(#_of_frames, framerate) which gives you the leftover frames. Use INT to eliminate decimal amounts when determining seconds, minutes and hours.
tmas73 Posted August 9, 2004 Author Posted August 9, 2004 Thanks so much for your help. I am a beginner so I do not understand so good. If you will have some time and if you could explain it easier I would appreciate it! Thanks!
VFXdbGuy Posted August 12, 2004 Posted August 12, 2004 First convert both time codes to frames using LEFT, RIGHT and MID functions: (Left(timecode;2)*3600*framerate) +(Middle( timecode; 3; 2)*60*framerate)+(Middle( timecode; 5; 2)*framerate)+(Right(timecode; 2)) The subtraction is now simple, resulting in the difference, in frames, between the two timecodes. Making a timecode out of that frame count is more difficult: Right("0" & GetAsText(Int(frames/ (3600*framerate))); 2) & ":" & Right("0" & GetAsText(Int(Mod(frames; (3600*framerate)) / (60*framerate) )); 2) & ":" & Right("0" & GetAsText(Int(Mod(Mod(frames; (3600*framerate)); (60*framerate)) / framerate)); 2) & ":" & Right("0" & GetAsText(Int(Mod(Mod(Mod(frames; (3600*framerate));(60*framerate));framerate))); 2) Ugly, but it works....
Recommended Posts
This topic is 7563 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now