cropsly / ffmpeg-android

FFmpeg for Android compiled with x264, libass, fontconfig, freetype, fribidi and lame (Supports Android 4.1+)
http://writingminds.github.io/ffmpeg-android/
Other
1.63k stars 415 forks source link

Crop video with respect to aspect ratio #110

Open saadbzu opened 4 years ago

saadbzu commented 4 years ago

I have i question about crop the video using ffmpeg. I used this command to crop video:

final String[] cmd = "-i /storage/emulated/0/nature.mp4 -vf crop=720:720:0:400 -threads 5 -preset ultrafast -strict -2 /storage/emulated/0/DCIM/Camera/YourCroppedMovie.mp4".split(" ");

This command work fine but i want to give aspect ratio not fixed height and width this command here:

crop=720:720:0:400