Search code examples
javaandroidvideoffmpegvideo-processing

Android cropping and decreasing video size


we are going to start an app that captures videos or picks videos from gallery. The videos will be exactly 30 seconds, so users can crop or trim videos like video editor.

At this point, we got 2 main problems. The first one is video size. You know the video size could be huge for uploading :) So we need to decrease video size. The other problem is when iOS device captures and uploads video to server, there are some problems when trying to play that video on android app.

We have used “ffmpeg” library before for an another project but that library has varous problems like slow compression or library .so file’s size. And also have compatibility issues with sdk 24 (nougat)

Anyone has an experience about that? Or any ideas to overcome those problems? Thank u all.


Solution

  • I don't know what problems you have with ffmpeg. But it is definetely the best and the fastest library available for video editing,creating etc. Use ffmpeg4android if size is important for you. The library is about 6 megabytes and it is a wrapper for ffmpeg and has most usable methods of ffmpeg.