Writing Text onto a Video.

  • I have been looking around QTKit and I don't see a way to do what I
    want to do.

    I have a file .srt/.ssa that contains subtitles for a video.  I want
    to put the text into the video so it is a permanent part of the
    video.  Can someone point me in the right direction?

    James
  • On Oct 12, 2007, at 6:10 PM, James Andrews wrote:

    > I have been looking around QTKit and I don't see a way to do what I
    > want to do.
    >
    > I have a file .srt/.ssa that contains subtitles for a video.  I
    > want to put the text into the video so it is a permanent part of
    > the video.  Can someone point me in the right direction?

    Hello,

    This might be more apropos the QuickTime-API list.

    In general, QuickTime Text tracks can provide subtitles. Here's
    sample code for creating text tracks...

    http://developer.apple.com/samplecode/qttext/

    What you'll likely want to do is parse the .srt file into an NSArray
    of NSDictionaries (each containing the start time and subtitle text
    as keys). Create a text track. Then, iterate that through the
    NSArray, adding Text Media Samples at the desired time, with the
    desired content. Then, be sure to update the movie resources. That
    should be it.

    hth,

    Jaime Magiera
    Sensory Research Network
    http://www.sensoryresearch.net
previous month october 2007 next month
MTWTFSS
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Go to today