# prepareVideo

@JvmOverloads
fun prepareVideo(width: Int, height: Int, bitrate: Int, fps: Int = 30, iFrameInterval: Int = 2, rotation: Int = 0, profile: Int = -1, level: Int = -1, recordWidth: Int = 0, recordHeight: Int = 0, recordBitrate: Int = bitrate): Boolean

Necessary only one time before start preview, stream or record. If you want change values stop preview, stream and record is necessary.

#### Return

True if success, False if failed

#### Parameters

profile

codec value from MediaCodecInfo.CodecProfileLevel class

level

codec value from MediaCodecInfo.CodecProfileLevel class

#### Throws

IllegalArgumentException

if you use differentRecordResolution but the aspect ratio is not the same than stream resolution