Speed up FFmpeg processing time

I'm using FFmpeg on android to:

1- merge 3 videos

2- add audio

3- add logo

4- trim one of the 3 videos

5- change fps for the output

I have implemented the right code but it took 30 min. for (120 fps, 1:17 min) video. I added the flag ( -preset ultrafast ) and time decreased to 6 min. I need the time to be shorter than 6min. (2-3 min). Is this possible? Is there any better alternatives to ffmpeg?

This is my code for ffmpeg:

String command2 = "-y -i " + logo + " -i " + intro + " -ss " + start + " -t " + (end-start) +
            " -async 1 -i " + inputFile + " -i " + outro + " -i " + audio
            + " -filter_complex [0]scale=1280*0.15:-1,colorchannelmixer=aa=0.5[o];" +
            "[1]fifo[v1];[2]fifo[v2];[3]fifo[v3];" +
            "[v1][v2][v3]concat=3[v];" +
            "[v][o]overlay=5:5[o3]" +
            " -map [o3] -map 4:a" +
            " -r " + fps + " -shortest -preset ultrafast -threads 8 -cpu-used 3 -c:a copy " + outFile;

1 answer