Trim video
List<String> cmdList = new ArrayList<>();
cmdList.add("-y")
cmdList.add("-i")
cmdList.add(inputPath)
cmdList.add("-ss")
cmdList.add(startPosition)
cmdList.add("-to")
cmdList.add(endPosition)
cmdList.add("-c")
cmdList.add("copy")
cmdList.add(outputPath)
int returnCode = FFmpeg.execute(cmdList.toTypedArray())
if (returnCode == FFmpeg.RETURN_CODE_SUCCESS) {
// Completed successfully.
} else if (returnCode == FFmpeg.RETURN_CODE_CANCEL) {
// Cancelled by user.
} else {
// Command execution failed
}
Comments
Post a Comment