I use FFmpeg library to crop a video in an Android project. User captured video with device camera.

  • 10-sec video original 640x480 = 200 KB

After crop by FFmpeg; why did the cropped file size is increase?:

  • 10-sec video cropped 640x417 = 1.4 MB (!!!)

I used this command:

-i video.mp4 -vf crop=640.0:417.10345:0:0 -threads 5 -preset ultrafast -strict -2 videocropped.mp4

Details Camera Device for Original Video Capture:

  • File Format: MP4
  • Video Codec: H263
  • Audio Codec: AMR-NB
  • Video Encoded Bitrate: 256000
  • Frame Rate: 30 fps
  • Video Dimensions: 640x480
  • You don't specify a target codecs at all...? – Daniel B Jun 27 '16 at 4:44

The -preset ultrafast means a lot less time is spent on compression. Since you're decompressing the file, cropping, then re-compressing it, you'll end up with a bigger file.

There's no easy way to get the "correct" way to process the file because your source video is already compressed. The process will require decompression -> crop -> recompression so you'll have to either spend time compressing it or deal with a bigger file.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.