0

In my app I'm using exoplayer to play out DASH videostreams. The streams are DRM protected with WIDEVINE. My DashManifest has multiple keys. One key for SD and one key for HD stream. When I start the video on a FireTV I've getting this error:

xoPlayerImplInternal: Playback error. com.google.android.exoplayer2.ExoPlaybackException at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.shouldWaitForKeys(MediaCodecRenderer.java:896) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.feedInputBuffer(MediaCodecRenderer.java:783) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:606) at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:518) at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:301) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:135) at android.os.HandlerThread.run(HandlerThread.java:61) Caused by: com.google.android.exoplayer2.drm.DrmSession$DrmSessionException: android.media.MediaDrm$MediaDrmStateException: Failed to get key request: DRM vendor-defined error: -2998 at com.google.android.exoplayer2.drm.DefaultDrmSession.onError(DefaultDrmSession.java:422) at com.google.android.exoplayer2.drm.DefaultDrmSession.onKeysError(DefaultDrmSession.java:417) at com.google.android.exoplayer2.drm.DefaultDrmSession.postKeyRequest(DefaultDrmSession.java:368) at com.google.android.exoplayer2.drm.DefaultDrmSession.doLicense(DefaultDrmSession.java:300) at com.google.android.exoplayer2.drm.DefaultDrmSession.acquire(DefaultDrmSession.java:162) at com.google.android.exoplayer2.drm.DefaultDrmSessionManager.acquireSession(DefaultDrmSessionManager.java:558) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:935) at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:522) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:589) at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:518) at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:301) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:135) at android.os.HandlerThread.run(HandlerThread.java:61)

I'have no idea what is wrong with this device or my configuration. Can somebody explain me what Failed to get key request: DRM vendor-defined error: -2998 exactly mean?

dudi
  • 5,523
  • 4
  • 28
  • 57

1 Answers1

0

This error is generally associated with device specific errors, which unfortunately often require the device supplier to provide information and fixes.

This particular one has been reported in the Amazon forums also (maybe it is you or your colleagues's report also): https://forums.developer.amazon.com/questions/187540/error-by-requesting-drm-keys-1.html

You can see there that the problem even seems to be specific to a particular generation of the FireTV devices.

I think it might be useful for you to join and track that conversation as a device supplier will often prioritise problems that affect multiple people.

As an aside, the multiple key note may not be related to the problem at all, but there are some different interpretations of how this should be handled in ExoPlayer, and there is an open issue (at the time of writing) with multiple keys and offline playback which contains a very good overview (basically some implementations assume a DRM server will return all keys even if only one track is requested and this is not necessarily a correct assumption): https://github.com/google/ExoPlayer/issues/3872#issuecomment-367274776

Mick
  • 24,231
  • 1
  • 54
  • 120
  • Thank you for your answer. The question that you post was asking by me. As you can see I've never get a response from the very poor Amazon support. The other issue that you post me is a little bit different. I'm trying to get the DRM Keys for an online and not for a offline stream. The stacktracke is quiet different that my – dudi Feb 21 '19 at 12:53
  • I know that this error is very device specific, but I will understand what is happening here and why I'm getting this error on this device. – dudi Feb 21 '19 at 12:55
  • @dudi The issue happened when postKeyRequest to DRM plugin on the device. The DRM plugin has some issue to generate the payload for license request. Does the issue happened for choose HD content? Or for both SD and HD track? This could possible related with widevine usage rules and the device capability. – Jason Zong May 24 '21 at 14:19