[BUG] ExoPlaybackException for HEVC media

Server Version#: 1.41.5.9522 (on Windows)
Player Version#: 10.27.1.2743 (967879537)

Player with the problem is a Fire HD 8 (2020, 10th Gen) (KFONWI).
No issues with other players (Shield, Chrome on Windows, iPad (10th generation), Roku, etc).

Downloading content (with low quality setting so its transcoded) or streaming on same network as server, fails to play with the dreaded “An Error Occurred While Attempting To Play This Video. Please Check Your Connection And Try Again”
Issue has been present for months, so its not related to the recent server-side HEVC encoding options.

debug output from android player on the amazon fire tablet shows exoplayer crashing:

03-23 22:35:40.976  i: [FFmpegExtractor] Container: Container[mpegts] No Title - 0 kbps, -54 seconds [CT: 0us, ST: 10000000us, SRT: -9223372036854775808us]..
03-23 22:35:40.978  i: [FFmpegExtractor] Track found: VideoStream[0-hevc] 1920x1034 [SAR 1:1, DAR 1920:1034]. H.265 / HEVC (High Efficiency Video Coding) - Unknown Profile (video/hevc), ~-388 kbps -54 seconds 23.98fps, No Title / Unknown (null), 0 bytes, ..
03-23 22:35:40.989  i: [FFmpegExtractor] Track found: AudioStream[1-aac] 0 channels over 0 (null), 48000 Hz, 0,0 padding. AAC (Advanced Audio Coding) - Unknown Profile (audio/mp4a-latm), 388 kbps -54 seconds 0.00fps, No Title / Unknown (null), 1 / 2 bytes, ..
03-23 22:35:40.990  i: [LoadControl] Assumed Bitrate: 400000, Segment Count: -18661
03-23 22:35:40.990  i: [LoadControl] Setting buffer size to 16 MB / 0 seconds.
03-23 22:35:40.993  i: [ExoPlayer][EventLogger] videoEnabled [eventTime=9.26, mediaPos=0.00, window=0, period=0]
03-23 22:35:41.002  i: [ExoPlayer][EventLogger] audioEnabled [eventTime=9.26, mediaPos=0.00, window=0, period=0]
03-23 22:35:41.007  i: [ExoPlayer][EventLogger] tracks [eventTime=9.26, mediaPos=0.00, window=0, period=0
03-23 22:35:41.008  i: [ExoPlayer][EventLogger]   group [
03-23 22:35:41.008  i: [ExoPlayer][EventLogger]     [X] Track:0, id=0, mimeType=video/hevc, bitrate=13618000, codecs=hevc, res=1920x1034, fps=23.976025, supported=YES
03-23 22:35:41.013  i: [ExoPlayer][EventLogger]   ]
03-23 22:35:41.016  i: [ExoPlayer][EventLogger]   group [
03-23 22:35:41.017  i: [ExoPlayer][EventLogger]     [X] Track:0, id=1, mimeType=audio/mp4a-latm, codecs=aac, channels=0, sample_rate=48000, language=unknown, selectionFlags=[default,forced], supported=YES
03-23 22:35:41.018  i: [ExoPlayer][EventLogger]   ]
03-23 22:35:41.020  i: [ExoPlayer][EventLogger]   Metadata [
03-23 22:35:41.020  i: [ExoPlayer][EventLogger]     original_init_data: (Value: 0 Buffer: 102 bytes)
03-23 22:35:41.022  i: [ExoPlayer][EventLogger]     scantype_progressive: (Value: 1 Buffer: 0 bytes)
03-23 22:35:41.023  i: [ExoPlayer][EventLogger]     HlsTrackMetadataEntry
03-23 22:35:41.023  i: [ExoPlayer][EventLogger]   ]
03-23 22:35:41.025  i: [ExoPlayer][EventLogger] ]
03-23 22:35:41.026  i: [Player][ExoPlayer] Track information has been changed.
03-23 22:35:41.028  i: [Player][ExoPlayer] Setting track selection for content.
03-23 22:35:41.029  i: [Player][ExoPlayer] Setting initial track selection...
03-23 22:35:41.031  i: [TrackSelectorHelper] Initialising (Video: 1, Audio: 1, Text: 0)
03-23 22:35:41.032  i: [TrackSelectorHelper] Type: 2 Auto
03-23 22:35:41.032  i: [TrackSelectorHelper] Type: 1 Auto
03-23 22:35:41.033  i: [TrackSelectorHelper] Type: 2 Auto
03-23 22:35:41.034  i: [TrackSelectorHelper] Type: 1 Auto
03-23 22:35:41.034  i: [TrackSelectorHelper] Type: 2 Auto
03-23 22:35:41.035  i: [TrackSelectorHelper] Type: 3 Disabled
03-23 22:35:41.039  i: [TrackSelectorHelper] Type: 1 Auto
03-23 22:35:41.040  i: [TrackSelectorHelper] Type: 2 Auto
03-23 22:35:41.040  i: [TrackSelectorHelper] Type: 3 Disabled
03-23 22:35:41.042  i: [TrackSelectorHelper] Type: 1 Auto
03-23 22:35:41.043  i: [TrackSelectorHelper] Type: 2 Auto
03-23 22:35:41.043  i: [TrackSelectorHelper] Type: 3 Disabled
03-23 22:35:41.044  i: [TrackSelectorHelper] Type: 1 Auto
03-23 22:35:41.044  i: [TrackSelectorHelper] Type: 2 Auto
03-23 22:35:41.044  i: [TrackSelectorHelper] Type: 3 Disabled
03-23 22:35:41.045  i: [MediaCodecVideoSyncRenderer] Decoder initialised, after 0 attempts.
03-23 22:35:41.047  i: [ExoPlayer][EventLogger] videoDecoderInitialized [eventTime=9.31, mediaPos=0.00, window=0, period=0, OMX.MTK.VIDEO.DECODER.HEVC]
03-23 22:35:41.047  i: [ExoPlayer][EventLogger] videoInputFormat [eventTime=9.31, mediaPos=0.00, window=0, period=0, id=0, mimeType=video/hevc, bitrate=13618000, codecs=hevc, res=1920x1034, fps=23.976025]
03-23 22:35:41.113  i: [ExoPlayer][EventLogger] audioDecoderInitialized [eventTime=9.40, mediaPos=0.00, window=0, period=0, OMX.google.aac.decoder]
03-23 22:35:41.119  i: [ExoPlayer][EventLogger] audioInputFormat [eventTime=9.41, mediaPos=0.00, window=0, period=0, id=1, mimeType=audio/mp4a-latm, codecs=aac, channels=0, sample_rate=48000, language=unknown, selectionFlags=[default,forced]]
03-23 22:35:41.125  i: [TranscodeSession] Updating session status
03-23 22:35:41.129  i: [TranscodeSession] Direct Play
03-23 22:35:41.136  e: [ExoPlayer][MediaCodecVideoRenderer] Video codec error
  java.lang.IllegalStateException
      at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)
      at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:2717)
      at androidx.media3.exoplayer.mediacodec.SynchronousMediaCodecAdapter.dequeueOutputBufferIndex(SourceFile:4)
      at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.drainOutputBuffer(SourceFile:43)
      at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(SourceFile:72)
      at androidx.media3.exoplayer.video.MediaCodecVideoRenderer.render(SourceFile:1)
      at nj.q.render(SourceFile:1)
      at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(SourceFile:96)
      at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(SourceFile:246)
      at android.os.Handler.dispatchMessage(Handler.java:102)
      at android.os.Looper.loop(Looper.java:211)
      at android.os.HandlerThread.run(HandlerThread.java:65)

