use of org.fagu.fmv.ffmpeg.filter.impl.Crop in project fmv by f-agu.
the class FFHelper method crop.
/**
* @param inFile
* @param outFile
* @param size
* @throws IOException
*/
public static void crop(File inFile, File outFile, Size size) throws IOException {
FFMPEGExecutorBuilder builder = FFMPEGExecutorBuilder.create();
builder.addMediaInputFile(inFile);
Crop crop = Crop.build().centralArea(size);
builder.filter(crop);
builder.addMediaOutputFile(outFile).overwrite();
FFExecutor<Object> executor = builder.build();
executor.execute();
}
Aggregations