CompressorUtils

Functions

Link copied to clipboard
fun findTrack(extractor: MediaExtractor, isVideo: Boolean): Int

Counts the number of tracks (video, audio) found in the file source provided

Link copied to clipboard
fun generateWidthAndHeight(width: Double, height: Double, keepOriginalResolution: Boolean): Pair<Int, Int>

Generate new width and height for source file

Link copied to clipboard
fun getBitrate(bitrate: Int, quality: VideoQuality): Int

Get fixed bitrate value based on the file's current bitrate

Link copied to clipboard
Link copied to clipboard
fun prepareVideoHeight(mediaMetadataRetriever: MediaMetadataRetriever): Double
Link copied to clipboard
fun prepareVideoWidth(mediaMetadataRetriever: MediaMetadataRetriever): Double
Link copied to clipboard
fun printException(exception: Exception)
Link copied to clipboard
fun setOutputFileParameters(inputFormat: MediaFormat, outputFormat: MediaFormat, newBitrate: Int)

Set output parameters like bitrate and frame rate

Link copied to clipboard
fun setUpMP4Movie(rotation: Int, cacheFile: File): Mp4Movie

Setup movie with the height, width, and rotation values