03-23 22:35:41.151  e: [ExoPlayer][ExoPlayerImplInternal] Playback error
  androidx.media3.exoplayer.ExoPlaybackException: MediaCodecVideoRenderer error, index=1, format=Format(0, null, null, video/hevc, hevc, 13618000, null, [1920, 1034, 23.976025, null], [-1, -1]), format_supported=YES
      at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(SourceFile:377)
      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: androidx.media3.exoplayer.video.MediaCodecVideoDecoderException: Decoder failed: OMX.MTK.VIDEO.DECODER.HEVC
      at androidx.media3.exoplayer.video.MediaCodecVideoRenderer.createDecoderException(SourceFile:4)
      at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(SourceFile:155)
      at androidx.media3.exoplayer.video.MediaCodecVideoRenderer.render(SourceFile:1)
      at nj.q.render(SourceFile:1)
      at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(SourceFile:96)
      at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(SourceFile:246)
      ... 3 more
  Caused by: java.lang.IllegalStateException
      at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)
      at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:2717)
      at androidx.media3.exoplayer.mediacodec.SynchronousMediaCodecAdapter.dequeueOutputBufferIndex(SourceFile:4)
      at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.drainOutputBuffer(SourceFile:43)
      at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(SourceFile:72)
      ... 7 more

03-23 22:35:41.154  e: [ExoPlayer][ExoPlayerImplInternal] Disable failed.
  java.lang.IllegalStateException
      at android.media.MediaCodec.native_flush(Native Method)
      at android.media.MediaCodec.flush(MediaCodec.java:2150)
      at androidx.media3.exoplayer.mediacodec.SynchronousMediaCodecAdapter.flush(SourceFile:2)
      at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.flushCodec(SourceFile:2)
      at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.flushOrReleaseCodec(SourceFile:67)
      at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.onDisabled(SourceFile:12)
      at androidx.media3.exoplayer.video.MediaCodecVideoRenderer.onDisabled(SourceFile:12)
      at androidx.media3.exoplayer.BaseRenderer.disable(SourceFile:25)
      at androidx.media3.exoplayer.ExoPlayerImplInternal.disableRenderer(SourceFile:14)
      at androidx.media3.exoplayer.ExoPlayerImplInternal.resetInternal(SourceFile:36)
      at androidx.media3.exoplayer.ExoPlayerImplInternal.stopInternal(SourceFile:13)
      at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(SourceFile:488)
      at android.os.Handler.dispatchMessage(Handler.java:102)
      at android.os.Looper.loop(Looper.java:211)
      at android.os.HandlerThread.run(HandlerThread.java:65)

