Library
implementation 'com.arthenica:mobile-ffmpeg-full:4.2.2.LTS'
String[] complexCommand = {
"-y"
, "-r"
, "30"
, "-t"
, second + ""
, "-i"
, path
, "-vf"
, "scale=1080:force_original_aspect_ratio=increase,crop=1080" // (for center crop)
, "-strict"
, "experimental"
, "-preset"
, "ultrafast"
, "-crf"
, "30"
, outputPath
};
int returnCode = com.arthenica.mobileffmpeg.FFmpeg.execute(complexCommand);
if (returnCode == RETURN_CODE_SUCCESS) {
// Completed with success
} else if (returnCode == RETURN_CODE_CANCEL) {
} else {
}
Comments
Post a Comment