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.71k stars 6.02k forks source link

Crypto key not available occurs when playing Widevine DASH on a specific device #7356

Closed ogawa-ma closed 4 years ago

ogawa-ma commented 4 years ago

Searched documentation and issues

・ExoPlayer Javadoc ・ExoPlayerの問題

Question

CryptoException occurs when playing Widevine DASH on Android OS8. Why does it happen?

com.google.android.exoplayer2.ExoPlaybackException: android.media.MediaCodec$CryptoException: Crypto key not available
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.feedInputBuffer(MediaCodecRenderer.java:1126)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:658)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:575)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:326)
        at android.os.Handler.dispatchMessage(Handler.java:101)
        at android.os.Looper.loop(Looper.java:251)
        at android.os.HandlerThread.run(HandlerThread.java:65)
     Caused by: android.media.MediaCodec$CryptoException: Crypto key not available
        at android.media.MediaCodec.native_queueSecureInputBuffer(Native Method)
        at android.media.MediaCodec.queueSecureInputBuffer(MediaCodec.java:2547)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.feedInputBuffer(MediaCodecRenderer.java:1117)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:658) 
        at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:575) 
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:326) 
        at android.os.Handler.dispatchMessage(Handler.java:101) 
        at android.os.Looper.loop(Looper.java:251) 
        at android.os.HandlerThread.run(HandlerThread.java:65) 

使用されているExoPlayerのバージョン:2.10.6

発生したデバイス情報 デバイス名:Xperia XZ モデル番号:SOV34 Androidバージョン:8.0.0

A full bug report captured from the device

I have sent the bugreport to dev.exoplayer@gmail.com.

Link to test content

I have sent the media file URL and the license server URL to dev.exoplayer@gmail.com.

krocard commented 4 years ago

@AquilesCanta Can you help understand why the crypto key is not available?

AquilesCanta commented 4 years ago

Hi, is this still an issue? Is it possible that it was fixed server-side?

I was just now able to correctly play the stream locally.

ogawa-ma commented 4 years ago

@AquilesCanta Hello, I haven't made any server-side fixes. ExoPlaybackException occurs when trying to play in Xperia XZ(OS:8.0.0) still confirmed. Did you find out from the bug report why the crypto key is not available? Also, if you do not know the cause, is there any information that can be provided from here for cause investigation?

AquilesCanta commented 4 years ago

I didn't have any issues to play on a pixel 3a, using the demo app.

ogawa-ma commented 4 years ago

@AquilesCanta

Can you please confirm whether this is a device-specific issue?

This occurs only on this device.

Are you able to play the stream on any other device?

You can play it normally on other devices(Pixel3,Pixel4).

Are there any special reproduction steps I should be aware of?

There is no special way to play it. Just need to play on the Xperia XZ(OS:8.0.0) to reproduce this phenomenon.

AquilesCanta commented 4 years ago

In that case, I doubt this is an ExoPlayer issue. I think one of two things may be going on:

I've just noticed there's no bugreport attached to the e-mail you sent. I don't think i'll be able to find much in it, but you are welcome to try sending one.

ogawa-ma commented 4 years ago

@AquilesCanta I'm sorry. I forgot to attach a bug report. I have now sent a bug report to dev.exoplayer@gmail.com.

rrfrias commented 4 years ago

@ogawa-ma We would like to get Sony involved. Do i have your permission to share the bugreport and repro steps that you mentioned in the email with Sony? Also the license expiration date is 2020-06-18. Is it possible to extend it or share different content so that we/Sony can repro?

google-oss-bot commented 4 years ago

Hey @ogawa-ma. We need more information to resolve this issue but there hasn't been an update in 14 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot commented 4 years ago

Since there haven't been any recent updates here, I am going to close this issue.

@ogawa-ma if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.