0

I want to set watermark width and height same as video width and height.

String[] cmd={"-i",margefilePath,"-ignore_loop","0","-i","/storage/emulated/0/Download/light2.gif","-i","/storage/emulated/0/Download/04 - Aa To Sahi - DownloadMing.LA.mp3","-filter_complex","[1:v]format=yuva444p,scale="+800+":"+720+",setsar=1,rotate="+angle+":c=black@0:ow=rotw("+angle+"):oh=roth("+angle+") [rotate];[0:v][rotate] overlay=0:0:shortest=1[v]","-map","[v]","-map","2:a:0","-c:a","aac","-shortest","-y","/storage/emulated/0/Movies/video_gif_light2.mp4"};

If I try to scale using constant value it's not work all time. Please tell me how to scale watermark dynamically?

  • String[] cmd={"-i",margefilePath,"-ignore_loop","0","-i","/storage/emulated/0/Download/light2.gif","-i","/storage/emulated/0/Download/04 - Aa To Sahi - DownloadMing.LA.mp3","-filter_complex","[1:v][0:v]scale2ref[2nd][ref];[ref][2nd]vstack;[1:v]format=yuva444p;[0:v] overlay=0:0:shortest=1[v]","-map","[v]","-map","2:a:0","-c:a","aac","-shortest","-y","/storage/emulated/0/Movies/video_gif_light22.mp4"}; it's not work .command run infinity time. – p.jadhav Jun 15 '18 at 5:44
  • please help me.. – p.jadhav Jun 15 '18 at 6:07
1

Use

String[] cmd={"-i",margefilePath,"-ignore_loop","0","-i","/storage/emulated/0/Download/light2.gif","-i","/storage/emulated/0/Download/04 - Aa To Sahi - DownloadMing.LA.mp3","-filter_complex","[1:v][0:v]scale2ref[2nd][ref];[2nd]format=yuva444p[2nd];[ref][2nd]overlay=0:0:shortest=1[v]","-map","[v]","-map","2:a:0","-c:a","aac","-shortest","-y","/storage/emulated/0/Movies/video_gif_light22.mp4"};

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.