By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,932 Members | 1,908 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,932 IT Pros & Developers. It's quick & easy.

PyObjC, XCode 3, QTKit - accessing QT Timecode Track info

P: 46
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
Expand|Select|Wrap|Line Numbers
  1.         allTracks = self.movie.tracksOfMediaType_("tmcd")
  2.         if len(self.movie.tracks()) > 0:
  3.             # First make sure we have at least one video track with a non zero length
  4.             allMedia = [track.movie() for track in allTracks]
  5.  
  6.             for media in allMedia:
  7.                 test = media.attributeForKey_('QTMediaTimeScaleAttribute')
  8.                 print media
  9.                 print test
  10.                 #print test.QTTimeValue().timeValue
  11.                 break
  12.  
  13.             for track in allTracks:
  14.                 print track.media().mediaAttributes()
  15.                 print track.movie().movieAttributes()
  16.  
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
May 21 '09 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.