// // SellyLiveVideoConfiguration.h // SellyCloudLiveKit // // Created by LaiFeng on 16/5/20. // Copyright © 2016年 LaiFeng All rights reserved. // #import #import /// 视频分辨率(都是16:9 当此设备不支持当前分辨率,自动降低一级) /// 以下码率范围为帧率=15的时候计算出来的。如果帧率上调,码率范围相应上调 typedef NS_ENUM (NSUInteger, SellyLiveVideoSessionPreset){ /// 分辨率 480*360,码率范围:400Kbps ~ 600Kbps,帧率:15fps。 SellyLiveVideoResolution480x360, /// 分辨率 480*480,码率范围:350Kbps ~ 525Kbps,帧率:15fps。 SellyLiveVideoResolution480x480, /// 分辨率 640*480,码率范围:600Kbps ~ 900Kbps,帧率:15fps。 SellyLiveVideoResolution640x480, /// 分辨率 640*360,码率范围:500Kbps ~ 900Kbps,帧率:15fps。 SellyLiveVideoResolution640x360, /// 分辨率 960*540,码率范围:800Kbps ~ 1500Kbps,帧率:15fps。 SellyLiveVideoResolution960x540, /// 分辨率 1280*720,码率范围:1000Kbps ~ 1800Kbps,帧率:15fps。 SellyLiveVideoResolution1280x720, /// 分辨率 1920*1080,码率范围:2500Kbps ~ 3000Kbps,帧率:15fps。 // SellyLiveVideoResolution1920x1080 }; @interface SellyLiveVideoConfiguration : NSObject /// 默认视频配置 + (instancetype)defaultConfiguration; #pragma mark - Attribute ///============================================================================= /// @name Attribute ///============================================================================= /// 视频输出分辨率,宽高务必设定为 2 的倍数,否则解码播放时可能出现绿边 @property (nonatomic, assign) CGSize videoSize; /// 视频输出方向 @property (nonatomic, assign) UIInterfaceOrientation outputImageOrientation; /// 自动旋转(这里只支持 left 变 right portrait 变 portraitUpsideDown) @property (nonatomic, assign) BOOL autorotate; /// 视频的帧率,即 fps @property (nonatomic, assign) NSUInteger videoFrameRate; /// 视频的最小帧率,即 fps @property (nonatomic, assign) NSUInteger videoMinFrameRate; /// 最大关键帧间隔,可设定为 fps 的2倍,影响一个 gop 的大小 @property (nonatomic, assign) NSUInteger videoMaxKeyframeInterval; /// 视频的码率,单位是 bps @property (nonatomic, assign) NSUInteger videoBitRate; /// 视频的最小码率,单位是 bps @property (nonatomic, assign) NSUInteger videoMinBitRate; ///< 视频采集分辨率 @property (nonatomic, assign) SellyLiveVideoSessionPreset sessionPreset; ///< 是否是横屏 @property (nonatomic, assign, readonly) BOOL landscape; @end