ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

Scrambled video when playing Dash widevine content on x86 device

Open Arnesen opened this issue 11 years ago • 20 comments

We have an app running streaming video DASH with widevine DRM. Works perfectly on most devices. However, on a Zenfone 5 we are having issues. Audio plays fine, but video is scrambled. These patterns differ widely.

img_20150819_125530 (Picture of screen because I cannot take screenshots of secure content)

The only error message I am seeing is this: [OMX.Intel.VideoDecoder.AVC.secure] storeMetaDataInBuffers failed w/ err -2147483648

How can I move forward in debugging this issue? Are these behaviours any indication of what the problem could be?

Arnesen avatar Aug 19 '15 11:08 Arnesen

Does this issue affect the Widevine demo content in the demo app? I suggest you file an issue with ASUS if so.

ojw28 avatar Aug 19 '15 11:08 ojw28

Have not tested that in a while. Will try it out. Found out chromecasting the same content to a Nexus Player does not work either. These are both x86 devices. Maybe same cause? Will work on debugging the nexus player as well.

Arnesen avatar Aug 19 '15 11:08 Arnesen

Chromecasting as in screen mirroring from the device, or proper casting (i.e. Nexus Player is streaming the content and fetching the licenses directly)? If the latter, that suggests to me that there's a content issue. A whole bunch of popular apps do proper casting of Widevine protected content to Nexus Player without issue.

ojw28 avatar Aug 19 '15 11:08 ojw28

Nexus Player is streaming the content and fetching the licenses directly. I agree, most likely a content issue. I am not sure where to go from here with debugging the problem though. Any good ideas?

Arnesen avatar Aug 19 '15 11:08 Arnesen

When debugging the Nexus Player while chromecasting, I found further evidence to support this being a content issue: https://gist.github.com/Arnesen/9b972dd59c1611cefbb9 [3021:3021:ERROR:media_codec_bridge.cc(652)] Invalid AAC header

Arnesen avatar Aug 19 '15 12:08 Arnesen

I tested the demo app and content, same issue. Youtube DASH works, all Widevine GTS DASH samples exhibit same behaviour and scrambled content.

Arnesen avatar Aug 19 '15 13:08 Arnesen

Related to https://github.com/google/ExoPlayer/issues/612 ???

indieboyalex avatar Aug 20 '15 12:08 indieboyalex

It could be!

Arnesen avatar Aug 21 '15 08:08 Arnesen

I've also been hit by this same issue on the Asus zenfone 2, Tesco Hudl2 and Lenovo Yoga 2 with a DASH Modular encrypted stream.

I've been able to force the content to play by overriding the codec selection in MediaCodecUtil. Replacing OMX.Intel.VideoDecoder.AVC.secure and OMX.Intel.hw_vd.h264.secure with their non secure counter parts OMX.Intel.VideoDecoder.AVC & OMX.Intel.hw_vd.h264, this magically allows the stream to play correctly.

This is not something I would be comfortable with shipping, hopefully @ojw28 can shed some light as to why this works and maybe the difference between secure and non secure decoders?

Here is the incredibly crude gist

A few notes about the Lenovo in case it helps anyone else :

  • The device doesn't propagate its AVC codec to the MediaCodecList but it can be used by passing the name.
  • Suffers the same scrambled line problem using Widevine Classic on a h264 stream since android 5.0

ouchadam avatar Jan 25 '16 15:01 ouchadam

@ouchadam could you please post the full solution about that, an example could be great, I don't know if it will fix our player, I don't know if we could do that to remove the "secure" ... but we could test it.

thanks on advice.

jfcogato avatar Feb 26 '16 14:02 jfcogato

I am also experiencing this issue on all x86 devices.

Was wondering if anyone had made some progress with this?

casajavi avatar Mar 11 '16 14:03 casajavi

In my case, the codec switch hack worked because the stream had a L3 security level which means the video is allowed to be decrypted with unsecure buffers. Most devices (all the devices I tested on) will default to using their secure decoders if they're available, even if they're not required.

This seems to be bug with the intel secure decoders

ouchadam avatar Mar 14 '16 12:03 ouchadam

Following up with Asus contact offline.

Also, can a ADB bugreport be provided? Thanks,

wvpaf avatar May 24 '16 22:05 wvpaf

@wvpaf any update on this?

lukaszkalnik avatar Sep 07 '16 08:09 lukaszkalnik

Also, one of our customers noticed a DRM-related problem on a Lenovo Lifetab P10356 (Intel Atom device). The video starts playing (the stream seems to be displayed correctly, without scrambling), but then playback stops right away.

Stream is also DASH with Widevine.

Can anyone please take care of this issue, it seems to be appearing on different Intel devices. This is really a showstopper for some of the users.

Thank you!

lukaszkalnik avatar Sep 13 '16 10:09 lukaszkalnik

Hi, has this issue been reproduced where an ADB Bugreport can be captured? With any of the investigative data it is difficult to troubleshoot.

If the Lifetab stops after 10secs the device may not be getting a valid license request.

wvpaf avatar Sep 13 '16 20:09 wvpaf

I think the playback stops sooner than that. Unfortunately I don't have access to any Intel device right now. Do you happen to have any available to test? Are there Intel devices on which DASH with Widevine works correctly?

lukaszkalnik avatar Sep 14 '16 10:09 lukaszkalnik

All,

I have ran many tests on Intel devices over the past while, and have reached the following conclusions :

1.)Many Intel devices are not compatible with version 3 of the Common Encryption spec - this specifies a partial encryption of the NAL unit

2.)A few Intel devices are not compatible with content that uses a 'clear-lead' - i.e can't handle it when clear content becomes scrambled in the context of a single streaming session.

By deploying CENC v2 (only NAL header is left in clear) content without using a clear lead, I have resolved these issues, and I don't require forcing using an non-secure codec.

I can't provide a definitive list of devices affected here, so I suggest you try out these recommendations are report results here...

ghost avatar Sep 17 '16 07:09 ghost

Is this still an open issue or can we close?

wvpaf avatar Oct 25 '16 22:10 wvpaf

No problem closing this now, at least in relation to my issues.

Arnesen avatar Dec 07 '16 09:12 Arnesen