androidperformanceffmpegandroid-ffmpegmobile-ffmpeg

Reduce apk size when using ffmpeg


I am building an app that can trim a video into multiple segments , for that purpose i have used ffmpeg library

This command does all the work

ffmpeg -i testfile.mp4 -c copy -f segment -segment_time 1200 testfile_piece_%02d.mp4

But including this library increased my app size upto ~45 mb

I want to reduce my apk size

I want help in

I am using this library 'com.arthenica:mobile-ffmpeg-min-gpl:4.4.LTS'


Solution

  • I found few ways to reduce app size when i was using ffmpeg.

    1. You could use app bundle. so, the unused arms will be ignored. when download from the playstore
    2. I would suggest not deleting x86 cause some low-end devices won't work without it. x86_64 can be deleted though. I have already done it once for min-4.4-lts not for min-gpl-4.4-lts. you can download it and directly use in your project and test it in the low-end devices .aar