获取本地视频缩略图
////获取本地视频缩略图
AVFoundation.framework
//- (UIImage *)getImage:(NSURL *)URL{
//
// AVURLAsset *asset = [[AVURLAsset alloc] initWithURL:URL options:nil];
// AVAssetImageGenerator *gen = [[AVAssetImageGenerator alloc] initWithAsset:asset];
// gen.appliesPreferredTrackTransform = YES;
// CMTime time = CMTimeMakeWithSeconds(0.0, 600);
// NSError *error = nil;
// CMTime actualTime;
// CGImageRef image = [gen copyCGImageAtTime:time actualTime:&actualTime error:&error];
// UIImage *thumb = [[UIImage alloc] initWithCGImage:image];
// CGImageRelease(image);
//
// return thumb;
//}
本文标题:获取本地视频缩略图
本文链接:https://www.haomeiwen.com/subject/vqqtextx.html
网友评论