AliyunCrop
@interface AliyunCrop : NSObject
裁剪类
-
裁剪回调
Declaration
Objective-C
@property (nonatomic, weak) id<AliyunCropDelegate> delegate;
-
视频/音乐源文件路径
必选参数
Declaration
Objective-C
@property (nonatomic, copy) NSString *inputPath;
-
裁剪完成后的文件存放路径
必选参数 如果是多级目录,需要保证目录已经创建完成
Declaration
Objective-C
@property (nonatomic, copy) NSString *outputPath;
-
裁剪后视频分辨率
视频分辨率必须为偶数 裁剪音乐时无需设置
Declaration
Objective-C
@property (nonatomic) CGSize outputSize;
-
截取时间起点
单位:秒
Declaration
Objective-C
@property (nonatomic) float startTime;
-
截取时间终点
单位:秒
Declaration
Objective-C
@property (nonatomic) float endTime;
-
Deprecated
deprecated
视频片段过渡动画时间
无效接口,已废弃
Declaration
Objective-C
@property (nonatomic) long fadeDuration;
-
裁剪模式
裁剪音乐时无需设置
Declaration
Objective-C
@property (nonatomic) AliyunCropCutMode cropMode;
-
裁剪的有效区域
保留的视频尺寸 (cropMode为0时 无效) 裁剪音乐时无需设置 单位:像素
Declaration
Objective-C
@property (nonatomic) CGRect rect;
-
视频质量
默认值:AliyunVideoQualityMedium 裁剪音乐时无需设置
Declaration
Objective-C
@property (nonatomic) AliyunVideoQuality videoQuality;
-
帧率
默认:25 裁剪音乐时无需设置
Declaration
Objective-C
@property (nonatomic) int fps;
-
关键帧间隔
默认:5 裁剪音乐时无需设置
Declaration
Objective-C
@property (nonatomic) int gop;
-
编码方式
软编:0 硬编:1
Declaration
Objective-C
@property (nonatomic) int encodeMode;
-
码率
单位:bps 裁剪音乐时无需设置
Declaration
Objective-C
@property (nonatomic) int bitrate;
-
Deprecated
deprecated
是否启用gpu裁剪
裁剪音乐时无需设置
Declaration
Objective-C
@property (nonatomic) BOOL useHW;
-
是否开启优化
开启后只裁剪时间将不走编解码 裁剪音乐时无需设置 默认关闭
Declaration
Objective-C
@property (nonatomic) BOOL shouldOptimize;
-
背景颜色
视频填充模式下有效 裁剪音乐时无需设置
Declaration
Objective-C
@property(nonatomic, strong) UIColor *fillBackgroundColor
-
初始化裁剪
Declaration
Objective-C
- (instancetype)initWithDelegate:(id<AliyunCropDelegate>)delegate;
Parameters
delegate
AliyunCropDelegate代理
Return Value
AliyunCrop
-
开始裁剪
Declaration
Objective-C
- (int)startCrop;
-
取消裁剪
Declaration
Objective-C
- (void)cancel;
-
Deprecated
deprecated
版本号
Declaration
Objective-C
+ (NSString *)version;
Return Value
版本号