Video editing API in Android

Merc picture Merc · Dec 2, 2015 · Viewed 15.8k times · Source

Does Android have built-in abilities to do video editing? If so, where?

I need to get two MP4 videos, and generate one with a nice transition between the videos. Right now, I am sending everything to the server. However, I would love to be able to do it straight on the device. I also need to apply some basic effects to the video.

So, does Android have an API for this? If not, what tools/libraries/frameworks are available? And is the gap being covered?

Answer

Morrison Chang picture Morrison Chang · Dec 2, 2015

For video editing the library would be FFmpeg as referenced in other questions like: Video processing and filtering libraries

However Android has been improving its framework MediaCodec. It may help to read: http://bigflake.com/mediacodec/ and the latest documentation: http://developer.android.com/reference/android/media/MediaCodec.html

And of course don't forget to take a look at the Media related Google Samples in github: https://github.com/googlesamples?utf8=%E2%9C%93&query=media

2019-11 Edit:

Android Samples moved here: https://github.com/android?utf8=%E2%9C%93&q=media&type=&language=

Additionally if you can support a min SDK API level of 21 and only use supported Android media codec profiles so camera okay but random video off internet perhaps not there are third-party libraries like MasayukiSuda's Mp4Composer-android which might work for your use case.