I want to position a QuickTime movie containing a timecode track to a user-defined TC position. I am well aware of the whole timeScale, timeValue stuff but I don't know what I am missing and hope you guys can give me a hint here!!
I want to give you an example with fixed values to make it easier to explain :
The movie has NTSC frame rate, which is 29.97 fps and is non-dropframe. The movie starts at 00:59:58:00
straight. The user enters the TC position 01:00:00:10
and I want to locate to that exact position.
The only option there is for a QTMovie is the setCurrentTime(QTTime time)
function and I know that the time must be an absolute value in "units" from the beginning of the movie.
So, I would need to calculate an offset first. In order to do that, I need to use the QTTimeFromString
function to first convert the two timecodes to QTTime structures.
And here is where my problem starts!!
The QTTimeFromString
function wants a string in the format "days:hours:minutes:seconds.timeValue/timescale"
Which value do I use for timeValue?? I read sth about frames * 100
and I myself thought of "mapping" the frame value into the 2997 timescale range by multiplying the frame value.
Neither way is working ... when I set the absolute value calculated by QTTimeDecrement
to the clip using setCurrentTime
I am always somewhere else where I want to be ....
I don't know what I'm doing wrong and I hope you guys can help me!! Thanks in advance