IVSVideoConfiguration

Objective-C


@interface IVSVideoConfiguration : NSObject

Swift

class IVSVideoConfiguration : NSObject

A configuration object describing the desired format of the final output video stream

  • The video codec for the output video stream. By default this is H264. To get an IVSVideoConfiguration with a different codec, IVSCodecDiscovery must be used.

    Declaration

    Objective-C

    @property (nonatomic, readonly) IVSVideoCodec *_Nonnull codec;

    Swift

    var codec: IVSVideoCodec { get }
  • The initial bitrate for the output video stream. By default this is 2,100,000.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSInteger initialBitrate;

    Swift

    var initialBitrate: Int { get }
  • Sets the initial bitrate for the output video stream. This value must be between 100k and 8,500k If the provided bitrate falls outside this range, bitrate will not be set and the provided outError will be set.

    Declaration

    Objective-C

    - (BOOL)setInitialBitrate:(NSInteger)initialBitrate
                        error:(NSError *_Nullable *_Nullable)outError;

    Swift

    func setInitialBitrate(_ initialBitrate: Int) throws

    Parameters

    initialBitrate

    the initial bitrate for the output video stream

    outError

    On input, a pointer to an error object. If an error occurs, the pointer is an NSError object that describes the error. If you don’t want error information, pass in nil.

    Return Value

    if the set operation is successful or not.

  • The keyframe interval for the output video stream in seconds. By default this is 2.

    Declaration

    Objective-C

    @property (nonatomic, readonly) float keyframeInterval;

    Swift

    var keyframeInterval: Float { get }
  • Sets the keyframe interval for the output video stream. This value must be between 1 and 5 /// If the provided keyframe interval falls outside this range, the keyframe interval will not be set and the provided outError will be set.

    Declaration

    Objective-C

    - (BOOL)setKeyframeInterval:(float)keyframeInterval
                          error:(NSError *_Nullable *_Nullable)outError;

    Swift

    func setKeyframeInterval(_ keyframeInterval: Float) throws

    Parameters

    keyframeInterval

    the keyframe interval for the output video stream

    outError

    On input, a pointer to an error object. If an error occurs, the pointer is an NSError object that describes the error. If you don’t want error information, pass in nil.

    Return Value

    if the set operation is successful or not.

  • The maximum bitrate for the output video stream. By default this is 6,000,000.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSInteger maxBitrate;

    Swift

    var maxBitrate: Int { get }
  • Sets the maximum bitrate for the output video stream. This value must be between 100k and 8,500k If the provided bitrate falls outside this range, bitrate will not be set and the provided outError will be set.

    Declaration

    Objective-C

    - (BOOL)setMaxBitrate:(NSInteger)maxBitrate
                    error:(NSError *_Nullable *_Nullable)outError;

    Swift

    func setMaxBitrate(_ maxBitrate: Int) throws

    Parameters

    maxBitrate

    the maximum bitrate for the output video stream

    outError

    On input, a pointer to an error object. If an error occurs, the pointer is an NSError object that describes the error. If you don’t want error information, pass in nil.

    Return Value

    if the set operation is successful or not.

  • The minimum bitrate for the output video stream. By default this is 300,000.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSInteger minBitrate;

    Swift

    var minBitrate: Int { get }
  • Sets the minimum bitrate for the output video stream. This value must be between 100k and 8,500k If the provided bitrate falls outside this range, bitrate will not be set and the provided outError will be set.

    Declaration

    Objective-C

    - (BOOL)setMinBitrate:(NSInteger)minBitrate
                    error:(NSError *_Nullable *_Nullable)outError;

    Swift

    func setMinBitrate(_ minBitrate: Int) throws

    Parameters

    minBitrate

    the minimum bitrate for the output video stream

    outError

    On input, a pointer to an error object. If an error occurs, the pointer is an NSError object that describes the error. If you don’t want error information, pass in nil.

    Return Value

    if the set operation is successful or not.

  • The resolution of the output video stream. By default this is 720x1280.

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGSize size;

    Swift

    var size: CGSize { get }
  • Sets the resolution of the output video stream. The width and height must both be between 160 and 1920, and the maximum total number of pixels is 2,073,600. So the smallest size you can provide is 160x160, and the largest is either 1080x1920 or 1920x1080. However something like 1920x1200 would not be supported. 1280x180 however is supported. If the provided resolution does not meet this criteria, the resolution will not be set and the provided outError will be set.

    Declaration

    Objective-C

    - (BOOL)setSize:(CGSize)size error:(NSError *_Nullable *_Nullable)outError;

    Swift

    func setSize(_ size: CGSize) throws

    Parameters

    size

    The resolution of the output video stream

    outError

    On input, a pointer to an error object. If an error occurs, the pointer is an NSError object that describes the error. If you don’t want error information, pass in nil.

    Return Value

    if the set operation is successful or not.

  • The target framerate of the output video stream. By default this is 30.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSInteger targetFramerate;

    Swift

    var targetFramerate: Int { get }
  • Sets the target framerate of the output video stream. This must be between 10 and 60 If the provided framerate falls outside this range, the framerate will not be set and the provided outError will be set.

    Declaration

    Objective-C

    - (BOOL)setTargetFramerate:(NSInteger)targetFramerate
                         error:(NSError *_Nullable *_Nullable)outError;

    Swift

    func setTargetFramerate(_ targetFramerate: Int) throws

    Parameters

    targetFramerate

    The target framerate for the output video stream

    outError

    On input, a pointer to an error object. If an error occurs, the pointer is an NSError object that describes the error. If you don’t want error information, pass in nil.

    Return Value

    if the set operation is successful or not.

  • Setting this to YES will enable transparency between mixer slots at the cost of some memory usage.

    For example, if you wanted to broadcast the rear facing camera taking up the entire view port, and then overlay the front facing camera with 30% transparency so that you can still partially see the rear facing camera under the front facing camera, this property would need to be YES.

    Note

    Enabling this option does increase the memory usage of the pipeline. If you are not going to use multiple mixer slots with blending, leave this as NO.

    By default this is NO.

    Declaration

    Objective-C

    @property (nonatomic) BOOL enableTransparency;

    Swift

    var enableTransparency: Bool { get set }
  • Whether the output video stream uses B (Bidirectional predicted picture) frames.

    By default this is YES.

    Declaration

    Objective-C

    @property (nonatomic) BOOL usesBFrames;

    Swift

    var usesBFrames: Bool { get set }
  • Whether the output video stream will automatically adjust the bitrate based on network conditions.

    Use minBitrate and maxBitrate to specify the bounds when this is YES. By default this is YES.

    Declaration

    Objective-C

    @property (nonatomic) BOOL useAutoBitrate;

    Swift

    var useAutoBitrate: Bool { get set }
  • The profile to use for the video’s automatic bitrate algorithm. This has no effect if useAutoBitrate is false. By default this is .conservative.

    Declaration

    Objective-C

    @property (nonatomic) IVSAutomaticBitrateProfile autoBitrateProfile;

    Swift

    var autoBitrateProfile: IVSVideoConfiguration.AutomaticBitrateProfile { get set }