Giter VIP home page Giter VIP logo

Comments (25)

pranishres avatar pranishres commented on May 25, 2024 1

Check this Demo app .You might get a warning about native crash report while trying to upload the app.Just ignore that

Thank you so much for your support. My release .apk and aab were about 87 MB and 55 MB respectively. But while downloading from playstore, it was just 22 MB.

from android-video-trimmer.

DoozyDoz avatar DoozyDoz commented on May 25, 2024 1

Faced the issue before, the only working solution is to compile different builds of FFmpeg for specific target functionality and codecs. for a user that only uses trimming part of the library the size should be small, for example for a user that simply extracts audio from video the library size should be south of 3MBs

from android-video-trimmer.

a914-gowtham avatar a914-gowtham commented on May 25, 2024

Add these snippets build.gradle(app level) inside the android tag.And use Android App bundle It will make huge difference in size

sourceSets.main {
        assets.srcDirs = ['assets']
        jni.srcDirs = [] //disable automatic ndk-build
        jniLibs.srcDirs = ['libs']
    }

    sourceSets {
        main {
            assets.srcDirs = ['src/main/assets', 'src/main/assets/']
            res.srcDirs = ['src/main/res', 'src/main/res/drawable']
        }
    }

from android-video-trimmer.

pranishres avatar pranishres commented on May 25, 2024

Add these snippets build.gradle(app level) inside the android tag

sourceSets.main { assets.srcDirs = ['assets'] jni.srcDirs = [] //disable automatic ndk-build jniLibs.srcDirs = ['libs'] }

sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/assets/'] res.srcDirs = ['src/main/res', 'src/main/res/drawable'] } }

And use Android bundle.It will make huge difference in size

I just can't copy/paste these lines. Gives me this error

No signature of method: java.util.ArrayList.call() is applicable for argument types: (ArrayList) values: [[src/main/res, src/main/res/drawable]]
Possible solutions: tail(), tail(), wait(), last(), tails(), max()

from android-video-trimmer.

a914-gowtham avatar a914-gowtham commented on May 25, 2024

Check this code

from android-video-trimmer.

pranishres avatar pranishres commented on May 25, 2024

Check this code

Thank you. I used it but still, my .aab release file is 50mb. Will the size decrease if I don't use compression and remove those codes? I just want to crop the video for 15 secs.

from android-video-trimmer.

a914-gowtham avatar a914-gowtham commented on May 25, 2024

Don't consider the app bundle size. It doesn't decide the app size. If you want find the Apk size,you could upload your app bundle in Internal testing in Play console and check the size for every device or else Use can also use BundleTool for get Specific Apk for your device

from android-video-trimmer.

pranishres avatar pranishres commented on May 25, 2024

Don't consider the app bundle size. It doesn't decide the app size. If you want find the Apk size,you could upload your app bundle in Internal testing in Play console and check the size for every device or else Use can also use BundleTool for get Specific Apk for your device

So I just want to know is there any way I can reduce the size of the library? Because yours is the best one I found.

from android-video-trimmer.

a914-gowtham avatar a914-gowtham commented on May 25, 2024

Sorry..there is no way besides Using this

from android-video-trimmer.

pranishres avatar pranishres commented on May 25, 2024

Sorry..there is no way besides Using this

Using this still my apk size increased from 20Mb to 50 Mb. So what can I do. Its not feasible to accept more than doubled the apk size for a video cropper.

from android-video-trimmer.

a914-gowtham avatar a914-gowtham commented on May 25, 2024

It would be less than 20Mb,when you use app bundle and that snippet.I don't know what were wrong.I will check and get back to you asap

from android-video-trimmer.

pranishres avatar pranishres commented on May 25, 2024

It would be less than 20Mb,when you use app bundle and that snippet.I don't know what were wrong.I will check and get back to you asap

Thank you

from android-video-trimmer.

pranishres avatar pranishres commented on May 25, 2024

Please let me know if there are any updates from your side on this. After adding the library, my .aab increased from 17MB to 50MB.

from android-video-trimmer.

a914-gowtham avatar a914-gowtham commented on May 25, 2024

Have you tried to publish your app bundle on Internal track testing and did you see the app size from App bundle explorer

from android-video-trimmer.

pranishres avatar pranishres commented on May 25, 2024

Have you tried to publish your app bundle on Internal track testing and did you see the app size from App bundle explorer

I couldn't even upload the .aab to the play store after including the library.

from android-video-trimmer.

a914-gowtham avatar a914-gowtham commented on May 25, 2024

Really sorry for the inconvenience.I'm going to test an app to publish

from android-video-trimmer.

pranishres avatar pranishres commented on May 25, 2024

Really sorry for the inconvenience.I'm going to test an app to publish

thank you for your active support

from android-video-trimmer.

pranishres avatar pranishres commented on May 25, 2024

Really sorry for the inconvenience.I'm going to test an app to publish

I just downgraded my version from 1.4.0 to 1.3.0 which helped me reduce the application size by 20mb. But still its a huge app size.

from android-video-trimmer.

a914-gowtham avatar a914-gowtham commented on May 25, 2024

Yeah I used EpMedia library for ffmpeg in 1.3.0.That's is small is size however,It doesn't work in few devices.that's why i moved to mobile-ffmpeg

from android-video-trimmer.

a914-gowtham avatar a914-gowtham commented on May 25, 2024

Check this Demo app .You might get a warning about native crash report while trying to upload the app.Just ignore that

from android-video-trimmer.

braver-tool avatar braver-tool commented on May 25, 2024

I added the below lines in my app-level build. gradle file

defaultConfig { ........ ndk { abiFilters "arm64-v8a","x86_64" }

which means, app is not containing 32bit libraries, Is that correct or not? to reduce apk file size. Please give your reply..! Thanks in advance ...);-

from android-video-trimmer.

a914-gowtham avatar a914-gowtham commented on May 25, 2024

yes , that code is correct. but, mobile-ffmpeg is being used as a maven dependency so, it might not work. however, this library has an issue with release builds. so, you better refer this repo i have used mobile-ffmpeg as aar dependency for the release build issue workaround, and you can use abiFilters while using that aar

from android-video-trimmer.

braver-tool avatar braver-tool commented on May 25, 2024

Thanks for your response..! I added aar file as you said, and also i removed abiFilters in build.gradle file. Because i tested with above abiFilters, Some devices not supporting "arm64-v8a,x86_64" archs. They only supports "armeabi-v7a,x86,armeabi" archs. So facing apk file size problem. My release build increased 30 MB than before. Any better solution to reduce apk file size?

apk_analyzer

from android-video-trimmer.

a914-gowtham avatar a914-gowtham commented on May 25, 2024

just use android app bundle to reduce the size

from android-video-trimmer.

a914-gowtham avatar a914-gowtham commented on May 25, 2024

yes @DoozyDoz , that is a great idea. i need to get familiar with ffmpeg libraries. i will try this sometime.

if you can afford, it is good to move the video processing to backend. i believe whatsapp, telegram does the same.

imgsrc: yt/neetcode
Screenshot from 2023-08-16 11-05-09

from android-video-trimmer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.