start

fun start(context: Context, uris: List<Uri>, isStreamable: Boolean = false, storageConfiguration: StorageConfiguration, configureWith: Configuration, listener: CompressionListener)

This function compresses a given list of uris of video files and writes the compressed video file at SharedStorageConfiguration.saveAt directory, or at AppSpecificStorageConfiguration.subFolderName

The source videos should be provided content uris.

Only sharedStorageConfiguration or appSpecificStorageConfiguration must be specified at a time. Passing both will throw an Exception.

Parameters

context

the application context.

uris

the list of content Uris of the video files.

isStreamable

determines if the output video should be prepared for streaming.

sharedStorageConfiguration

configuration for the path directory where the compressed videos will be saved, and the name of the file

appSpecificStorageConfiguration

configuration for the path directory where the compressed videos will be saved, the name of the file, and any sub-folders name. The library won't create the subfolder and will throw an exception if the subfolder does not exist.

configureWith

to allow add video compression configuration that could be: Configuration.quality to allow choosing a video quality that can be VideoQuality.LOW, VideoQuality.MEDIUM, VideoQuality.HIGH, and VideoQuality.VERY_HIGH. This defaults to VideoQuality.MEDIUM to determine if the checking for a minimum bitrate threshold before compression is enabled or not. This default to true Configuration.videoBitrateInMbps which is a custom bitrate for the video. You might consider setting Configuration.isMinBitrateCheckEnabled to false if your bitrate is less than 2000000.