AbedElazizShe / LightCompressor

A powerful and easy-to-use video compression library for android uses MediaCodec API.
Apache License 2.0
537 stars 116 forks source link

Compression Video is not playing in android devices and web. #187

Open jayeshjoshi003 opened 10 months ago

jayeshjoshi003 commented 10 months ago

I have integrated the library in my project, selected video is compress successfully, but when I tried to play this video getting below error. In My project Exoplayer version is 2.11.8. Codec of my compress video is H.264

Screenshot 2024-01-08 at 6 41 04 PM

[OMX.google.aac.decoder] ERROR(0x80001001) signalError(omxError 0x80001001, internalError -2147483648) Codec reported err 0x80001001, actionCode 0, while in state 6 Renderer error: index=1, type=audio, format=Format(2, null, null, audio/mp4a-latm, null, -1, en, [-1, -1, -1.0], [2, 48000]), rendererSupport=YES com.google.android.exoplayer2.ExoPlaybackException: java.lang.IllegalStateException at com.google.android.exoplayer2.BaseRenderer.createRendererException(BaseRenderer.java:359) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:735) at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:599) at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:329) at android.os.Handler.dispatchMessage(Handler.java:103) at android.os.Looper.loop(Looper.java:224) at android.os.HandlerThread.run(HandlerThread.java:67) Caused by: java.lang.IllegalStateException at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method) at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:2789) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:1520) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:721) at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:599)  at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:329)  at android.os.Handler.dispatchMessage(Handler.java:103)  at android.os.Looper.loop(Looper.java:224)  at android.os.HandlerThread.run(HandlerThread.java:67) Disable failed.

Can you guide me what will be the issue?

kirtan48 commented 9 months ago

does the issue solved ,I am facing the same error ,When running the demo project its working fine but when i implemented the code in my app the video is not playing.

crsillerjp commented 6 months ago

Hello, getting similar error in Android, if I disable audio, the video compresses successfully and can be played but with audio enabled, the video does compress but attempting to play it results in: Renderer error: index=1, type=audio, format=Format(2, null, null, audio/mp4a-latm

williamleungapptask commented 2 months ago

Hello, getting similar error in Android, if I disable audio, the video compresses successfully and can be played but with audio enabled, the video does compress but attempting to play it results in: Renderer error: index=1, type=audio, format=Format(2, null, null, audio/mp4a-latm

I have similar findings regarding audio: https://github.com/AbedElazizShe/LightCompressor/issues/138