VideoCodec
@objcMembers
@objc(PESDKVideoCodec)
open class VideoCodec : NSObject
Represents different video codecs.
-
The H264 video codec.
Declaration
Swift
public static func h264(withBitRate bitRate: NSNumber?) -> VideoCodec
Parameters
bitRate
The bit rate to use in bits per second. The value of the input video will be used if you do not specify this value.
Return Value
The H264 video codec.
-
The H264 video codec.
Declaration
Swift
public static func h264(withBitRate bitRate: NSNumber?, profile: VideoCodecProfileH264?) -> VideoCodec
Parameters
bitRate
The bit rate to use in bits per second. The value of the input video will be used if you do not specify this value.
profile
The
VideoCodecProfileH264
to use for this codec.Return Value
The H264 video codec.
-
The HEVC video codec. This can only be used with iOS 11 and above.
Declaration
Swift
@available(iOS 11.0, *) public static func hevc(withQuality quality: NSNumber) -> VideoCodec
Parameters
quality
The quality value ranges from 0.0 to 1.0 and it tells the encoder what compression level is desired. Quality level value means low = 0.25, normal = 0.50, high = 0.75, and 1.0 implies lossless compression for the encoder. In HEVC, lossless encoding means that DCT transforms and quantization are bypassed but normal predictions are still used.
Return Value
The HEVC video codec.
-
The H264 video codec.
Declaration
Swift
@objc(h264WithBitRate:profile:) static func _objCH264(withBitRate bitRate: NSNumber?, profile: NSNumber?) -> VideoCodec
Parameters
bitRate
The bit rate to use in bits per second. The value of the input video will be used if you do not specify this value.
profile
The
VideoCodecProfileH264
‘s raw value wrapped in aNSNumber
.Return Value
The H264 video codec.