a914-gowtham / android-video-trimmer-litr

LiTr version of android-video-trimmer. LiTr is a slow and lightweight video transcoder.
22 stars 5 forks source link

NullPointerException when I try to trim a video #2

Open qwaskhaled opened 3 years ago

qwaskhaled commented 3 years ago
Process: com.selfieyo2, PID: 2944
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.app.Dialog.isShowing()' on a null object reference
    at com.videotrimmer.library.ui.ActVideoTrimmer$2.onError(ActVideoTrimmer.java:607)
    at com.linkedin.android.litr.MarshallingTransformationListener$MarshallingHandler.handleMessage(MarshallingTransformationListener.java:160)
    at android.os.Handler.dispatchMessage(Handler.java:107)
    at android.os.Looper.loop(Looper.java:224)
    at android.app.ActivityThread.main(ActivityThread.java:7551)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:995)
qwaskhaled commented 3 years ago

Could you please check this issue?

a914-gowtham commented 3 years ago

Yes, Thanks for reporting. as per the error log dialog in null. but, that dialog can't be null! . can you share the reproduction steps.

qwaskhaled commented 3 years ago

I only press on the trim button

qwaskhaled commented 3 years ago

It seems like onStarted hasn't been called when I tried to use the debugger.

qwaskhaled commented 3 years ago

Here is the error that happened before trying to dismiss the dialog

com.linkedin.android.litr.exception.TrackTranscoderException: Failed to configure encoder codec.Media transformation failed for job id: f68f5daf-2269-4f7a-9524-051cd988819c Media format: {color-format=2130708361, i-frame-interval=5, durationUs=31589641, mime=video/avc, profile=8, width=576, bitrate=1978097, frame-rate=29, height=1024} Selected media codec info: Available media codec info list (Name, IsEncoder, Supported Types): MediaCodecInfo: OMX.MTK.AUDIO.DECODER.MP3,false,[audio/mpeg] MediaCodecInfo: c2.android.aac.decoder,false,[audio/mp4a-latm] MediaCodecInfo: OMX.google.aac.decoder,false,[audio/mp4a-latm] MediaCodecInfo: c2.android.aac.encoder,true,[audio/mp4a-latm] MediaCodecInfo: OMX.google.aac.encoder,true,[audio/mp4a-latm] MediaCodecInfo: c2.android.amrnb.decoder,false,[audio/3gpp] MediaCodecInfo: OMX.google.amrnb.decoder,false,[audio/3gpp] MediaCodecInfo: c2.android.amrnb.encoder,true,[audio/3gpp] MediaCodecInfo: OMX.google.amrnb.encoder,true,[audio/3gpp] MediaCodecInfo: c2.android.amrwb.decoder,false,[audio/amr-wb] MediaCodecInfo: OMX.google.amrwb.decoder,false,[audio/amr-wb] MediaCodecInfo: c2.android.amrwb.encoder,true,[audio/amr-wb] MediaCodecInfo: OMX.google.amrwb.encoder,true,[audio/amr-wb] MediaCodecInfo: c2.android.flac.decoder,false,[audio/flac] MediaCodecInfo: OMX.google.flac.decoder,false,[audio/flac] MediaCodecInfo: c2.android.flac.encoder,true,[audio/flac] MediaCodecInfo: OMX.google.flac.encoder,true,[audio/flac] MediaCodecInfo: c2.android.g711.alaw.decoder,false,[audio/g711-alaw] MediaCodecInfo: OMX.google.g711.alaw.decoder,false,[audio/g711-alaw] MediaCodecInfo: c2.android.g711.mlaw.decoder,false,[audio/g711-mlaw] MediaCodecInfo: OMX.google.g711.mlaw.decoder,false,[audio/g711-mlaw] MediaCodecInfo: c2.android.mp3.decoder,false,[audio/mpeg] MediaCodecInfo: OMX.google.mp3.decoder,false,[audio/mpeg] MediaCodecInfo: c2.android.opus.decoder,false,[audio/opus] MediaCodecInfo: OMX.google.opus.decoder,false,[audio/opus] MediaCodecInfo: c2.android.opus.encoder,true,[audio/opus] MediaCodecInfo: c2.android.raw.decoder,false,[audio/raw] MediaCodecInfo: OMX.google.raw.decoder,false,[audio/raw] MediaCodecInfo: c2.android.vorbis.decoder,false,[audio/vorbis] MediaCodecInfo: OMX.google.vorbis.decoder,false,[audio/vorbis] MediaCodecInfo: OMX.MTK.AUDIO.DECODER.ADPCM.MS,false,[audio/x-adpcm-ms] MediaCodecInfo: OMX.MTK.AUDIO.DECODER.ADPCM.DVI,false,[audio/x-adpcm-dvi-ima] MediaCodecInfo: OMX.MTK.AUDIO.DECODER.ALAC,false,[audio/alac] MediaCodecInfo: OMX.MTK.AUDIO.DECODER.APE,false,[audio/ape] MediaCodecInfo: OMX.MTK.AUDIO.DECODER.GSM,false,[audio/gsm] MediaCodecInfo: OMX.MTK.VIDEO.DECODER.AVC,false,[video/avc] MediaCodecInfo: OMX.MTK.VIDEO.DECODER.AVC.secure,false,[video/avc] MediaCodecInfo: OMX.MTK.VIDEO.DECODER.DIVX,false,[video/divx] MediaCodecInfo: OMX.MTK.VIDEO.DECODER.DIVX3,false,[video/divx3] MediaCodecInfo: OMX.MTK.VIDEO.DECODER.H263,false,[video/3gpp] MediaCodecInfo: OMX.MTK.VIDEO.DECODER.HEVC,false,[video/hevc] MediaCodecInfo: OMX.MTK.VIDEO.DECODER.MPEG2,false,[video/mpeg2] MediaCodecInfo: OMX.MTK.VIDEO.DECODER.MPEG4,false,[video/mp4v-es] MediaCodecInfo: OMX.MTK.VIDEO.DECODER.VPX,false,[video/x-vnd.on2.vp8] MediaCodecInfo: OMX.MTK.VIDEO.DECODER.VP9,false,[video/x-vnd.on2.vp9] MediaCodecInfo: OMX.MTK.VIDEO.DECODER.VC1,false,[video/x-ms-wmv] MediaCodecInfo: OMX.MTK.VIDEO.DECODER.XVID,false,[video/xvid] MediaCodecInfo: OMX.MTK.VIDEO.ENCODER.AVC,true,[video/avc] MediaCodecInfo: OMX.MTK.VIDEO.ENCODER.H263,true,[video/3gpp] MediaCodecInfo: OMX.MTK.VIDEO.ENCODER.HEVC,true,[video/hevc] MediaCodecInfo: OMX.MTK.VIDEO.ENCODER.MPEG4,true,[video/mp4v-es] MediaCodecInfo: c2.android.av1.decoder,false,[video/av01] MediaCodecInfo: c2.android.avc.decoder,false,[video/avc] MediaCodecInfo: OMX.google.h264.decoder,false,[video/avc] MediaCodecInfo: c2.android.avc.encoder,true,[video/avc] MediaCodecInfo: OMX.google.h264.encoder,true,[video/avc] MediaCodecInfo: c2.android.h263.decoder,false,[video/3gpp] MediaCodecInfo: OMX.google.h263.decoder,false,[video/3gpp] MediaCodecInfo: c2.android.h263.encoder,true,[video/3gpp] MediaCodecInfo: OMX.google.h263.encoder,true,[video/3gpp] MediaCodecInfo: c2.android.hevc.decoder,false,[video/hevc] MediaCodecInfo: OMX.google.hevc.decoder,false,[video/hevc] MediaCodecInfo: c2.android.mpeg4.decoder,false,[video/mp4v-es] MediaCodecInfo: OMX.google.mpeg4.decoder,false,[video/mp4v-es] MediaCodecInfo: c2.android.mpeg4.encoder,true,[video/mp4v-es] MediaCodecInfo: OMX.google.mpeg4.encoder,true,[video/mp4v-es] MediaCodecInfo: c2.android.vp8.decoder,false,[video/x-vnd.on2.vp8] MediaCodecInfo: OMX.google.vp8.decoder,false,[video/x-vnd.on2.vp8] MediaCodecInfo: c2.android.vp8.encoder,true,[video/x-vnd.on2.vp8] MediaCodecInfo: OMX.google.vp8.encoder,true,[video/x-vnd.on2.vp8] MediaCodecInfo: c2.android.vp9.decoder,false,[video/x-vnd.on2.vp9] MediaCodecInfo: OMX.google.vp9.decoder,false,[video/x-vnd.on2.vp9]Diagnostic info: android.media.MediaCodec.error_neg_2147479551

