I want to add a image in to video only some milliseconds, so i Have try to do this with CALayer,
UIImage *animationImage = [UIImage imageNamed:@"arrow.png"];
CALayer *overlayLayer1 = [CALayer layer];
[overlayLayer1 setContents:(id)[animationImage CGImage]];
//overlayLayer1.frame = CGRectMake(size.width/2-64, size.height/2 + 200, 128, 128);
overlayLayer1.frame = CGRectMake(0, 0, size.width, size.height);
[overlayLayer1 setMasksToBounds:YES];
CALayer *parentLayer = [CALayer layer];
CALayer *videoLayer = [CALayer layer];
parentLayer.frame = CGRectMake(0, 0, size.width, size.height);
videoLayer.frame = CGRectMake(0, 0, size.width, size.height);
[parentLayer addSublayer:videoLayer];
[parentLayer addSublayer:overlayLayer1];
It works and i Can possible to make an Output video but in the output video shows arrow png image whole duration but i want to add that only 2 seconds.
is possible to make this?
After 2 second you have to remove
overLayer1
fromparentLayer
.