DualStreamerVideoCodecConfig

data class DualStreamerVideoCodecConfig(val mimeType: String = MediaFormat.MIMETYPE_VIDEO_AVC, val startBitrate: Int, val resolution: Size = Size(1280, 720), val profile: Int = getBestProfile(mimeType), val level: Int = getBestLevel(mimeType, profile), val gopDurationInS: Float = 1.0f)

A data class that holds video specific codec data.

Constructors

Link copied to clipboard
constructor(mimeType: String = MediaFormat.MIMETYPE_VIDEO_AVC, startBitrate: Int, resolution: Size = Size(1280, 720), profile: Int = getBestProfile(mimeType), level: Int = getBestLevel(mimeType, profile), gopDurationInS: Float = 1.0f)

Properties

Link copied to clipboard
val gopDurationInS: Float = 1.0f

Video encoder I-frame interval in seconds. This is a best effort as few camera can not generate a fixed framerate. For live streaming, I-frame interval should be really low. For recording, I-frame interval should be higher. A value of 0 means that each frame is an I-frame. On device with API < 25, this value will be rounded to an integer. So don't expect a precise value and any value < 0.5 will be considered as 0.

Link copied to clipboard
val level: Int

Video encoder level. Encoders may not support requested level. In this case, StreamPack fallbacks to default level. ** See ** MediaCodecInfo.CodecProfileLevel

Link copied to clipboard

Video encoder profile. Encoders may not support requested profile. In this case, StreamPack fallbacks to default profile. If not set, profile is always a 8 bit profile. StreamPack try to apply the highest profile available. If the decoder does not support the profile, you should explicitly set the profile to a lower value such as AVCProfileBaseline for AVC, HEVCProfileMain for HEVC, VP9Profile0 for VP9. ** See ** MediaCodecInfo.CodecProfileLevel

Link copied to clipboard

Video output resolution in pixel.

Link copied to clipboard

Video encoder bitrate in bits/s.