cropsly / ffmpeg-android-java

Android java library for FFmpeg binary compiled using https://github.com/writingminds/ffmpeg-android
http://writingminds.github.io/ffmpeg-android-java
GNU General Public License v3.0
3.32k stars 831 forks source link

Too many inputs specified for the "concat" filter #347

Open mansiJspaceo opened 4 years ago

mansiJspaceo commented 4 years ago

while i am add animation between multiple images found some error like Too many inputs specified for the "concat" filter how to solve this

This is command for animation,

-y -loop 1 -i /storage/emulated/0/Pictures/IMG_20191126_151720.jpg -loop 1 -i /storage/emulated/0/Pictures/IMG_20191126_151720_1.jpg -loop 1 -i /storage/emulated/0/Pictures/IMG_20191126_151720_2.jpg -filter_complex [0:v]setpts=PTS-STARTPTS,scale=w='if(gte(iw/ih,720/1080),-1,720)':h='if(gte(iw/ih,720/1080),1080,-1)',crop=720:1080,setsar=sar=1/1,fps=30,format=rgba,split=2[stream1out1][stream1out2];[1:v]setpts=PTS-STARTPTS,scale=w='if(gte(iw/ih,720/1080),-1,720)':h='if(gte(iw/ih,720/1080),1080,-1)',crop=720:1080,setsar=sar=1/1,fps=30,format=rgba,split=2[stream2out1][stream2out2];[2:v]setpts=PTS-STARTPTS,scale=w='if(gte(iw/ih,720/1080),-1,720)':h='if(gte(iw/ih,720/1080),1080,-1)',crop=720:1080,setsar=sar=1/1,fps=30,format=rgba,split=2[stream3out1][stream3out2];[stream0out1]pad=width=720:height=1080:x=(720-iw)/2:y=(1080-ih)/2:color=#00000000,trim=duration=2,select=lte(n\,60)[stream0overlaid];[stream1out1]pad=width=720:height=1080:x=(720-iw)/2:y=(1080-ih)/2:color=#00000000,trim=duration=2,select=lte(n\,60)[stream1overlaid];[stream2out1]pad=width=720:height=1080:x=(720-iw)/2:y=(1080-ih)/2:color=#00000000,trim=duration=2,select=lte(n\,60)[stream2overlaid];[stream1starting][stream0ending]blend=all_expr='A(if(gte(T,1),1,T/1))+B(1-(if(gte(T,1),1,T/1)))',select=lte(n\,30)[stream1blended];[stream2starting][stream1ending]blend=all_expr='A(if(gte(T,1),1,T/1))+B(1-(if(gte(T,1),1,T/1)))',select=lte(n\,30)[stream2blended];[stream3starting][stream2ending]blend=all_expr='A(if(gte(T,1),1,T/1))+B(1-(if(gte(T,1),1,T/1)))',select=lte(n\,30)[stream3blended];[stream0overlaid][stream1blended][stream1overlaid][stream2blended][stream2overlaid][stream3blended][stream3overlaid]concat=n=3:v=1:a=0,format=yuv420p[video] -map [video] -c:v libx264 -r 30 -preset superfast /storage/emulated/0/DemoVideo/Video_demo1574761641986.mp4

If anybody found solution... please comment Thanks in Advance