google / ExoPlayer

This project is deprecated and stale. The latest ExoPlayer code is available in https://github.com/androidx/media
https://developer.android.com/media/media3/exoplayer
Apache License 2.0
21.74k stars 6.03k forks source link

Direct-Play Crashing on Fire TV Stick 4K Max #11222

Closed caesarvis closed 1 year ago

caesarvis commented 1 year ago

Bug

I have several Fire Sticks. The one having the recurring issue is a "Fire TV Stick 4K Max". When playing some movies, it will randomly fail doing direct-play, fall back to transcoding and will usually only play for about a second and then crash completely. It will repeatedly do this in the same parts of the movie. I tried the same part of the same movie on a "Fire TV Stick 4K" and it direct-plays with absolutely no problem. Below is a snippet of the log file from when it happens.

06-21 12:00:11.459 e: [ExoPlayer][MediaCodecVideoRenderer] Video codec error java.lang.IllegalStateException at android.media.MediaCodec.releaseOutputBuffer(Native Method) at android.media.MediaCodec.releaseOutputBuffer(MediaCodec.java:2804) at y3.x.releaseOutputBuffer(SourceFile:2) at com.google.android.exoplayer2.video.i.R0(SourceFile:7) at com.google.android.exoplayer2.video.i.Z(SourceFile:336) at y3.o.drainOutputBuffer(SourceFile:279) at y3.o.render(SourceFile:70) at qh.q.render(SourceFile:1) at com.google.android.exoplayer2.w1.n(SourceFile:97) at com.google.android.exoplayer2.w1.handleMessage(SourceFile:220) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:211) at android.os.HandlerThread.run(HandlerThread.java:65)

06-21 12:00:11.468 e: [ExoPlayer][ExoPlayerImplInternal] Playback error com.google.android.exoplayer2.q: MediaCodecVideoRenderer error, index=1, format=Format(0, null, null, video/avc, h264, 998869, null, [1280, 688, 23.976025], [-1, -1]), format_supported=YES at com.google.android.exoplayer2.w1.handleMessage(SourceFile:362) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:211) at android.os.HandlerThread.run(HandlerThread.java:65) Caused by: com.google.android.exoplayer2.video.h: Decoder failed: OMX.MTK.VIDEO.DECODER.AVC at com.google.android.exoplayer2.video.i.m(Unknown Source:4) at y3.o.render(SourceFile:154) at qh.q.render(SourceFile:1) at com.google.android.exoplayer2.w1.n(SourceFile:97) at com.google.android.exoplayer2.w1.handleMessage(SourceFile:220) ... 3 more Caused by: java.lang.IllegalStateException at android.media.MediaCodec.releaseOutputBuffer(Native Method) at android.media.MediaCodec.releaseOutputBuffer(MediaCodec.java:2804) at y3.x.releaseOutputBuffer(SourceFile:2) at com.google.android.exoplayer2.video.i.R0(SourceFile:7) at com.google.android.exoplayer2.video.i.Z(SourceFile:336) at y3.o.drainOutputBuffer(SourceFile:279) at y3.o.render(SourceFile:70) ... 6 more

06-21 12:00:11.472 e: [ExoPlayer][ExoPlayerImplInternal] Disable failed. java.lang.IllegalStateException at android.media.MediaCodec.native_flush(Native Method) at android.media.MediaCodec.flush(MediaCodec.java:2131) at y3.x.flush(Unknown Source:2) at y3.o.s(SourceFile:2) at y3.o.u(SourceFile:67) at y3.o.onDisabled(SourceFile:16) at com.google.android.exoplayer2.video.i.onDisabled(SourceFile:12) at com.google.android.exoplayer2.f.disable(SourceFile:25) at com.google.android.exoplayer2.w1.m(SourceFile:14) at com.google.android.exoplayer2.w1.o0(SourceFile:36) at com.google.android.exoplayer2.w1.d1(SourceFile:13) at com.google.android.exoplayer2.w1.handleMessage(SourceFile:404) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:211) at android.os.HandlerThread.run(HandlerThread.java:65)