a914-gowtham commented 3 years ago

yeah, You're quite right. therefore onError method is directly being called. I never met this issue before. Can you share your device detail

qwaskhaled commented 3 years ago

it's Xiaomi note 8 pro - Android 10.0

a914-gowtham commented 3 years ago

Have u tried on any other devices?

qwaskhaled commented 3 years ago

I wish this issue can be fixed because this library is much smaller than the original one.

qwaskhaled commented 3 years ago

Have u tried on any other devices?

No, I haven't but I will try.

a914-gowtham commented 3 years ago

I wish this issue can be fixed because this library is much smaller than the original one.

I will fix it asap. This is litr demo app can you try to trim a video using this on your device and let me know whether it works or not.

qwaskhaled commented 3 years ago

I wish this issue can be fixed because this library is much smaller than the original one.

I will fix it asap. This is litr demo app can you try to trim a video using this on your device and let me know whether it works or not.

Ok, I will try it

vd1516 commented 3 years ago

This issue is only in mi device.

a914-gowtham commented 3 years ago

This issue is only in mi device.

Can you try this apk in your device. let me know it occurs in your device or not

vd1516 commented 3 years ago

This apk is show error : App not install

a914-gowtham commented 3 years ago

This apk is show error : App not install

That's ok. can you share device details. I can try reproduce it

vd1516 commented 3 years ago

On Sat, 10 Apr 2021 at 7:37 PM, Gowtham Balamurugan < @.***> wrote:

This apk is show error : App not install

That's ok. can you share device details. I can try reproduce it

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/a914-gowtham/android-video-trimmer-litr/issues/2#issuecomment-817142215, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQQNFNA4ELVTRVHEHXSQ6VTTIBLR7ANCNFSM4Y6CFCNQ .

MI A2 Version-android10 I am also test in samsaung A71 and version is android 11.it is nice work.

-- DHAMELIYA VRUSHABH