tags:

views:

127

answers:

2

as UIImagePickerController can got the video , but how to add subtitle to the video ?

any tips.... Thanks for your in advance .

A: 

Unfortunately there are no APIs for working with images like that. The only video-related functions relate to playback, using the built in "trim" editing feature, and being able to read/write the raw file data for a movie.

You can access the raw data for a movie (and save it out again) so if you could find third-party libraries that supported this you could in theory add this yourself. You would do something like generating frames of text using the regular iPhone APIs and then overlay them into the existing video.

The problem would be finding libraries that are suitable, the limited memory on the iPhone (it's unlikely you could load the entire movie into memory at once), and the CPU cost of decoding/recoding the movie data.

Andrew Grant
thanks for Andrew .....
Robin
+1  A: 

You can't. The control of video is very limited on the phone, in general you can only clip the beginning and end, and I imagine that that is handled by lopping things off at the GOPs where it is easy. Adding a subtitle would require at a minimum transmuxing the file (for a soft subtitle), and probably reencoding the entire stream (for a hard subtitle). Performing that on the iPhone's CPU would be very slow, and the HW encoder is not exposed at a level you can use (even if it was it might have limitations that prevent it from being used for this sort of thing).

Louis Gerbarg
thanks for Louis ...
Robin
Thanks for u comment..
Robin