cropsly / ffmpeg-android-java

Android java library for FFmpeg binary compiled using https://github.com/writingminds/ffmpeg-android
http://writingminds.github.io/ffmpeg-android-java
GNU General Public License v3.0
3.32k stars 830 forks source link

Crop video with respect to aspect ratio #352

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