1

I want to reduce the size of a video file to less than 25mb. Is there a way to achieve it without using any third party library?

Pavandroid
  • 1,586
  • 2
  • 15
  • 30
hungkk
  • 338
  • 3
  • 11

1 Answers1

3

You can do this with my mp4parser library. Have a look at the ShortenExample it does exactly what the name suggests. Since the library cannot re-encode the video it can only cut the video at I-frames. So the points in time where you can make a cut are quite coarse.

On Android 4.1 you can access the hardware codecs via MediaCodec API which could be an option (but I haven't seen any example of that yet)

Or, you can use this class: TrimVideoUtils.java

Source: https://stackoverflow.com/a/11551682/1796309

Aleksandr
  • 4,906
  • 4
  • 32
  • 47