Hello,
Let me explain you Apple's trick about picking the TimeScale. Actually you can pick any number other than 2400000, if you convert the "timevalue" in QuickTime time code to/from "frame #" of SMPTE time code with the TimeScale correctly as seen in one of my post.
Your description :
The above "2400000" base does work perfect if you got a few clips. But if you got more than a few FCPX will take forever to resolve the timing
is not clear in its meaning. Do you mean that there will be frame # discrepancy like wrong frame # which are delayed or faster than what it should be? What do you mean by saying, "take forever to resolve the timing"? At least it sounds like that to me.
As you can see from QTTime structure and CMTime structure ( actually I didn't look up CMTime structure at this moment, but as you can see from CMTimeMake function, you can see that it's not so different from QTTime in its context, although it may be different in its layout. ), they are integer-based. However, there are very unfortunate frame rates like 29.97 which is actually 30 * 1000/1001. If you pick some arbitrary TimeScale value which may be more meaningful to you, it can introduce slower/faster frame numbers due to round-off error. So, try to examine what TimeScale value FCPX produces for frame rate you are going to handle, 30, 29.97, etc, and use it. Then it will introduce less round-off error ( by calculation, I found out that Apple picked clever values for the TimeScale ). Also try to be consistent in marking timecode/Timescales in QuickTime movie's atom header, tracks' atom header, etc. In other words, try to be consistent across atom headers.
What Apple people is mean about their representation in time is that these two introduce confusion.
12:30:24:1503/3000 12:30:24:12/2997
What does "12" means in the second one? Is it 0012? It looks like that. However, it turned out that 1200. When they display two digits when TimeScale is in 4 digits, they needed to be multiplied by 100.
Usually convenient TimeScale to pick is fps * 100.
In the blog post written in Korean, there are some excerpts from Apple's documents, which is in English. So, if you read it carefully, then you would be able to get more information than those sentences say. :) I don't know why Apple people tried to explain it verbally which introduced more confusion and made it blurry.
So, my recommendation is that try to make a sample movie clip with FCPX with frame rate you want and check what TimeScale it puts in the atom headers in the movie clip.
Good luck with it! :) JongAm Park
On Aug 21, 2012, at 3:59 AM, Andreas Kiel < email@hidden> wrote: Hi,
Many thanks for the reply, there are some really interesting links in your blog (those which are Korean I don't understand unfortunately).
The problem I got is finally very simple. I just want to transfer a TC to FCPX time as simple and fast as possible. For described reasons I can't use CMTime. An option could be to using "2400000" for any video related thing (this for example would not cover 96 kHz audio). The above "2400000" base does work perfect if you got a few clips. But if you got more than a few FCPX will take forever to resolve the timing.
Regards Andreas Kiel
On Aug 20, 2012, at 10:22 PM, JongAm Park wrote:
Hello.. Apple has a documentation on the issue in their developer.apple.com, but problem is that they tried to do so verbally ( although verbal the content can be mathematical ) what the QuickTime time code mean is quite blurry.
I have my own blog post about it, so it would be helpful to read it.
QTKit, QTStringTime() and SMPTE http://jongampark.wordpress.com/2008/10/27/qttime-qtstringtime-and-smpte/
More complete explanation is done here, but I'm sorry that I wrote it in Korean. However, I put some excerpt from Apple's own document in my own post. So, I believe you can figure it out. I wrote it in Korean and would have written in English also, but I decided not to because I believe most English-speaking people would have some more source to figure those out.
QuickTime에서 TimeScale은 정확하게 무엇일까? ( What is TimeScale exactly in QuickTime? ) https://jongampark.wordpress.com/2011/08/25/quicktime에서-timescale은-정확하게-무엇일까/
This is a kind of side information for DV video case. Timecode QuickTime returns vs. Correct timecode for DF video https://jongampark.wordpress.com/2009/12/28/timecode-quicktime-returns-vs-correct-timecode-for-df-video/
If it doesn't help you, let me know.
Thank you. JongAm Park
|