Quicktime Pro Timecode and Apple Script

Hallo,
is there anyone around, who has experience with quicktime pro scripting?

I have movies with an embedded timecode. I look for a means to get at this timecode by Apple Script.

I have found a script to set the timecode of a movie, but none to get the timecode of a movie and then set a selection in relation to it.

If someone has done this before and could share his/her knowledge it would be nice.

Thanks

Ute

Hi,

the SMPTE code is rendered into the movie and cannot be read.
You have to calculate the frames by duration/current time and time scale

PS: Here are two scripts to calculate QuickTime time → SMTPE and vice versa

QuickTime time → SMTPE:

property TimeOffset : 10

tell application "QuickTime Player"
	tell document 1 to set {currentTime, timeScale, theDuration, FrameCount} to {current time, time scale, duration, count (frames of track "Video track")}
end tell

set FrameRate to (FrameCount * timeScale) / theDuration div 1
tell (currentTime / timeScale) to set {hr, mn, sc} to {it div 3600, it mod 3600 div 60, it mod 3600 mod 60 div 1}
set fr to (currentTime mod timeScale div (timeScale / FrameRate))
set SMPTE to addZero(TimeOffset + hr) & ":" & addZero(mn) & ":" & addZero(sc) & ":" & addZero(fr)
display dialog "TCR " & SMPTE

on addZero(v)
	return text -2 thru -1 of ("0" & v)
end addZero

SMTPE → QuickTime time:

property TimeOffset : 10
set SMTPE to "10:20:24:20"

set {hr, mn, sc, fr} to words of SMTPE
tell application "QuickTime Player"
	tell document 1 to set {timeScale, theDuration, FrameCount} to {time scale, duration, count (frames of track "Video track")}
end tell
set FrameRate to (FrameCount * timeScale) / theDuration div 1
set QT_time to ((((hr as integer) - TimeOffset) * 3600 + mn * 60 + sc) * FrameRate + fr) * (timeScale / FrameRate)