videokit-ffmpeg-android icon indicating copy to clipboard operation
videokit-ffmpeg-android copied to clipboard

Custom command for watermark

Open AdnanYupi opened this issue 6 years ago • 1 comments

Hi @IljaKosynkin and to everyone else. I tried to put watermark on one video but custom command won't execute and error code is 3037. I run the same code for trimming video and video is trimmed successfully so there is no issues with inputpath or outputpath also I have ic_watermark.png in assets folder. I tried with image from Drawable but same error code.

So here is the command which I tried to run: executeFFmepg(path, generateFile().getAbsolutePath(), "-i file:///android_asset/ic_watermark.png -filter_complex overlay=main_w-overlay_w-5:main_h-overlay_h-5");

and this is the executeFFmepg method:

 `private void executeFFmepg(String inputPath, String outputPath, String customCommand){
    final Command command = videoKit.createCommand()
            .overwriteOutput()
            .inputPath(inputPath)
            .outputPath(outputPath)
            .customCommand(customCommand)
            .experimentalFlag()
            .build();
     new AsyncCommandExecutor(command, this).execute();  }`

A don't have experience with FFmpeg so any help would be very appreciated. Thanks

AdnanYupi avatar May 25 '18 10:05 AdnanYupi

just try to use native run method directly (you will need to edit library and make run method public)

anonym24 avatar May 26 '18 10:05 anonym24