VideoCodecConfig

constructor(mimeType: String = MediaFormat.MIMETYPE_VIDEO_AVC, startBitrate: Int, resolution: Size = DEFAULT_RESOLUTION, fps: Int = DEFAULT_FPS, gopDurationInS: Float = 1.0f, profile: Int, level: Int = getBestLevel(mimeType, profile), customize: MediaFormatCustomHandler = {})

Instantiates a VideoCodecConfig instance from profile and level.

If you don't know how to set profile and level, use VideoCodecConfig without profile and level parameters.

Parameters

mimeType

Video encoder mime type.

startBitrate

Video encoder bitrate in bits/s.

resolution

Video output resolution in pixel.

fps

Video framerate.

gopDurationInS

Video encoder I-frame interval in seconds.

profile

Video encoder profile. Encoders may not support requested profile. In this case, StreamPack fallbacks to encoder default profile.

level

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

customize

A callback to be invoked when the media format is generated.


constructor(mimeType: String = MediaFormat.MIMETYPE_VIDEO_AVC, startBitrate: Int, resolution: Size = DEFAULT_RESOLUTION, fps: Int = DEFAULT_FPS, gopDurationInS: Float = 1.0f, profileLevelColorBuilder: VideoProfileLevelColor.Builder.() -> Unit = {}, customize: MediaFormatCustomHandler = {})

Instantiates a VideoCodecConfig instance from VideoProfileLevelColor.Builder.

Parameters

mimeType

Video encoder mime type.

startBitrate

Video encoder bitrate in bits/s.

resolution

Video output resolution in pixel.

fps

Video framerate.

gopDurationInS

Video encoder I-frame interval in seconds.

profileLevelColorBuilder

A builder to create VideoProfileLevelColor.

customize

A callback to be invoked when the media format is generated.