Search in sources :

Example 1 with Volume

use of org.fagu.fmv.ffmpeg.filter.impl.Volume in project fmv by f-agu.

the class FFHelper method audioVolumeAdjustToMax.

/**
 * @param inFile
 * @param outFile
 * @throws IOException
 */
public static void audioVolumeAdjustToMax(File inFile, File outFile) throws IOException {
    VolumeDetected volumeDetected = audioVolumeDetect(inFile);
    System.out.println(volumeDetected);
    FFMPEGExecutorBuilder builder = FFMPEGExecutorBuilder.create();
    builder.addMediaInputFile(inFile);
    Volume volume = Volume.build().increaseToMax(volumeDetected);
    builder.filter(volume);
    builder.addMediaOutputFile(outFile).videoCodecCopy().overwrite();
    FFExecutor<Object> executor = builder.build();
    executor.execute();
}
Also used : FFMPEGExecutorBuilder(org.fagu.fmv.ffmpeg.executor.FFMPEGExecutorBuilder) Volume(org.fagu.fmv.ffmpeg.filter.impl.Volume) VolumeDetected(org.fagu.fmv.ffmpeg.filter.impl.VolumeDetected)

Aggregations

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