Android Video Editing using ffmpeg -
i using ffmpeg library video editing using bin ffmed file in android code. works fine when crop video , rotate it, takes time , got stuck.
this method call video cropping.
public void rotateandcropclip(string in, string out,int rotate, shellcallback callback) throws ioexception, interruptedexception { arraylist<string> cmd = new arraylist<string>(); cmd = new arraylist<string>(); cmd.add(mffmpegbin); // input file cmd.add("-i"); cmd.add(in); cmd.add("-vf"); if(rotate == 1){ cmd.add("crop=360:480:0:0,transpose="+rotate); }else{ cmd.add("transpose="+rotate+",crop=480:360:0:0"); } cmd.add("-preset"); cmd.add("ultrafast"); cmd.add("-c:a"); cmd.add("copy"); // output file cmd.add(out); execffmpeg(cmd, callback); }
is there way stop freezing app , boost processing or other way/ library video croping?
well how works!
as using
cmd.add("-preset"); cmd.add("ultrafast");
it still better others
i'd recommended use....
cmd.add("-threads"); cmd.add("5");
ffmpeg stay slow, improve performance.
hope helps :)
Comments
Post a Comment