Closed Arekjaar4 closed 1 month ago
Facing Same issue
error.errorCode: 24003
error.errorException :
com.google.android.exoplayer2.t: MediaCodecVideoRenderer error, index=0, format=Format(1, null, null, video/avc, avc1.4D4029, -1, null, [1920, 1080, 25.0], [-1, -1]), format_supported=YES
I have solved it by combining this library with the react-native-vlc-media-player library as indicated in this article https://link.medium.com/CzEIBMG45wb
It looks like a codec issue...
On my side, I fixed similar issue by adding (but not 100% sure it is the same)
implementation "com.google.android.exoplayer:extension-ffmpeg:$exoplayerVersion"
in RNV build.gradle
If it doesn't work, you should try to reproduce the issue with a standalone exoplayer sample...
hi @freeboub I have this error: Could not find com.google.android.exoplayer:extension-ffmpeg:2.11.7
what version and repository do you use?
Please put 2.18.1 for the version
@freeboub same error: Could not find com.google.android.exoplayer:extension-ffmpeg:2.18.1
Same error like Arekjaar4
Same, is someone find how to fix it?
Facing Same issue error.errorCode:
24003
error.errorException :com.google.android.exoplayer2.t: MediaCodecVideoRenderer error, index=0, format=Format(1, null, null, video/avc, avc1.4D4029, -1, null, [1920, 1080, 25.0], [-1, -1]), format_supported=YES
same issue any solution
Facing Same issue error.errorCode: 24003. Any soilution
I am facing the issue. I have a vertical video-playing app. Tapping on a video opens a new page where the user can see that video vertically. But sometimes some videos are not playing and show only a black screen. When I log the error it is telling
{"error":{"errorStackTrace":"com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(0, null, null, video/avc, avc1.4D4020, 4077348, null, [608, 1080, 60.0], [-1, -1]), format_supported=YES\n\tat com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:566)\n\tat android.os.Handler.dispatchMessage(Handler.java:102)\n\tat android.os.Looper.loopOnce(Looper.java:233)\n\tat android.os.Looper.loop(Looper.java:344)\n\tat android.os.HandlerThread.run(HandlerThread.java:67)\nCaused by: com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: OMX.qcom.video.decoder.avc, Format(0, null, null, video/avc, avc1.4D4020, 4077348, null, [608, 1080, 60.0], [-1, -1])\n\tat com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodecWithFallback(MediaCodecRenderer.java:1030)\n\tat com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodecOrBypass(MediaCodecRenderer.java:546)\n\tat com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:1450)\n\tat com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:877)\n\tat com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.readSourceOmittingSampleData(MediaCodecRenderer.java:963)\n\tat com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:779)\n\tat com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:989)\n\tat com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:490)\n\t... 4 more\nCaused by: android.media.MediaCodec$CodecException: Failed to initialize OMX.qcom.video.decoder.avc, error 0xfffffff4\n\tat android.media.MediaCodec.native_setup(Native Method)\n\tat android.media.MediaCodec.
We faced the same problem, and realized that the callback function onAttachedWindow
in ReactExoplayerView.java was being called multiple times, and then calling initializePlayer(). In order to fix that, we replaced the callback with:
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
if(player == null){
initializePlayer();
}
}
Maybe this is not the best solution, but it worked for us.
I also faced the same issue. I was able to resolve it by modifying onAttachedToWindow
in ReactExpplayerView.java like a the comment mentioned by @facugu1998, and it started working correctly.
I believe this fix is both straightforward and critical.
This issue should be retested with 6.0.0-RC.0 or 6.0.0-RC.2 (coming really soon). can you please check of this is still reproduced ?
Bug
Platform
Which player are you experiencing the problem on: Android
Environment info
React native info output:
Library version: "react-native-video": "^6.0.0-alpha.3"
Steps To Reproduce
These three videos cause me problems when playing them with react-native-video. The links I attach only last 12 hours due to their content.
The one and two are visible but not audible, and selecting an audio track causes the following error:
{ "error": Object { "errorCode": "24001", "errorException": "com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(1, null, null, video/x-unknown, null, -1, und, [720, 304, -1.0], [-1, -1]), format_supported=NO_UNSUPPORTED_TYPE", "errorStackTrace": "com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(1, null, null, video/x-unknown, null, -1, und, [720, 304, -1.0], [-1, -1]), format_supported=NO_UNSUPPORTED_TYPE at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:566) at android.os.Handler.dispatchMessage(Handler.java:108) at android.os.Looper.loop(Looper.java:216) at android.os.HandlerThread.run(HandlerThread.java:65) Caused by: com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: [-49999], Format(1, null, null, video/x-unknown, null, -1, und, [720, 304, -1.0], [-1, -1]) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodecWithFallback(MediaCodecRenderer.java:996) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodecOrBypass(MediaCodecRenderer.java:546) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:1450) at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:877) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.readSourceOmittingSampleData(MediaCodecRenderer.java:963) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:779) at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:989) at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:490) ... 3 more ", "errorString": "ExoPlaybackException: ERROR_CODE_DECODER_INIT_FAILED", }, }
The 3 is heard but not seen and when you select a video track, the following error occurs:
{ "error": Object { "errorCode": "24001", "errorException": "com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(1, null, null, video/x-unknown, null, -1, und, [720, 304, -1.0], [-1, -1]), format_supported=NO_UNSUPPORTED_TYPE", "errorStackTrace": "com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(1, null, null, video/x-unknown, null, -1, und, [720, 304, -1.0], [-1, -1]), format_supported=NO_UNSUPPORTED_TYPE at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:566) at android.os.Handler.dispatchMessage(Handler.java:108) at android.os.Looper.loop(Looper.java:216) at android.os.HandlerThread.run(HandlerThread.java:65) Caused by: com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: [-49999], Format(1, null, null, video/x-unknown, null, -1, und, [720, 304, -1.0], [-1, -1]) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodecWithFallback(MediaCodecRenderer.java:996) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodecOrBypass(MediaCodecRenderer.java:546) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:1450) at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:877) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.readSourceOmittingSampleData(MediaCodecRenderer.java:963) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:779) at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:989) at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:490) ... 3 more ", "errorString": "ExoPlaybackException: ERROR_CODE_DECODER_INIT_FAILED", }, }
Reproducible sample code