Sayaki Sayaki - 4 months ago 84
Android Question

Crop video with FFMpeg is very slow

I'm using ffmpeg in android to crop video. To do it I use command:

ffmpeg -i movie.mp4 -vf "crop=640:256:0:400" -strict -2 YourCroppedMovie.mp4

My problem is that it is incredible slow. Cropping 10sec movie taking some about 30sec. Is there any way to speed it up?


Ok try to make the change to your command like this:

ffmpeg -i movie.mp4 -vf "crop=640:256:0:400" -threads 5 -preset ultrafast -strict -2 YourCroppedMovie.mp4

I tried this and reduce execution time from 46 secs to 4 secs. It's too fast now... :-)