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

Exoplayer doesn't play Widevine HLS (no errors, no callbacks, only black screen) #6134

Closed tipoc123 closed 5 years ago

tipoc123 commented 5 years ago

[REQUIRED] Issue description

Exoplayer doesn't play Widevine HLS content (Axinom DRM). It shows only a black screen.

There are no errors in logcat. None of drm callbacks (onDrmSessionAcquired, onDrmSessionManagerError, onDrmKeysRestored, onDrmKeysRemoved, onDrmKeysLoaded, onDrmSessionReleased) are called (only onLoadStarted and onLoadCompleted).

The same content as Widevine DASH works fine.

[REQUIRED] Reproduction steps

Play content protected by Axinom DRM.

[REQUIRED] Link to test content

Sorry, no publicly available link, only playlists (mpd and m3u8 files): playlists.zip

[REQUIRED] A full bug report captured from the device

bugreport.txt

[REQUIRED] Version of ExoPlayer being used

2.10.0

[REQUIRED] Device(s) and version(s) of Android being used

Android 6.0.1 STB GIEC MP1113 (chip Amlogic s905x)

tipoc123 commented 5 years ago

I can send you mp4 files if you need it.

tonihei commented 5 years ago

It sounds as if the key requests are not working for the Axinom servers for some reason. There are currently no callback events telling you that. This is tracked by #5399 and may be the reason why you don't see any events related to that.

If you can provide us with a working example (you can send it to dev.exoplayer@gmail.com), we can take a look and verify if that's the issue. Otherwise, you can also try to debug it yourself by checking which DrmSession calls are actually being made.

tipoc123 commented 5 years ago

I've logged invokes of executeKeyRequest and executeProvisionRequest (methods in HttpMediaDrmCallback). 1) Widevine DASH - there are executeKeyRequest calls 2) Widevine HLS - there are NO executeKeyRequest calls

What else should I log?

tonihei commented 5 years ago

Looking at the provided HLS playlist, it seems to me that is does not contain any #EXT-X-KEY tag to define the initialization vector. You need to add this to support encryption.

tipoc123 commented 5 years ago

You can see #EXT-X-KEY in stream_0.m3u8 and stream_1.m3u8 files.

tonihei commented 5 years ago

Sorry, you're right. I was looking at the wrong place.

Could that be related to the issue in #6130? If the initialization segments don't load, the player will never reach the point where it tries to make the key requests.

tipoc123 commented 5 years ago

Sorry, you're right. I was looking at the wrong place.

Could that be related to the issue in #6130? If the initialization segments don't load, the player will never reach the point where it tries to make the key requests.

No, we've already resolved that issue :)

tonihei commented 5 years ago

Is it at all possible to get a publicly accessible example? There could be many issues which are difficult to see without actually stepping through the code ourselves.

tipoc123 commented 5 years ago

Is it at all possible to get a publicly accessible example? There could be many issues which are difficult to see without actually stepping through the code ourselves.

I've sent you an email.

tonihei commented 5 years ago

I managed to play both the provided DASH and HLS streams without any issues. In both cases I used the same drm configuration as discusses in the email thread. Given that it works fine in the ExoPlayer demo app, it's probably an app issue of some sort.

tipoc123 commented 5 years ago

OK. I'll try again later and give you an answer.

tipoc123 commented 5 years ago

Now it's working. The problem was in our playlist.