bramp / ffmpeg-cli-wrapper

Java wrapper around the FFmpeg command line tool
BSD 2-Clause "Simplified" License
1.73k stars 413 forks source link

Watermark a Video #146

Open damogallagher opened 6 years ago

damogallagher commented 6 years ago

Hi

I was looking at the following link for adding a watermark https://github.com/bramp/ffmpeg-cli-wrapper/issues/76

Specifically the code `FFmpegBuilder builder = new FFmpegBuilder() .setInput(infile)
.addInput(sampleWatermarkImg) .overrideOutputFiles(true) .addOutput(destFile)
.setVideoCodec(codec)
.addExtraArgs(extraArgs)
.setVideoFrameRate(24, 1)
.setVideoResolution( iwidth , newHeight) .setComplexVideoFilter("overlay=main_w-overlay_w-10:main_h-overlay_h-10") .setStrict(FFmpegBuilder.Strict.EXPERIMENTAL) .done();

log.debug( "Running ffmpeg as " + builder.getExecString());` However with the current version of the code - the method setComplexVideoFilter doesnt exist Which method should I be using?

Thank you Damien

m7mdtiger commented 4 years ago

In case of anyone else struggled with the same issue: You should use .setComplexFilter() not .setComplexVideoFilter() and use it before .addOutput() !!