View Full Version : Tool/formula to convert between frame # and hh:mm:ss
ariga
5th December 2007, 15:12
Is there any tool that will convert between frame number and time codes ?
Another related Q.
In the hh:mm:ss:xx format, what does xx stand for? How is it different from the hh:mm:ss.sss format that VDub displays?
hanfrunz
5th December 2007, 15:31
xx is the number of frames (PAL=25fps, NTSC=29,97 / 30fps)
sss are milliseconds
TC -> framecount
framecount = hours *60 *60 *fps + minutes *60 * fps + seconds * fps + frames
framecount-> TC
hours=int(framecount/60/60/fps)
minutes=int((framecount-hours*60*60*fps) / 60 / fps)
seconds=int((framecount-hours*60*60*fps - minutes*60*fps) /fps)
frames=int((framecount-hours*60*60*fps - minutes*60*fps - seconds*fps)
ariga
6th December 2007, 09:13
:thanks:
JohnnyMalaria
6th December 2007, 15:22
For 29.97fps using drop-frame timecode (i.e., the normal way), the formula isn't that simple.
You have to take into account that at every whole minute, two frames are dropped except for exact 10 minutes. i.e., the sequence is, for example:
00:01:59;59
00:02:00;02 (whole minute, drop 2 frames)
and
00:09:59;59
00:10:00;00 (whole 10 minutes, don't drop 2 frames)
I don't have the formula immediately to hand but it is straightforward.
FrozenDog
10th December 2007, 17:25
TimeCalc - http://www.alcorn.com/support/software.html
ariga
11th December 2007, 11:52
More than what I asked for!! Thanks a lot.
ariga
14th December 2007, 09:05
Another 'advanced' version
http://www.mediachance.com/dvdlab/freetime.htm
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.