i am using AVAssetImageGenerator for generating the thumbnail images for video. when i pass local video asset url to generate image it is retuning nil.i am using below code to generate image.
NSURL *url = [NSURL fileURLWithPath:filepath];
AVAsset *asset = [AVAsset assetWithURL:url];
AVAssetImageGenerator *imageGenerator = [[AVAssetImageGenerator alloc]initWithAsset:asset];
CMTime time =CMTimeMake(1, 1);
CGImageRef imageRef = [imageGenerator copyCGImageAtTime:time actualTime:NULL error:NULL];
UIImage *thumbnail = [UIImage imageWithCGImage:imageRef];
CGImageRelease(imageRef);
Simply call this method to create Video Thumbnail.
//Utilities.m
Call from your class.
Try this code
use below code