prepareVideo

open fun prepareVideo(filePath: String, bitRate: Int, rotation: Int, profile: Int, level: Int): Boolean

Return

true if success, false if you get a error (Normally because the encoder selected doesn't support any configuration seated or your device hasn't a H264 encoder).

Parameters

filePath

to video MP4 file.

bitRate

H264 in bps.

profile

codec value from MediaCodecInfo.CodecProfileLevel class

level

codec value from MediaCodecInfo.CodecProfileLevel class

Throws

Normally file not found.


open fun prepareVideo(fileDescriptor: FileDescriptor, bitRate: Int, rotation: Int, profile: Int, level: Int): Boolean

Return

true if success, false if you get a error (Normally because the encoder selected doesn't support any configuration seated or your device hasn't a H264 encoder).

Parameters

fileDescriptor

to video MP4 file.

bitRate

H264 in bps.

profile

codec value from MediaCodecInfo.CodecProfileLevel class

level

codec value from MediaCodecInfo.CodecProfileLevel class

Throws

Normally file not found.


open fun prepareVideo(context: Context, uri: Uri, bitRate: Int, rotation: Int, profile: Int, level: Int): Boolean

Return

true if success, false if you get a error (Normally because the encoder selected doesn't support any configuration seated or your device hasn't a H264 encoder).

Parameters

uri

Uri to video MP4 file.

bitRate

H264 in bps.

profile

codec value from MediaCodecInfo.CodecProfileLevel class

level

codec value from MediaCodecInfo.CodecProfileLevel class

Throws

Normally file not found.


open fun prepareVideo(filePath: String, bitRate: Int, rotation: Int): Boolean
open fun prepareVideo(fileDescriptor: FileDescriptor, bitRate: Int, rotation: Int): Boolean
open fun prepareVideo(filePath: String): Boolean
open fun prepareVideo(context: Context, uri: Uri, bitRate: Int, rotation: Int): Boolean
open fun prepareVideo(context: Context, uri: Uri): Boolean
open fun prepareVideo(fileDescriptor: FileDescriptor): Boolean