help with timecode

Peter Bogdanoff bogdanoff at me.com
Mon Jun 1 02:01:27 EDT 2015


Tim,

I must admit I am truly horrible at math (and quite busy right now).

But, I can calculate that in a movie with a timescale of 600, there are 20 standard frames in those 600 ticks. Beyond that, (and into drop frame) my head spins…

Perhaps someone with real math chops can take this further….

There is a drop frame info (and programming source code) at:
	http://www.dropframetimecode.org

All the best!

Peter

On May 31, 2015, at 1:27 AM, Tim Selander <selander at tkf.att.ne.jp> wrote:

> Peter,
> 
> This worked great at getting me min:sec timecode; I hadn't even gotten that far yet. But I need the timecode down to the frame, so min:sec:fra.  Timescale of the videos I'm using is 600.
> 
> What's bending my head is that min & sec are sets of 60. 60 secs per min, 60 min per hour. But the frames are sets of 30; 30 frames per second.
> 
> Further head-bending happens with DF & NDF time code. Non-drop frame time code is exactly 30 frames per second. But to broadcast color, the frame rate had to be scaled back to 29.97 frames per second.
> 
> So, drop frame TC drops 2 frame counts every minute, except every tenth minute, achieving 30×0.999 = 29.97 frame/s. The error is the difference between 0.999 and 1/1.001 = 0.999000999000999….
> 
> For example, the sequence when frame counts are dropped:
> H:  M: S: F
> 01:08:59:28
> 01:08:59:29
> 01:09:00:02
> 01:09:00:03
> 
> For each tenth minute
> 01:09:59:28
> 01:09:59:29
> 01:10:00:00
> 01:10:00:01
> 
> I'm pretty stuck. But it must be possible as we have stopwatches with built-in timecode calculators!
> 
> If I can't get the frames accurately, I could settle for a decimal point and remainder after the seconds:
> H: M:  S
> 01:09:55.38
> 
> I'm making an in-house app for our subtitle translators -- the rule of thumb in Japanese subtitling is 4 characters per second. So having the fraction at .38 as in the above example, would let the translator know he could use one more character for the .38 fraction of the second.
> 
> Tim Selander
> 
> 
> 
> On 5/31/15, 10:34 AM, Peter Bogdanoff wrote:
>> Had some odd stuff...once again (600 is the timescale I was working with; you can find the timescale() with that function) :
>> 
>> on updateCurrTime
>>     put round(the currentTime of player "thePlayer" / 600) into theTime
>>      put theTime div 60 into theMin
>>      put theTime mod 60 into theSec
>>      if len(theSec) = 1 then put "0" & theSec into theSec
>>      put theMin & ":" & theSec into field "CurrTime"
>>      send "updateCurrTime" to me in 1 seconds
>> end updateCurrTime
>> 
>>> On May 30, 2015, at 11:16 AM, Peter Bogdanoff <bogdanoff at me.com> wrote:
>>> 
>>> on updateCurrTime
>>>     put round(the currentTime of player “thePlayer" 1005 / 600) into theTime
>>>      put theTime div 60 into theMin
>>>      put theTime mod 60 into theSec
>>>      if len(theSec) = 1 then put "0" & theSec into theSec
>>>      put theMin & ":" & theSec into field "CurrTime"
>>>      send "updateCurrTime" to me in 1 seconds
>>> end updateCurrTime
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list