ffmpeg-android-java
ffmpeg-android-java copied to clipboard
How to increase speed for -filter_complex commands (Issue : speed = 0.018x)
@WritingMinds @hiteshsondhi88 @miteshsondhi @jacobtabak , I have below command for removing green color from video and then adding another video as overlay. Issue - The command excecution time is 6 - 7 mins (speed not increasing more than 0.018x) Please help me out, how to increase the speed of the command and make output execution time to 1 min or lesser than that.
String[] command = new String[]{"-i" , videoPath1 , "-i" , videoPath ,"-filter_complex" , "[1:v]colorkey=0x3BBD1E:0.33:0.23[ckout];[0:v][ckout]overlay[out]", "-map" [out]","-preset", "ultrafast", outputFilePath};
Logcat
D/debug: frame= 3 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A dup=1 drop=0 speed= 0x
D/debug: frame= 6 fps=5.2 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A dup=1 drop=0 speed= 0x
D/debug: frame= 9 fps=5.4 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A dup=1 drop=0 speed= 0x
D/debug: frame= 13 fps=5.6 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A dup=1 drop=0 speed= 0x
D/debug: frame= 16 fps=5.6 q=23.0 size= 83kB time=00:00:00.10 bitrate=6794.4kbits/s dup=1 drop=0 speed=0.0351x
D/debug: frame= 20 fps=5.7 q=24.0 size= 164kB time=00:00:00.23 bitrate=5740.7kbits/s dup=1 drop=0 speed=0.0665x
D/debug: frame= 23 fps=5.7 q=23.0 size= 221kB time=00:00:00.33 bitrate=5420.3kbits/s dup=1 drop=0 speed=0.0824x
D/debug: frame= 27 fps=5.8 q=23.0 size= 306kB time=00:00:00.46 bitrate=5366.0kbits/s dup=1 drop=0 speed=0.0999x
D/debug: frame= 30 fps=5.8 q=23.0 size= 358kB time=00:00:00.56 bitrate=5173.6kbits/s dup=1 drop=0 speed=0.109x
D/debug: frame= 34 fps=5.8 q=23.0 size= 433kB time=00:00:00.70 bitrate=5072.7kbits/s dup=1 drop=0 speed=0.12x
D/debug: frame= 38 fps=5.9 q=22.0 size= 498kB time=00:00:00.83 bitrate=4898.8kbits/s dup=1 drop=0 speed=0.129x
D/debug: frame= 42 fps=5.9 q=22.0 size= 568kB time=00:00:00.96 bitrate=4817.0kbits/s dup=1 drop=0 speed=0.136x
D/debug: frame= 46 fps=6.0 q=23.0 size= 631kB time=00:00:01.10 bitrate=4699.9kbits/s dup=1 drop=0 speed=0.143x
D/debug: frame= 50 fps=6.0 q=22.0 size= 686kB time=00:00:01.23 bitrate=4554.6kbits/s dup=1 drop=0 speed=0.148x
D/debug: frame= 54 fps=6.1 q=21.0 size= 742kB time=00:00:01.36 bitrate=4446.4kbits/s dup=1 drop=0 speed=0.153x
D/debug: frame= 58 fps=6.1 q=22.0 size= 795kB time=00:00:01.50 bitrate=4344.0kbits/s dup=1 drop=0 speed=0.158x
D/debug: frame= 61 fps=6.1 q=21.0 size= 838kB time=00:00:01.60 bitrate=4292.4kbits/s dup=1 drop=0 speed=0.159x
D/debug: frame= 64 fps=6.1 q=21.0 size= 875kB time=00:00:01.70 bitrate=4216.3kbits/s dup=1 drop=0 speed=0.161x
D/debug: frame= 67 fps=6.0 q=22.0 size= 912kB time=00:00:01.80 bitrate=4151.6kbits/s dup=1 drop=0 speed=0.162x
D/debug: frame= 70 fps=6.0 q=22.0 size= 943kB time=00:00:01.90 bitrate=4067.2kbits/s dup=1 drop=0 speed=0.163x
D/debug: frame= 74 fps=6.0 q=22.0 size= 981kB time=00:00:02.03 bitrate=3950.4kbits/s dup=1 drop=0 speed=0.165x
D/debug: frame= 78 fps=6.0 q=23.0 size= 1025kB time=00:00:02.16 bitrate=3873.8kbits/s dup=1 drop=0 speed=0.168x
D/debug: frame= 82 fps=6.0 q=23.0 size= 1076kB time=00:00:02.30 bitrate=3833.6kbits/s dup=1 drop=0 speed=0.17x
D/debug: frame= 86 fps=6.1 q=23.0 size= 1125kB time=00:00:02.43 bitrate=3786.6kbits/s dup=1 drop=0 speed=0.172x
D/debug: frame= 90 fps=6.1 q=23.0 size= 1190kB time=00:00:02.56 bitrate=3798.4kbits/s dup=1 drop=0 speed=0.174x
D/debug: frame= 94 fps=6.1 q=23.0 size= 1248kB time=00:00:02.70 bitrate=3787.7kbits/s dup=1 drop=0 speed=0.176x
D/debug: frame= 98 fps=6.2 q=23.0 size= 1306kB time=00:00:02.83 bitrate=3776.0kbits/s dup=1 drop=0 speed=0.178x
D/debug: frame= 102 fps=6.2 q=23.0 size= 1366kB time=00:00:02.96 bitrate=3770.9kbits/s dup=1 drop=0 speed=0.18x
D/debug: frame= 105 fps=6.2 q=23.0 size= 1410kB time=00:00:03.06 bitrate=3767.4kbits/s dup=1 drop=0 speed=0.18x
Please do not randomly tag contributors.
Please do not randomly tag contributors.
Okay Request you please help me out in resolving my issue.
have you tried -threads add "-threads", "50" just before -preset and check if it increases the speed.
have you tried -threads add "-threads", "50" just before -preset and check if it increases the speed.
no i have not used threads Let me try this, and update you :)
have you tried -threads add "-threads", "50" just before -preset and check if it increases the speed.
@yadavkohi, I tried adding this "-threads", "50" But, i have again the same issue. Speed not at all increasing by 0.126x
I have selected videos of around only 30secs, and i am getting output after 5 mins