linkedin / LiTr

Lightweight hardware accelerated video/audio transcoder for Android.
BSD 2-Clause "Simplified" License
613 stars 85 forks source link

Getting these types of crash in realme devices library version - 1.4.14 #125

Open Hbworld opened 3 years ago

Hbworld commented 3 years ago

Failed to configure encoder codec.Media transformation failed for job id: bbf356c9-8075-432a-be93-e7e0cb213119 Media format: {color-format=2130708361, i-frame-interval=5, durationUs=14953000, mime=video/avc, profile=8, width=720, bitrate=7128789, frame-rate=30, height=1280} Diagnostic info: android.media.MediaCodec.error_neg_2147479551 at g.d.a.a.n.c.c(SourceFile:11) at g.d.a.a.g.e.b(SourceFile:3) at g.d.a.a.m.e.(SourceFile:12) at g.d.a.a.d.d(SourceFile:50) at g.d.a.a.d.run(SourceFile:1) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458) at java.util.concurrent.FutureTask.run(FutureTask.java:266) 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:764) Caused by: android.media.MediaCodec$CodecException: Error 0x80001001 at android.media.MediaCodec.native_configure(Native Method) at android.media.MediaCodec.configure(MediaCodec.java:1960) at android.media.MediaCodec.configure(MediaCodec.java:1889) at g.d.a.a.n.c.e(SourceFile:7) at g.d.a.a.n.c.c(SourceFile:7) ... 9 more at com.linkedin.android.litr.MarshallingTransformationListener$MarshallingHandler.handleMessage(MarshallingTransformationListener.java:160) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:211) at android.app.ActivityThread.main(ActivityThread.java:7234) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:503) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:887)

Caused by g.d.a.a.h.e: Failed to configure encoder codec. at com.linkedin.android.litr.utils.CodecUtils.getAndConfigureCodec(CodecUtils.java:220) at com.linkedin.android.litr.codec.MediaCodecEncoder.init(MediaCodecEncoder.java:57) at com.linkedin.android.litr.transcoder.VideoTrackTranscoder.initCodecs(VideoTrackTranscoder.java:74) at com.linkedin.android.litr.transcoder.VideoTrackTranscoder.(VideoTrackTranscoder.java:64) at com.linkedin.android.litr.transcoder.TrackTranscoderFactory.create(TrackTranscoderFactory.java:78) at com.linkedin.android.litr.TransformationJob.createTrackTranscoders(TransformationJob.java:175) at com.linkedin.android.litr.TransformationJob.transform(TransformationJob.java:97) at com.linkedin.android.litr.TransformationJob.run(TransformationJob.java:77) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458) at java.util.concurrent.FutureTask.run(FutureTask.java:266) 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:764)

Caused by android.media.MediaCodec$CodecException: Error 0x80001001 at android.media.MediaCodec.native_configure(MediaCodec.java) at android.media.MediaCodec.configure(MediaCodec.java:1960) at android.media.MediaCodec.configure(MediaCodec.java:1889) at com.linkedin.android.litr.utils.CodecUtils.configureMediaFormat(CodecUtils.java:318) at com.linkedin.android.litr.utils.CodecUtils.getAndConfigureCodecByType(CodecUtils.java:242) at com.linkedin.android.litr.utils.CodecUtils.getAndConfigureCodec(CodecUtils.java:208) at com.linkedin.android.litr.codec.MediaCodecEncoder.init(MediaCodecEncoder.java:57) at com.linkedin.android.litr.transcoder.VideoTrackTranscoder.initCodecs(VideoTrackTranscoder.java:74) at com.linkedin.android.litr.transcoder.VideoTrackTranscoder.(VideoTrackTranscoder.java:64) at com.linkedin.android.litr.transcoder.TrackTranscoderFactory.create(TrackTranscoderFactory.java:78) at com.linkedin.android.litr.TransformationJob.createTrackTranscoders(TransformationJob.java:175) at com.linkedin.android.litr.TransformationJob.transform(TransformationJob.java:97) at com.linkedin.android.litr.TransformationJob.run(TransformationJob.java:77) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458) at java.util.concurrent.FutureTask.run(FutureTask.java:266) 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:764)

izzytwosheds commented 3 years ago

Looks like an exception was thrown when MediaCodec tried to configure a codec. This usually happens when it doesn't like how MediaFormat is setup (missing parameters, unsupported resolution, etc.) Which device is this happening on? What is MediaFormat that you are using?