Sayaki
Sayaki

Reputation: 789

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?

Upvotes: 10

Views: 6960

Answers (1)

Kalpesh
Kalpesh

Reputation: 1807

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... :-)

Upvotes: 23

Related Questions