Encrypted playback differs between ClearKey and Widevine |
|
Issue descriptionAs part of the W3C EME tests, one of the test files (video_512x288_h264-360k_enc_2keys_2sess.mp4) has the video content encrypted using 2 different keys. The key alternates every 10 frames (which is not what is expected -- the test expects the first 1/2 encoded with key1, and the second half with key2). Attempting to play the video using the test [1] produces different results depending on whether ClearKey or Widevine is used. ClearKey - EME set up, provides key1. - Video starts, displays a few frames, and freezes. Audio continues. - After ~3 seconds, video element gets a 'stalled' event, which triggers the code to provide key2. - Video resumes playing. Widevine - EME set up, provides key1. - Video does not display anything. WebKit allows the audio and video to get out of sync by up to 3 seconds [2]. This would explain the behavior for ClearKey. Regardless whether ClearKey or Widevine is used, what happens for the test should be the same. [1] https://github.com/mwatson2/web-platform-tests [2] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp?l=1697
,
Sep 10 2016
Using External Clear Key with the drm-mp4-playback-temporary-multikey-sequential.html test fails due to "No supported PSSH box found", which is not surprising since the content doesn't have 'pssh' boxes for Common Encryption. After tweaking the config (to pass 'keyids', just like the Clear Key version), and updating the message handler in drm-messagehandler.js (there is no license server to call, so just return the 'keyids' like the Clear Key version), the test runs the same as Clear Key. Using the Clear Key version (clearkey-mp4-playback-temporary-multikey-sequential.html) with External Clear Key works the same as Clear Key. Looking at the logs from chrome://media-internals, the delay talking to the license server may contribute to this. Will continue to investigate.
,
Sep 10 2016
Interesting, that is not what I would have expected. (I thought the difference might be in the PPAPI path.) The delay is one additional difference. You could try delaying the Clear Key key "license" for a few seconds.
,
Sep 12 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/21b0da050a97c275677ce0d15c143086fc3c0107 commit 21b0da050a97c275677ce0d15c143086fc3c0107 Author: jrummell <jrummell@chromium.org> Date: Mon Sep 12 22:27:59 2016 media: Update logging to display the missing keyId When playing encrypted media and playing stalls due to being unable to decrypt the data, include the keyId missing in the logging output (that includes chrome://media-internals). BUG=645304 TEST=checked chrome://media-internals Review-Url: https://codereview.chromium.org/2318933008 Cr-Commit-Position: refs/heads/master@{#418079} [modify] https://crrev.com/21b0da050a97c275677ce0d15c143086fc3c0107/media/filters/decrypting_audio_decoder.cc [modify] https://crrev.com/21b0da050a97c275677ce0d15c143086fc3c0107/media/filters/decrypting_demuxer_stream.cc [modify] https://crrev.com/21b0da050a97c275677ce0d15c143086fc3c0107/media/filters/decrypting_video_decoder.cc
,
Sep 14 2016
With additional logging, both External Clear Key and Widevine return the first 10 frames before returning status = kNoKey. However, ECK returns status = kSuccess with the first 10 frames, while WV returns status = kNeedMoreData. As a result, the frames returned by WV are never displayed (and thus the video never starts, and no 'stalled' event is raised later).
,
Sep 17 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e30a8fab234b1c9fa644f2053bd080620315536d commit e30a8fab234b1c9fa644f2053bd080620315536d Author: jrummell <jrummell@chromium.org> Date: Sat Sep 17 02:43:32 2016 media: Update logging to indicate that new key has been provided When playing encrypted media and decrypting stalls due to missing key, add a message to indicate when a key is added and decryption tries to start again. BUG=645304 TEST=checked chrome://media-internals Review-Url: https://codereview.chromium.org/2334953002 Cr-Commit-Position: refs/heads/master@{#419365} [modify] https://crrev.com/e30a8fab234b1c9fa644f2053bd080620315536d/media/filters/decrypting_audio_decoder.cc [modify] https://crrev.com/e30a8fab234b1c9fa644f2053bd080620315536d/media/filters/decrypting_demuxer_stream.cc [modify] https://crrev.com/e30a8fab234b1c9fa644f2053bd080620315536d/media/filters/decrypting_video_decoder.cc |
|
►
Sign in to add a comment |
|
Comment 1 by ddorwin@chromium.org
, Sep 9 2016