use of org.fagu.fmv.ffmpeg.filter.impl.FadeVideo in project fmv by f-agu.
the class FFHelper method fade1.
/**
* @param inFile
* @param outFile
* @param fadeType
* @param duration
* @throws IOException
*/
public static void fade1(File inFile, File outFile, FadeType fadeType, Duration duration) throws IOException {
FFMPEGExecutorBuilder builder = FFMPEGExecutorBuilder.create();
builder.addMediaInputFile(inFile);
FadeVideo fadeVideo = FadeVideo.build().type(fadeType).startTime(Time.valueOf(0)).duration(duration);
FadeAudio fadeAudio = FadeAudio.build().type(fadeType).startTime(Time.valueOf(0)).duration(duration);
builder.filter(fadeVideo).filter(fadeAudio);
builder.addMediaOutputFile(outFile).overwrite();
FFExecutor<Object> executor = builder.build();
executor.execute();
}
Aggregations