When i run any command of FFMPEG, It taking too much time in execution. I am using FFMPEG command for reverse video, audio video merge, create GIF images and changing speed of video. Please tell me how to run FFMPEG command fast. Please Help me
add below code in ffmpeg command to increase little bit speed of processing
-c:v libx264 -preset ultrafast
for audio trimming
int minutes = (int) Math.floor(start_sec / 1000 / 60);
int seconds =(int)Math.ceil(start_sec / 1000) - (minutes * 60);
int endSeconds=(int) ((end_sec / 1000) - (minutes * 60));
int duration=endSeconds-seconds;
Log.d("start_point_seconds",""+seconds);
Log.d("start minutes",""+minutes);
String[] complexCommand = {"-i", src + "", "-ss", "00:"+minutes+":"+seconds, "-t",""+duration ,"-acodec","copy","/storage/emulated/0/Music/"+app_name+"/music_" + number + ".mp3"};
you should use "-preset", "ultrafast" in your ffmpeg command to speedup execution time but it only works if video is less than 15 seconds otherwise it speedup execution time but delay on startup time of video play and it might look like your audio and video not matched with frames
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With