Search in sources :

Example 1 with Crop

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();
}
Also used : Crop(org.fagu.fmv.ffmpeg.filter.impl.Crop) FFMPEGExecutorBuilder(org.fagu.fmv.ffmpeg.executor.FFMPEGExecutorBuilder)

Aggregations

FFMPEGExecutorBuilder (org.fagu.fmv.ffmpeg.executor.FFMPEGExecutorBuilder)1 Crop (org.fagu.fmv.ffmpeg.filter.impl.Crop)1