p.jadhav
p.jadhav

Reputation: 61

how to add multiple gif watermakr in one video usign ffmpeg in android

i want to create video with multiple gif images as sticker .i have already use ffmpeg library for create normal video.

below code i have already use:

String[] cmd={"-i",margefilePath,"-ignore_loop","0","-i","unnamed.gif","-i","unnamed.gif","-i","unnamed.gif","-i","unnamed.gif","-i","unnamed.gif","-filter_complex","[0][1]overlay=x=W-w:y=0[tr];[tr][2]overlay=x=0:y=0[tl];[tl][3]overlay=x=W-w:y=H-h[br];[br][4]overlay=x=0:y=H-h[bl];[bl][5]overlay=x=(W-w)/2:y=(H-h)/2","out.mp4"};

Please help me how can i add multiple gif images in video . Thanks in advance :) and sorry for bad english

Upvotes: 0

Views: 742

Answers (1)

Shubham
Shubham

Reputation: 535

Add :shortest=1 in overlay tag like [bl][5]overlay=x=(W-w)/2:y=(H-h)/2:shortest=1 in each GIF loop.

Upvotes: 1

Related Questions