Skip to content

Latest commit

 

History

History
44 lines (38 loc) · 1.77 KB

README.md

File metadata and controls

44 lines (38 loc) · 1.77 KB

Maven Central GitHub license Codacy Badge

VideoConverter

Video file conversion library based on ExtractDecodeEditEncodeMuxTest.java CTS test

Installation

VideoConverter is installed by adding the following dependency to your app/build.gradle file:

dependencies {
    implementation 'com.dstukalov:videoconverter:1.10'
}

You may also need to add the following to your project/build.gradle file:

repositories {
    ...
    mavenCentral()
}

Usage

MediaConverter converter = new MediaConverter();
converter.setInput(context, uri);
converter.setOutput(outputStream);
converter.setTimeRange(timeFrom, timeTo);
converter.setVideoResolution(360);
converter.setVideoBitrate(2000000);
converter.setAudioBitrate(128000);

converter.setListener(percent -> {
    publishProgress(percent);
    return isCancelled();
});

converter.convert();

Demo

Android app on Google Play