AV Foundation timecode support for 10.8

Discussion in 'Mac Programming' started by jmsbc, Jan 13, 2014.

  1. jmsbc, Jan 13, 2014
    Last edited: Jan 13, 2014

    jmsbc macrumors newbie

    Joined:
    Jan 13, 2014
    #1
    Hello,

    I was looking through the AV Foundation documents for writing timecode to quicktime, and came across technical note TN2310 (https://developer.apple.com/library/mac/technotes/tn2310/_index.html). I noticed some of the API being used is newly added in 10.9. For example, there is a line of code that adds the timecode track association with the video track:
    Code:
    // add track association with video track
    [videoInput addTrackAssociationWithTrackOfInput:timecodeInput
        type:AVTrackAssociationTypeTimecode];
    
    and addTrackAssociationWithTrackOfInput is only available in AVAssetWriterInput.h in 10.9. I also came across the sample command line code for timecode reader/writer (https://developer.apple.com/library...on/Intro.html#//apple_ref/doc/uid/DTS40013350) that specifies build and runtime requirements of 10.9.

    Is there a way to add timecode with AV Foundation in 10.8 and are there any examples of how to do so?

    Thank you
     
  2. Madd the Sane macrumors 6502

    Madd the Sane

    Joined:
    Nov 8, 2010
    Location:
    Utah
    #2
    There might not be one for AVFoundation, but you can check for a similar function in QTKit. The only problem is, you would probably have to save your AVFoundation work, load the movie with QTKit, add timecode, save QTKit work, load the movie again with AVFoundation, etc…

    It may not be elegant, but if you want to maintain compatibility with 10.8, and implement time code support in your app, it may be the only solution.
    Sorry.
     

Share This Page