03-23 22:35:41.155  i: [ExoPlayer][EventLogger] videoDisabled [eventTime=9.45, mediaPos=4.00, window=0, period=0]
03-23 22:35:41.156  i: [ExoPlayer][EventLogger] videoSize [eventTime=9.45, mediaPos=4.00, window=0, period=0, 0, 0]
03-23 22:35:41.156  w: [Player][ExoPlayer] Video size changed to something undefined: 0/0
03-23 22:35:41.168  i: [ExoPlayer][EventLogger] audioDisabled [eventTime=9.46, mediaPos=4.00, window=0, period=0]
03-23 22:35:41.198  i: [FFmpegExtractor] Interrupting extractor for release.
03-23 22:35:41.198  i: [FFmpeg] [INFO] [FFmpegExtractor] Closing demuxer context.
03-23 22:35:41.199  i: [FFmpegExtractor] Extractor has been released.
03-23 22:35:41.200  i: [FFmpeg] [INFO] [FFmpegExtractor] Source has been closed successfully.
03-23 22:35:41.200  i: [LoadControl] Setting buffer size to 51.19 MB / 0 seconds.
03-23 22:35:41.202  i: [ExoPlayer][EventLogger] timeline [eventTime=9.50, mediaPos=4.00, window=0, period=0, periodCount=1, windowCount=1, reason=SOURCE_UPDATE
03-23 22:35:41.203  i: [ExoPlayer][EventLogger]   period [5663.00]
03-23 22:35:41.204  i: [ExoPlayer][EventLogger]   window [5663.00, seekable=true, dynamic=false]
03-23 22:35:41.204  i: [ExoPlayer][EventLogger] ]

The source media (according to MPC-HC):

General
Complete name                  : videoname.mp4
Format                         : MPEG-4
Format profile                 : Base Media
Codec ID                       : isom (isom/iso2/mp41)
File size                      : 1.58 GiB
Duration                       : 1 h 34 min
Overall bit rate               : 2 390 kb/s
Frame rate                     : 23.976 FPS
Writing application            : Lavf60.6.100

Video
ID                             : 1
Format                         : HEVC
Format/Info                    : High Efficiency Video Coding
Format profile                 : Main 10@L4@Main
Codec ID                       : hev1
Codec ID/Info                  : High Efficiency Video Coding
Duration                       : 1 h 34 min
Bit rate                       : 2 000 kb/s
Width                          : 1 920 pixels
Height                         : 1 034 pixels
Display aspect ratio           : 1.85:1
Frame rate mode                : Constant
Frame rate                     : 23.976 (24000/1001) FPS
Color space                    : YUV
Chroma subsampling             : 4:2:0 (Type 2)
Bit depth                      : 10 bits
Scan type                      : Progressive
Bits/(Pixel*Frame)             : 0.042
Stream size                    : 1.32 GiB (84%)
Writing library                : x265 3.5+1-f0c1022b6:[Linux][GCC 9.4.0][64 bit] 10bit
Encoding settings              : cpuid=1111039 / frame-threads=3 / numa-pools=12 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=1920x1034 / interlace=0 / total-frames=0 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=4 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-eob / no-eos / no-hrd / info / hash=0 / temporal-layers=0 / open-gop / min-keyint=23 / keyint=250 / gop-lookahead=0 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=25 / lookahead-slices=4 / scenecut=40 / no-hist-scenecut / radl=0 / no-splice / no-intra-refresh / ctu=64 / min-cu-size=8 / rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=2 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=3 / limit-refs=3 / limit-modes / me=3 / subme=3 / merange=57 / temporal-mvp / no-frame-dup / no-hme / weightp / no-weightb / no-analyze-src-pics / deblock=0:0 / sao / no-sao-non-deblock / rd=4 / selective-sao=4 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=1.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=abr / bitrate=2000 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=2 / cplxblur=20.0 / qblur=0.5 / ipratio=1.40 / pbratio=1.30 / aq-mode=2 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=1 / transfer=1 / colormatrix=1 / chromaloc=1 / chromaloc-top=2 / chromaloc-bottom=2 / display-window=0 / cll=0,0 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / no-hdr10 / no-hdr10-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=0 / analysis-save-reuse-level=0 / analysis-load-reuse-level=0 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=1 / refine-ctu-distortion=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-analysis-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei / no-hevc-aq / no-svt / no-field / qp-adaptation-range=1.00 / scenecut-aware-qp=0conformance-window-offsets / right=0 / bottom=0 / decoder-max-rate=0 / no-vbv-live-multi-pass / no-mcstf / no-sbrc
Color range                    : Limited
Color primaries                : BT.709
Transfer characteristics       : BT.709
Matrix coefficients            : BT.709
Menus                          : 0
Codec configuration box        : hvcC

