Re: Writing Text onto a Video.
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