I am a programmer and am processing Adobe Premiere
.prproj files. I read the contained XML data to figure out where a
<Media> element's video file starts.
I have a video that's been recorded with a timecode starting at 10:00:00:00, i.e. exactly 10 hours, or 36000 seconds. That timecode is what Premiere shows for the start of the file.
The corresponding data in the project file is:
<Media ...> ... <Start>9153720576000000</Start> </Media>
That value uses ticks as unit.
Now, I make the assumption that one second equals 254016000000 ticks. That's because, when I have, for example, a sequence with 25 FPS, its FrameRate element in the XML specifies 10160640000 ticks, and that's exactly a 25th of a second.
But when I divide the
<Start> value 9153720576000000 by 254016000000, I get 36036 seconds, and not, as expected, 36000 seconds.
So, by reading the XML values, I learn that the video starts at 10:00:36:00.
Curiously, that difference is exactly the 1001/1000 ratio of NTSC drop-frame timing, right?
Now, how do I make sense of the data in the Premiere project file? On one hand, its ticks base of 254016000000 is precisely identifying the used frame rates in the same file, so it must be the correct value for ticks per second. OTOH, it is off for time codes by 1ms per second.
How shall I interpret ticks values in the file? Shall I adjust them all by a factor of 1.001 to get the actual time code, or where's my error in all this?
Or is it a known fact that timecodes are not based on actual seconds but on 1.001 seconds?
In other words, does 10:00:00:00 mean that it's actually starting at 36036 seconds?
It appears that there is indeed a drift with timecodes vs. real time, but only if the recording uses fractional FPS such as 29.97 or 23.976 (= 23.98), according to this article.
And, indeed, the media file in question was recorded at 23.98 FPS.
So, am I right in the assumption that whenever I interpret a time code, I need to also look at the involved FPS, and if it's fractional, I have to add 1ms per second to the calculated time to be more accurate in the long run? (I do not care about single frame accuracy, so it does not matter when I apply the drift correction, it's only a question when to apply it at all.)