a914-gowtham / android-video-trimmer

Helps to trim local videos with compress option on Android applications using Exoplayer 2 and FFmpeg.
Other
362 stars 115 forks source link

I am suresh, while I taken video from internalstorage video and start to edit but getting crash.please help me #91

Closed sureshkumarknila closed 9 months ago

sureshkumarknila commented 1 year ago

2022-10-11 11:43:55.651 7483-8246/com.nchant.user E/AndroidRuntime: FATAL EXCEPTION: pool-18-thread-1 Process: com.nchant.user, PID: 7483 java.lang.NullPointerException: Attempt to invoke interface method 'int android.database.Cursor.getColumnIndexOrThrow(java.lang.String)' on a null object reference at com.gowtham.library.utils.FileUtils.getRealPath(FileUtils.java:26) at com.gowtham.library.ui.ActVideoTrimmer.lambda$setDataInView$4$ActVideoTrimmer(ActVideoTrimmer.java:218) at com.gowtham.library.ui.-$$Lambda$ActVideoTrimmer$oSNiy720JmS9xLvkSHcIMIc37rE.run(Unknown Source:2) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:919)

a914-gowtham commented 1 year ago

Could you send the file uri of the video? which you pass here TrimVideo.activity(String.valueOf(videoUri))

a914-gowtham commented 1 year ago

@sureshkumarknila does it happen only for videos from internal storage?

sureshkumarknila commented 1 year ago

Could you send the file uri of the video? which you pass here TrimVideo.activity(String.valueOf(videoUri))

Uri-file:///storage/emulated/0/WhatsApp/Media/WhatsApp%20Video/VID-20221006-WA0027.mp4

sureshkumarknila commented 1 year ago

Could you send the file uri of the video? which you pass here TrimVideo.activity(String.valueOf(videoUri)) I tried another way below Uri content://com.nchant.user.provider/images/Video/VID-20221006-WA0027.mp4

sureshkumarknila commented 1 year ago

@sureshkumarknila does it happen only for videos from internal storage?

No both internal and sd card

a914-gowtham commented 1 year ago

@sureshkumarknila thanks. Could you share the device detail as well?

sureshkumarknila commented 1 year ago

@sureshkumarknila thanks. Could you share the device detail as well? Motrolo one power android 10

sureshkumarknila commented 1 year ago

@a914-gowtham bro any update?

a914-gowtham commented 9 months ago

@sureshkumarknila hey getting file path from uri is not used anymore, so this should be fixed