Iam using UIImagePicker to record video when i click the record button i want to capture the frame with sound and add it into one array .Please help me to accomplish the same thanks in advance .
Asked
Active
Viewed 276 times
1 Answers
0
try this sample code for record videos in frame
Edit
- (void)video:(NSString*)videoPath didFinishSavingWithError:(NSError*)error contextInfo:(void*)contextInfo {
NSLog(@"%@",contextInfo);
if (error) {
}else{
NSURL *videoURl = [NSURL fileURLWithPath:videoPath];
AVURLAsset *asset = [[AVURLAsset alloc] initWithURL:videoURl options:nil];
AVAssetImageGenerator *generate = [[AVAssetImageGenerator alloc] initWithAsset:asset];
generate.appliesPreferredTrackTransform = YES;
NSError *err = NULL;
CMTime time = CMTimeMake(1, 60);// heare you can set more then one image time
CGImageRef imgRef = [generate copyCGImageAtTime:time actualTime:NULL error:&err];
self.strUploadVideoURL = videoPath;
self.strOriginalVideoURL = videoPath;
UIImage *img = [[UIImage alloc] initWithCGImage:imgRef];
// use this image to add in array.
}
}

SAMIR RATHOD
- 3,512
- 1
- 20
- 45
-
i think you want to add image in array which recorded by camera. am i right? – SAMIR RATHOD May 16 '13 at 11:41
-
ya exactly i want to show camera recording and to save image to array simultaneously – naveen May 16 '13 at 11:50