Comments (7)
Videouri might have been null.Can you share the error
log
from android-video-trimmer.
2020-09-21 18:35:00.225 11942-11942/com.dev.sporsightmobile D/uri: /storage/emulated/0/Pictures/SporSight/Recordings/VID_07_08_20_22_21_01.mp4
2020-09-21 18:35:00.240 11942-11942/com.dev.sporsightmobile I/ExoPlayerImpl: Release 323eb12 [ExoPlayerLib/2.11.8] [generic_x86, Android SDK built for x86, Google, 29] [goog.exo.core, goog.exo.ui]
2020-09-21 18:35:00.258 11942-12060/com.dev.sporsightmobile D/SurfaceUtils: disconnecting from surface 0xc9e33808, reason disconnectFromSurface
2020-09-21 18:35:00.284 11942-11942/com.dev.sporsightmobile W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@91ef464
2020-09-21 18:35:00.413 11942-11942/com.dev.sporsightmobile I/ExoPlayerImpl: Init 1b2b0b5 [ExoPlayerLib/2.11.8] [generic_x86, Android SDK built for x86, Google, 29]
2020-09-21 18:35:00.420 11942-11942/com.dev.sporsightmobile W/System.err: java.lang.NullPointerException: uriString
2020-09-21 18:35:00.420 11942-11942/com.dev.sporsightmobile W/System.err: at android.net.Uri$StringUri.(Uri.java:496)
2020-09-21 18:35:00.420 11942-11942/com.dev.sporsightmobile W/System.err: at android.net.Uri$StringUri.(Uri.java:486)
2020-09-21 18:35:00.420 11942-11942/com.dev.sporsightmobile W/System.err: at android.net.Uri.parse(Uri.java:458)
2020-09-21 18:35:00.420 11942-11942/com.dev.sporsightmobile W/System.err: at com.gowtham.library.ui.ActVideoTrimmer.setDataInView(ActVideoTrimmer.java:179)
2020-09-21 18:35:00.420 11942-11942/com.dev.sporsightmobile W/System.err: at com.gowtham.library.ui.ActVideoTrimmer.onPostCreate(ActVideoTrimmer.java:149)
2020-09-21 18:35:00.420 11942-11942/com.dev.sporsightmobile W/System.err: at android.app.Instrumentation.callActivityOnPostCreate(Instrumentation.java:1373)
2020-09-21 18:35:00.420 11942-11942/com.dev.sporsightmobile W/System.err: at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3321)
2020-09-21 18:35:00.420 11942-11942/com.dev.sporsightmobile W/System.err: at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
2020-09-21 18:35:00.420 11942-11942/com.dev.sporsightmobile W/System.err: at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
2020-09-21 18:35:00.421 11942-11942/com.dev.sporsightmobile W/System.err: at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
2020-09-21 18:35:00.421 11942-11942/com.dev.sporsightmobile W/System.err: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
2020-09-21 18:35:00.421 11942-11942/com.dev.sporsightmobile W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
2020-09-21 18:35:00.421 11942-11942/com.dev.sporsightmobile W/System.err: at android.os.Handler.dispatchMessage(Handler.java:107)
2020-09-21 18:35:00.421 11942-11942/com.dev.sporsightmobile W/System.err: at android.os.Looper.loop(Looper.java:214)
2020-09-21 18:35:00.421 11942-11942/com.dev.sporsightmobile W/System.err: at android.app.ActivityThread.main(ActivityThread.java:7356)
2020-09-21 18:35:00.421 11942-11942/com.dev.sporsightmobile W/System.err: at java.lang.reflect.Method.invoke(Native Method)
2020-09-21 18:35:00.421 11942-11942/com.dev.sporsightmobile W/System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
2020-09-21 18:35:00.421 11942-11942/com.dev.sporsightmobile W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
2020-09-21 18:35:00.478 11942-11999/com.dev.sporsightmobile D/EGL_emulation: eglMakeCurrent: 0xe181a780: ver 2 0 (tinfo 0xe180f900)
Looks like you're correct. The very first line is a log of the videouri.ToString() so I don't understand how it can be passing through as null
from android-video-trimmer.
Code for the above looks like this:
public void onClick(View v) {
Log.d("uri", mVideoUri.toString());
TrimVideo.activity(mVideoUri.toString())
// .setCompressOption(new CompressOption()) //empty constructor for default compress option
.setDestination("/storage/emulated/0/DCIM/TESTFOLDER")
.start(getActivity());
}
from android-video-trimmer.
I got you.Send Uri of the video instead of FilePath.like below
String selectedVideoUri="content://com.android.providers.media.documents/document/video%3A3120"
TrimVideo.activity(selectedVideoUri)
// .setCompressOption(new CompressOption()) //empty constructor for default compress option
.setDestination("/storage/emulated/0/DCIM/TESTFOLDER")
.start(getActivity());
from android-video-trimmer.
Thank you man that did the trick. One more question for you if you don't mind - how can i name the file what i want? I can set the directory but it's always named trimmed_video_0
from android-video-trimmer.
Sorry..I have not added that option yet.I will add for next release
from android-video-trimmer.
I see. Thank you very much, I look forward to that release!
from android-video-trimmer.
Related Issues (20)
- import com.gowtham.library.utils.TrimVideo HOT 1
- TrimVideo class is not found HOT 1
- Could not find com.crystal:crystalrangeseekbar:1.1.3. HOT 2
- Please add this trimmer as Separate entity, Make a copy of this trimmer without FFmpeg
- Getting this error after adding the dependenecy HOT 1
- problem with jniLibs and CMake; HOT 3
- Error after adding library
- Linking error when adding the library HOT 2
- app size is 45 MB HOT 1
- Crash on all android version HOT 2
- Fatal Exception: java.lang.IllegalArgumentException HOT 1
- HOW TO USE THIS LIB WITHOUT PICKING VIDEO FROM GALLERY HOT 2
- I am suresh, while I taken video from internalstorage video and start to edit but getting crash.please help me HOT 9
- Minor issue, facing error if video file name contains '?' or '#' HOT 1
- How do we set the output destination?
- android 13 cant trim video permission denied.WRITE_EXTERNAL_SORAGE -> READ_EXTERNAL_VIDEO HOT 7
- allow setDestination to Cache directory HOT 2
- protocol not found. "failed to trim" HOT 5
- Not able to see the video in Chrome web browser after trimming. HOT 5
- minify enabled app crashes HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-video-trimmer.