06-21 12:00:11.513 i: [ExoPlayer][EventLogger] videoDisabled [eventTime=11.54, mediaPos=1849.09, window=0, period=0] 06-21 12:00:11.513 i: [ExoPlayer][EventLogger] audioDisabled [eventTime=11.54, mediaPos=1849.09, window=0, period=0] 06-21 12:00:11.552 i: [LoadControl] Setting buffer size to 57.56 MB / 0 seconds. 06-21 12:00:11.557 i: [FFmpegExtractor] Interrupting extractor for release. 06-21 12:00:11.559 i: [FFmpeg] [INFO] [FFmpegExtractor] Closing demuxer context. 06-21 12:00:11.560 i: [FFmpeg] [INFO] [CacheSource] Close requested, terminating. 06-21 12:00:11.560 i: [FFmpeg] [INFO] [CacheSource] Thread has been terminated. 06-21 12:00:11.560 i: [FFmpeg] [INFO] [CacheSource] Terminating thread. 06-21 12:00:11.561 i: [FFmpeg] [INFO] [FFmpegExtractor] Source has been closed successfully. 06-21 12:00:11.561 i: [FFmpeg] [INFO] [CacheSource] Closed successfully. 06-21 12:00:11.561 i: [FFmpegExtractor] Extractor has been released. 06-21 12:00:11.567 e: [ExoPlayer][EventLogger] playerFailed [eventTime=11.58, mediaPos=1849.09, window=0, period=0, errorCode=ERROR_CODE_DECODING_FAILED com.google.android.exoplayer2.q: MediaCodecVideoRenderer error, index=1, format=Format(0, null, null, video/avc, h264, 998869, null, [1280, 688, 23.976025], [-1, -1]), format_supported=YES at com.google.android.exoplayer2.w1.handleMessage(SourceFile:362) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:211) at android.os.HandlerThread.run(HandlerThread.java:65) Caused by: com.google.android.exoplayer2.video.h: Decoder failed: OMX.MTK.VIDEO.DECODER.AVC at com.google.android.exoplayer2.video.i.m(Unknown Source:4) at y3.o.render(SourceFile:154) at qh.q.render(SourceFile:1) at com.google.android.exoplayer2.w1.n(SourceFile:97) at com.google.android.exoplayer2.w1.handleMessage(SourceFile:220) ... 3 more Caused by: java.lang.IllegalStateException at android.media.MediaCodec.releaseOutputBuffer(Native Method) at android.media.MediaCodec.releaseOutputBuffer(MediaCodec.java:2804) at y3.x.releaseOutputBuffer(SourceFile:2) at com.google.android.exoplayer2.video.i.R0(SourceFile:7) at com.google.android.exoplayer2.video.i.Z(SourceFile:336) at y3.o.drainOutputBuffer(SourceFile:279) at y3.o.render(SourceFile:70) ... 6 more ] 06-21 12:00:11.568 e: [Player][ExoPlayer] Playback error detected 06-21 12:00:11.570 i: [Player][Timeline] Handling player error 06-21 12:00:11.572 i: [Player][Timeline] Playback stopped (error: true) 06-21 12:00:11.573 e: An exception occurred: com.google.android.exoplayer2.q: MediaCodecVideoRenderer error, index=1, format=Format(0, null, null, video/avc, h264, 998869, null, [1280, 688, 23.976025], [-1, -1]), format_supported=YES 06-21 12:00:11.573 e: Stacktrace: com.google.android.exoplayer2.q: MediaCodecVideoRenderer error, index=1, format=Format(0, null, null, video/avc, h264, 998869, null, [1280, 688, 23.976025], [-1, -1]), format_supported=YES at com.google.android.exoplayer2.w1.handleMessage(SourceFile:362) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:211) at android.os.HandlerThread.run(HandlerThread.java:65) Caused by: com.google.android.exoplayer2.video.h: Decoder failed: OMX.MTK.VIDEO.DECODER.AVC at com.google.android.exoplayer2.video.i.m(Unknown Source:4) at y3.o.render(SourceFile:154) at qh.q.render(SourceFile:1) at com.google.android.exoplayer2.w1.n(SourceFile:97) at com.google.android.exoplayer2.w1.handleMessage(SourceFile:220) ... 3 more Caused by: java.lang.IllegalStateException at android.media.MediaCodec.releaseOutputBuffer(Native Method) at android.media.MediaCodec.releaseOutputBuffer(MediaCodec.java:2804) at y3.x.releaseOutputBuffer(SourceFile:2) at com.google.android.exoplayer2.video.i.R0(SourceFile:7) at com.google.android.exoplayer2.video.i.Z(SourceFile:336) at y3.o.drainOutputBuffer(SourceFile:279) at y3.o.render(SourceFile:70) ... 6 more

marcbaechinger commented 1 year ago

This looks like a codec failure of that given device. As you say it seems to work on other devices.

Best would be to talk to Amazon of course as this ideally would be fixed on the device OS that is built with AOSP but isn't really Android.

Can you let me know what direct-play, is? What specific player setup do you mean when you say direct-play?

caesarvis commented 1 year ago

Sorry, "Direct Play" is a Plex thing where it uses ExoPlayer but streams the video as it exists on the storage, without altering, transcoding, etc.

The issue I'm having is completely identical to the issue several people mention in Issue #10285.

On Thu, Jun 22, 2023 at 3:35 AM Marc Baechinger @.***> wrote:

This looks like a codec failure of that given device. As you say it seems to work on other devices.

Best would be to talk to Amazon of course as this ideally would be fixed on the device OS that is built with AOSP but isn't really Android.

Can you let me know what direct-play, is? What specific player setup do you mean when you say direct-play?

— Reply to this email directly, view it on GitHub https://github.com/google/ExoPlayer/issues/11222#issuecomment-1602237935, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAXWYF6RP7X65OJSEWGXSW3XMP7T5ANCNFSM6AAAAAAZPC3S6I . You are receiving this because you authored the thread.Message ID: @.***>

-- Thank you, Cory Sarvis

abshankr commented 1 year ago

Hi @caesarvis, since you are facing this issue on an Amazon device, can you create an issue in our repo giving detailed steps to reproduce the issue: https://github.com/amzn/exoplayer-amazon-port/issues We will be able to help debug this issue further.

Mohammad3638363 commented 1 year ago

Thanks f or solving the problem

marcbaechinger commented 1 year ago

I'm closing this at it seems to be fixed on that device. Thanks all!