TuSDKVideoImageExtractor Class Reference
Inherits from | NSObject |
---|---|
Declared in | TuSDKVideoImageExtractor.h |
+ createExtractor
创建 TuSDKVideoImageExtractor
+ (TuSDKVideoImageExtractor *_Nonnull)createExtractor
Return Value
TuSDKVideoImageExtractor
Declared In
TuSDKVideoImageExtractor.h
videoAsset
视频资源
@property (nonatomic, strong, nullable) AVAsset *videoAsset
Availability
v1.0.0
Declared In
TuSDKVideoImageExtractor.h
videoAssets
一组视频资源
@property (nonatomic, strong, nullable) NSArray<AVAsset*> *videoAssets
Availability
v3.1.0
Declared In
TuSDKVideoImageExtractor.h
videoPath
输入的视频地址
@property (nonatomic, copy, nullable) NSURL *videoPath
Availability
v1.0.0
Declared In
TuSDKVideoImageExtractor.h
videoComposition
指定视频轨道图像提取指令,仅为单个视频时有效
@property (nonatomic, copy, nullable) AVVideoComposition *videoComposition
Availability
v3.0.1
Declared In
TuSDKVideoImageExtractor.h
extractFrameCount
提取的视频帧数,自动根据视频长度均匀获取 (mExtractFrameCount 和 mExtractFrameInterval 都设置时 优先使用mExtractFrameCount)
@property (nonatomic, assign) NSUInteger extractFrameCount
Availability
v1.0.0
Declared In
TuSDKVideoImageExtractor.h
extractFrameTimeInterval
提取帧的时间间隔 (单位:s) 张数不固定
@property (nonatomic, assign) CGFloat extractFrameTimeInterval
Availability
v1.0.0
Declared In
TuSDKVideoImageExtractor.h
outputMaxImageSize
输出的图片尺寸,不设置则按视频宽高比例计算 注意:要得到清晰图像,需要宽高分别乘以 [UIScreen mainScreen].scale。
@property (nonatomic, assign) CGSize outputMaxImageSize
Declared In
TuSDKVideoImageExtractor.h
isAccurate
是否需要精确时间帧获取图片, 默认NO
@property (nonatomic, assign) BOOL isAccurate
Availability
2.2.0
Declared In
TuSDKVideoImageExtractor.h
– extractImageList
同步提取视频帧
- (NSArray<UIImage*> *_Nullable)extractImageList
Return Value
视频帧数据列表
Declared In
TuSDKVideoImageExtractor.h
– asyncExtractImageList:
异步获取视频缩略图
- (void)asyncExtractImageList:(TuSDKVideoImageExtractorBlock _Nonnull)handler
Parameters
handler |
所有缩略图获取完成后处理器 |
---|
Availability
v1.0.0
Declared In
TuSDKVideoImageExtractor.h
– asyncExtractImageWithHandler:
异步获取视频缩略图
- (void)asyncExtractImageWithHandler:(TuSDKVideoImageExtractorStepImageBlock _Nonnull)handler
Parameters
handler |
获取到每帧缩略图时的处理回调 |
---|
Availability
v1.0.0
Declared In
TuSDKVideoImageExtractor.h
– frameImageAtTime:
同步获取指定时间的视频帧
- (UIImage *_Nullable)frameImageAtTime:(CMTime)time
Parameters
time |
帧所在时间 |
---|
Return Value
视频帧
Declared In
TuSDKVideoImageExtractor.h