简体   繁体   中英

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.

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.

Please check Android MediaMuxer Api https://developer.android.com/reference/android/media/MediaMuxer.html

With this you can crop video, change it's frame rate and resolution

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM