Closed lijusparkt closed 3 years ago
Add these snippets build.gradle(app level) inside the android tag. Refer
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 can you share the library dependency version and the videotrim options you used
Hi, I have added the below snippets //USE THIS sourceSets.main { assets.srcDirs = ['assets'] jni.srcDirs = [] //disable automatic ndk-build jniLibs.srcDirs = ['libs'] }
//USE THIS TOO sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/assets/'] res.srcDirs = ['src/main/res', 'src/main/res/drawable'] } }
But the the issue is still there. with proguard.
Library Version: implementation 'com.github.a914-gowtham:Android-video-trimmer:1.5.2' Compress option TrimVideo.activity(String.valueOf(contentURI)) .setHideSeekBar(true) .setDestination(wallpaperDirectory.toString()) //default output path /storage/emulated/0/DOWNLOADS .setFileName("video_001") .setCompressOption(new CompressOption(30, "1M", 460, 320)) .start(this);
Result if (requestCode == TrimVideo.VIDEO_TRIMMER_REQ_CODE && data != null) { contentURI = Uri.parse(TrimVideo.getTrimmedVideoPath(data)); cv_video.setVisibility(View.VISIBLE); }
**Error Log**
E/mobile-ffmpeg: OnLoad thread failed to GetStaticMethodID for log.
2021-03-03 13:59:36.816 19967-20230/<
--------- beginning of crash
2021-03-03 13:59:36.958 19967-20230/<
Issue #605 is the reason of this issue. mobile-ffmpeg mavenCentral version has this issue for the workaround, I tried .aar file of mobile-ffmpeg lib as a workaround it solves the issue. but, I can't host the library on jitpack because it becomes aar(mobile-ffmpeg) inside the aar(videotrimmer library). hence, I have created a demo repo
Fixed on latest release
implementation 'com.github.a914-gowtham:Android-video-trimmer:1.6.1'
Hello Gautham, I think setDestination("path") is not working in this new version {'com.github.a914-gowtham:Android-video-trimmer:1.6.0'}
Yes, it has been removed. because of the android 11 storage update .now trimmed videos will be stored in /emulated/0/Android/data/com.yourapppackagename
Thanks for the update Gautham, Now its working in debug & release build with proguard (minifyEnabled true). The apk size is increased from 28 MB to 61 MB
Thanks for the update Gautham, Now its working in debug & release build with proguard (minifyEnabled true). The apk size is increased from 28 MB to 61 MB
use 'com.github.a914-gowtham:Android-video-trimmer:1.6.1' and app bundle, app bundle will ignore unused ABIs . This demo app has been published as app bundle
Hello,
This sdk is working fne. in debug mode and release mode. But when we add proguard rules and set minifyEnabled = true App is crashing when we start trim process (trimmer view - click -> tick mark) This crash is happening for all devices.
i already added the proguard rules { -dontwarn com.gowtham.library -keep class com.gowtham.library { *; } -keep interface com.gowtham.library* { ; } }
Crash catch in crash analytics
com.gowtham.library.ui.ActVideoTrimmer.getCompressionCommand android.media.MediaMetadataRetriever.setDataSource (MediaMetadataRetriever.java:77) com.gowtham.library.ui.ActVideoTrimmer.getCompressionCommand (ActVideoTrimmer.java:502) com.gowtham.library.ui.ActVideoTrimmer.validateVideo (ActVideoTrimmer.java:485) com.gowtham.library.ui.ActVideoTrimmer.onOptionsItemSelected (ActVideoTrimmer.java:456) android.app.Activity.onMenuItemSelected (Activity.java:4137) androidx.fragment.app.FragmentActivity.onMenuItemSelected (FragmentActivity.java:383) androidx.appcompat.app.AppCompatActivity.onMenuItemSelected (AppCompatActivity.java:219) androidx.appcompat.view.WindowCallbackWrapper.onMenuItemSelected (WindowCallbackWrapper.java:109) androidx.appcompat.view.WindowCallbackWrapper.onMenuItemSelected (WindowCallbackWrapper.java:109) androidx.appcompat.app.ToolbarActionBar$2.onMenuItemClick (ToolbarActionBar.java:64) androidx.appcompat.widget.Toolbar$1.onMenuItemClick (Toolbar.java:207) androidx.appcompat.widget.ActionMenuView$MenuBuilderCallback.onMenuItemSelected (ActionMenuView.java:781) androidx.appcompat.view.menu.MenuBuilder.dispatchMenuItemSelected (MenuBuilder.java:840) androidx.appcompat.view.menu.MenuItemImpl.invoke (MenuItemImpl.java:158) androidx.appcompat.view.menu.MenuBuilder.performItemAction (MenuBuilder.java:991) androidx.appcompat.view.menu.MenuBuilder.performItemAction (MenuBuilder.java:981) androidx.appcompat.widget.ActionMenuView.invokeItem (ActionMenuView.java:625) androidx.appcompat.view.menu.ActionMenuItemView.onClick (ActionMenuItemView.java:151) android.view.View.performClick (View.java:7140) android.view.View.performClickInternal (View.java:7117) android.view.View.access$3500 (View.java:801) android.view.View$PerformClick.run (View.java:27355) android.os.Handler.handleCallback (Handler.java:883) android.os.Handler.dispatchMessage (Handler.java:100) android.os.Looper.loop (Looper.java:214) android.app.ActivityThread.main (ActivityThread.java:7397) java.lang.reflect.Method.invoke (Method.java) com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:492) com.android.internal.os.ZygoteInit.main (ZygoteInit.java:935)