i already know that i should use AVFoundationto get the CGContextRef from .mp4 file;
and use like :
CATextLayer *subtitle1Text = [[CATextLayer alloc] init];
[subtitle1Text setFont:@"Helvetica-Bold"];
[subtitle1Text setFontSize:36];
[subtitle1Text setFrame:CGRectMake(0, 0, size.width, 400)];
[subtitle1Text setString:[self.subtitles objectAtIndex:idx]];
[subtitle1Text setAlignmentMode:kCAAlignmentCenter];
[subtitle1Text setForegroundColor:[[UIColor whiteColor] CGColor]];
[subtitle1Text drawInContext:context];
to make subtitles;
now the question is how can i get CGContextRef from .mp4 file?
i mean i've got the url of .mp4 file, but how can i add CATextLayer in the mp4?