Best android open-source packages and libraries.

VideoCrop

Crop video with Android Media Codec API
Updated 2 months ago

Video crop app

Build Status Version License

TLDR

Just use Media3 Transformer library or LiTr. This repo is just an exploration how to use raw MediaCodec APIs to do it manually and was created before these libraries were available.

About

You can crop a video to make it square and be less than 20 seconds in duration.

It uses MediaCodec API for decoding and encoding video. A source video file is read by MediaExtractor. Frame transformations are done with a regular Bitmap. To be able to do so, it is required to convert frames pixel array from YUV to RGB and back with help of RenderScript. The tranformed frames are saved to a file with help of MediaMuxer.

Screenshots

screenshot_20181117-134723 screenshot_20181117-134733 screenshot_20181117-134741 screenshot_20181117-134814 screenshot_20181117-135409

License

WTFPL because I don't even know if this code works on devices other than mine.