• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Writing Text onto a Video.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Writing Text onto a Video.


  • Subject: Re: Writing Text onto a Video.
  • From: Jaime Magiera <email@hidden>
  • Date: Fri, 12 Oct 2007 19:05:18 -0400


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




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Writing Text onto a Video. (From: James Andrews <email@hidden>)

  • Prev by Date: Writing Text onto a Video.
  • Next by Date: How does one build a simple nib file to control a window?
  • Previous by thread: Writing Text onto a Video.
  • Next by thread: How does one build a simple nib file to control a window?
  • Index(es):
    • Date
    • Thread