Audio
ID                             : 2
Format                         : AAC LC
Format/Info                    : Advanced Audio Codec Low Complexity
Codec ID                       : mp4a-40-2
Duration                       : 1 h 34 min
Source duration                : 1 h 34 min
Source_Duration_LastFrame      : -11 ms
Bit rate mode                  : Constant
Bit rate                       : 384 kb/s
Channel(s)                     : 6 channels
Channel layout                 : C L R Ls Rs LFE
Sampling rate                  : 48.0 kHz
Frame rate                     : 46.875 FPS (1024 SPF)
Compression mode               : Lossy
Stream size                    : 259 MiB (16%)
Source stream size             : 259 MiB (16%)
Default                        : Yes
Alternate group                : 1
Menus                          : 0

Menu

Researching seems like others have has this problems for years, unresolved.

1 Like

7 day bump

weekly bump

Got the same issues on a Samsung Galaxy Tab A7.
Files that worked Direct Play / Direct Stream without issues (HEVC 10 bit, 0 b-frames, AAC 2 ch audio, 128k) do no longer play.

Instead i get greeted with “MediaCodecVideoRenderer error, index=0, format=(0, null, null, video/hevc, hevc, 3786000, null, [1280,720,29.976, null], [-1, -1]), format_supported=YES”

if i disable direct play & stream, and disable Plex HEVC experiment, thus force x264 encoding, videos play, but that reduces the video quality by a large margin even with quicksync on quality.

weekly bump

weekly bump

I had this happen to me too when the app updated for me this week. After trying a lot of things I was able to narrow it down to being an issue with Plex on my specific phone, not a PMS issue. After I tried a lot of things on my phone I was able to fix it by going into the app settings on my phone, going to Plex, Storage, and hitting Clear Data (I recommend clearing the cache too but that alone does not fix it.) You’ll need to log back in and redownload any videos you had on your phone but it fixed it for me.

Interesting. You might be onto something with the app reset…

Amazon store version of Plex still is 10.27.1.2743.
Cleared cache and data, along with logging into the app again. Downloaded a x265 movie which played without any issue offline (disabled wifi). Need to test a few more to confirm its really a resolution.

Not a solution.

Downloaded 4x movies, 3 x265 and 1 x264 (using 720p quality).
1 of 3 x265 will play.
1 of 1 x264 will play.

weekly bump

Have you tried redownloading the file? I’ve seen issues where after db changes occur in PMS, downloads doesn’t work right.

Also, what Fire OS is your device? It’s possible there is a bug in Amazon’s version of exoplayer.

Yes.
last week, cleared cache and data for the plex app, re-signed in, and re-downloaded many movies. Didn’t solve the issue.

Fire HD 8 KFONWI , latest is Fire OS 7 per Identifying Fire Tablet Devices | Fire Tablets
Tablet is running Fire OS 7.3.3.1

Believe its wider issue, as family friends have a old samsung tablet (don’t have exact model #) also exhibiting same symptoms.

Wouldn’t be the same issue since there isn’t downloads on a tv. The only thing i see is that on your original log excerpt you provided, it showed the audio as having 0 channels. If that’s what the player is trying to play, that can cause the issues you are seeing. I would check if the original files that don’t play when downloaded have a common audio format.

Attention to detail is lacking …

Samsung TABLET, not a TV.
There ARE audio channels present by the media output in the 2nd log output of the content.
That specific video plays without issue on ALL other plex devices, just the Amazon tablet is the outlier.

Monthly bump, as problem still exists.
Plex version is now 10.29.0.135.

bump, still a problem

still not fixed. really disappointing.

Server Version#: 1.42.2.10156 (on Windows)
Player Version#: 10.30.5.4094