I want to compress video files on android device before uploading them to server. I have looked for Mediacodec (feature supported in 4.3+) and ffmpeg for android but unable to decide which one to use. Is there any compariosion available based on supported input formats, memory load, increase in app size etc. ?
Asked
Active
Viewed 302 times
1 Answers
2
Use Mediacodec, it is native to the platform, it uses availabale hardware.
It is much better to use native resources, almost all modern processors in cell phones, tablets and other Android devices has a special hardware unit for compression and decompression of video, it is fast, energy-efficent, and has native API since Android 4.3, easy and ready to use. Unless you would like to write your app for devices where the mediacodec is not available, use it in first place.

Krzysztof Cichocki
- 6,294
- 1
- 16
- 32