1

I am using ffmpeg library for water marking in android, somehow it is taking high amount of time (like 5MB video taking 1 minute of time). Let me know if you have any suggestions.

gradle dependency: implementation 'com.writingminds:FFmpegAndroid:0.3.2'

slow code: val command = arrayOf("-i", srcVideo, "-i", watermarkImgPath, "-filter_complex", "overlay=20:20", outPutVideo)

Cristan
  • 12,083
  • 7
  • 65
  • 69
  • see https://stackoverflow.com/questions/55589904/ffmpeg-adding-image-watermark-to-video-process-is-very-slow/55598421 – Pawel May 15 '19 at 20:14
  • { "-i",inputPath.mp4, "-i", imagepath.jpg,"-filter_complex", "[1] scale=70:70 [tmp];[0][tmp] overlay=main_w-overlay_w-10:main_h-overlay_h-10",output.mp4} try this it will help you. – VikasSharmalp Sep 19 '19 at 07:10
  • @VikasSharmalp i use the same line in my code, every thing is correct but in the end the error are occur, and the error is `Error Creating Video` `Command failed with state COMPLETED and rc 1.null` – Hassan Ali Mughal Sep 21 '22 at 06:28
  • i don't know what thing is wrong when all requirement of code i given my code is:- `{"-i", new_vid, "-i", String.valueOf(bit), "-filter_complex", "[1] scale=70:70 [tmp];[0][tmp] overlay=main_w-overlay_w-10:main_h-overlay_h-10", newfiles};` – Hassan Ali Mughal Sep 21 '22 at 06:35

1 Answers1

0

try using this implementation: implementation 'com.arthenica:ffmpeg-kit-full-gpl:4.5.1-1'