Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Crop video with FFMpeg is very slow

Tags:

android

ffmpeg

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?

like image 565
Sayaki Avatar asked Jun 24 '14 12:06

Sayaki


1 Answers

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

like image 121
Kalpesh Avatar answered Oct 27 '22 09:10

Kalpesh