use of org.fagu.fmv.ffmpeg.filter.impl.AudioModifier in project fmv by f-agu.
the class FFHelper method audioHalfVolume.
/**
* @param inFile
* @param outFile
* @throws IOException
*/
public static void audioHalfVolume(File inFile, File outFile) throws IOException {
FFMPEGExecutorBuilder builder = FFMPEGExecutorBuilder.create();
InputProcessor inputProcessor = builder.addMediaInputFile(inFile);
AudioModifier audioModifier = AudioModifier.build().halfVolume().channelLayout(ChannelLayout.SAME);
FilterComplex filtercomplex = FilterComplex.create(audioModifier);
filtercomplex.addInput(inputProcessor);
builder.filter(filtercomplex);
builder.addMediaOutputFile(outFile).overwrite();
FFExecutor<Object> executor = builder.build();
executor.execute();
}
Aggregations