Hi guys!
I am having a bit of difficulty trying to get to a 'timecode' track in a QuickTime file using the QTKit framework in Mac OSX 10.5
I am using XCode 3.
I have a QTMovie object (set as self.movie) and I can get my python fingers into it a little.
This is what I can get to so far
-
allTracks = self.movie.tracksOfMediaType_("tmcd")
-
if len(self.movie.tracks()) > 0:
-
# First make sure we have at least one video track with a non zero length
-
allMedia = [track.movie() for track in allTracks]
-
-
for media in allMedia:
-
test = media.attributeForKey_('QTMediaTimeScaleAttribute')
-
print media
-
print test
-
#print test.QTTimeValue().timeValue
-
break
-
-
for track in allTracks:
-
print track.media().mediaAttributes()
-
print track.movie().movieAttributes()
-
Unfortunately I can't find out how to return the "currentTime" (current frame) of the timecode track. It is easy enough to return the currentTime of the Video track (self.movie.currentTime()), but i have no idea how to get to the value for the Timecode track.
I have been scouring the web for PyObjC examples of QTKit and accessing the details of the Timecode track and return a SMPTE formatted String.
Can anyone offer up any ideas?
Cheers!
Adam