Перед сохранением файла локально создайте CATextLayer и прикрепите его к видео. Я верю, что этот код поможет вам, что я написал для одного моего приложения.
- (void)applyVideoEffectsToComposition:(AVMutableVideoComposition *)composition size:(CGSize)size
{
NSArray *fieldsArray = overlayFieldsArray;
// 1 - Set up the text layer
CATextLayer *subtitle1Text = [[CATextLayer alloc] init];
subtitle1Text.wrapped=YES;
subtitle1Text.alignmentMode = kCAAlignmentLeft;
[subtitle1Text setFont:@"Helvetica-Bold"];
[subtitle1Text setFontSize:textSize];
[subtitle1Text setFrame:CGRectMake(0, 0, size.width, fieldsArray.count*textSize+20) ];
NSMutableString *layerText = [NSMutableString stringWithCapacity:0];
for(NSDictionary *fieldDictionary in fieldsArray){
[layerText appendFormat:@" %@ :",[[fieldDictionary allKeys] objectAtIndex:0]];
[layerText appendFormat:@" %@ \n",[_candidateDictionary valueForKey:[[fieldDictionary allValues] objectAtIndex:0]]];
}
[subtitle1Text setString:layerText];
[subtitle1Text setForegroundColor:[[UIColor colorForText] CGColor]];
// 2 - The usual overlay
CALayer *overlayLayer = [CALayer layer];
overlayLayer.backgroundColor = [UIColor colorForLayer].CGColor;
overlayLayer.opacity=0.5f;
CGSize maximumSize = CGSizeMake(600, 600);
UIFont *myFont = [UIFont fontWithName:@"Helvetica" size:textSize];
CGSize layerTextSize = [layerText sizeWithFont:myFont
constrainedToSize:maximumSize
lineBreakMode:UILineBreakModeWordWrap];
overlayLayer.frame = CGRectMake(10, 0, layerTextSize.width*1.1, fieldsArray.count*textSize+20);
[overlayLayer setMasksToBounds:YES];
[overlayLayer addSublayer:subtitle1Text];
CALayer *parentLayer = [CALayer layer];
CALayer *videoLayer = [CALayer layer];
videoLayer.frame = CGRectMake(0, 0, size.width, size.height);
[parentLayer addSublayer:videoLayer];
parentLayer.frame = CGRectMake(10, 0, layerTextSize.width*1.1, fieldsArray.count*textSize+20);
[parentLayer addSublayer:overlayLayer];
composition.animationTool = [AVVideoCompositionCoreAnimationTool
videoCompositionCoreAnimationToolWithPostProcessingAsVideoLayer:videoLayer inLayer:parentLayer];
}