Dash-Industry-Forum / dash.js

A reference client implementation for the playback of MPEG DASH via Javascript and compliant browsers.
http://reference.dashif.org/dash.js/nightly/samples/dash-if-reference-player/index.html
Other
5.13k stars 1.68k forks source link

ClearKey DRM not working in DASH #4029

Closed techterbium closed 1 year ago

techterbium commented 2 years ago
Environment
Steps to reproduce
  1. Please provide clear steps to reproduce your problem
  2. If the bug is intermittent, give a rough frequency if possible
Observed behavior

When trying to play clearkey encrypted DASH file, I am seeing the error in console as below.

Here is the mpd file.

<?xml version="1.0" ?>
<MPD mediaPresentationDuration="PT2M59.760S" minBufferTime="PT2.00S" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" xmlns="urn:mpeg:dash:schema:mpd:2011">
  <!-- Created with Bento4 mp4-dash.py, VERSION=2.0.0-637 -->
  <Period>
    <!-- Video -->
    <AdaptationSet maxHeight="360" maxWidth="640" mimeType="video/mp4" segmentAlignment="true" startWithSAP="1">
      <SegmentTemplate initialization="$RepresentationID$/init.mp4" media="$RepresentationID$/seg-$Number$.m4s" startNumber="1" timescale="10000000">
        <SegmentTimeline>
          <S d="24000000"/>
          <S d="13200000"/>
          <S d="14000000"/>
          <S d="24000000" r="1"/>
          <S d="14400000"/>
          <S d="24000000"/>
          <S d="17200000"/>
          <S d="24000000" r="1"/>
          <S d="26000000"/>
          <S d="23600000"/>
          <S d="24000000" r="1"/>
          <S d="17200000"/>
          <S d="11200000"/>
          <S d="23200000"/>
          <S d="24000000"/>
          <S d="19200000"/>
          <S d="26000000"/>
          <S d="24000000"/>
          <S d="4000000"/>
          <S d="24000000"/>
          <S d="26000000"/>
          <S d="24000000" r="1"/>
          <S d="3200000"/>
          <S d="24000000"/>
          <S d="20000000"/>
          <S d="24000000" r="1"/>
          <S d="19600000"/>
          <S d="24000000"/>
          <S d="8400000"/>
          <S d="24000000" r="1"/>
          <S d="6400000"/>
          <S d="24000000"/>
          <S d="27200000"/>
          <S d="24000000" r="1"/>
          <S d="6400000"/>
          <S d="24000000"/>
          <S d="16400000"/>
          <S d="24000000" r="1"/>
          <S d="28400000"/>
          <S d="27200000"/>
          <S d="20800000"/>
          <S d="24000000"/>
          <S d="18400000"/>
          <S d="24000000"/>
          <S d="15200000"/>
          <S d="24000000"/>
          <S d="20400000"/>
          <S d="21200000"/>
          <S d="24000000"/>
          <S d="28800000"/>
          <S d="24000000"/>
          <S d="26400000"/>
          <S d="24000000"/>
          <S d="29600000"/>
          <S d="24000000"/>
          <S d="3200000"/>
          <S d="24000000" r="1"/>
          <S d="27200000"/>
          <S d="24000000"/>
          <S d="3200000"/>
          <S d="24000000"/>
          <S d="27200000"/>
          <S d="24000000" r="1"/>
          <S d="22000000"/>
          <S d="24000000"/>
          <S d="30000000"/>
          <S d="24000000"/>
          <S d="29600000"/>
          <S d="17600000"/>
          <S d="10400000"/>
          <S d="24000000"/>
          <S d="26400000"/>
          <S d="24000000"/>
          <S d="13600000"/>
        </SegmentTimeline>
      </SegmentTemplate>
      <Representation bandwidth="618619" codecs="avc1.42C01E" frameRate="25" height="360" id="video/avc1" scanType="progressive" width="640"/>
    </AdaptationSet>
    <!-- Audio -->
    <AdaptationSet mimeType="audio/mp4" segmentAlignment="true" startWithSAP="1">
      <SegmentTemplate initialization="$RepresentationID$/init.mp4" media="$RepresentationID$/seg-$Number$.m4s" startNumber="1" timescale="10000000">
        <SegmentTimeline>
          <S d="19969161" r="2"/>
          <S d="20201361"/>
          <S d="19969161" r="6"/>
          <S d="20201360"/>
          <S d="19969161" r="5"/>
          <S d="20201361"/>
          <S d="19969161" r="6"/>
          <S d="20201360"/>
          <S d="19969161" r="5"/>
          <S d="20201361"/>
          <S d="19969161" r="6"/>
          <S d="20201360"/>
          <S d="19969161" r="5"/>
          <S d="20201361"/>
          <S d="19969161" r="6"/>
          <S d="20201360"/>
          <S d="19969161" r="6"/>
          <S d="20201361"/>
          <S d="19969161" r="5"/>
          <S d="20201360"/>
          <S d="19969161" r="6"/>
          <S d="20201361"/>
          <S d="19969161" r="5"/>
          <S d="20201360"/>
          <S d="19969161" r="1"/>
          <S d="18575964"/>
        </SegmentTimeline>
      </SegmentTemplate>
      <Representation audioSamplingRate="44100" bandwidth="100775" codecs="mp4a.40.2" id="audio/und/mp4a">
        <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
      </Representation>
    </AdaptationSet>
  </Period>
</MPD>
Console output
dash.all.debug.js:18001 [80][ProtectionKeyController] Failed to retrieve clearkeys from ProtectionData 
dash.all.debug.js:18001 [80][Stream] DRM: No license server URL specified! 
dash.all.debug.js:18001 [80][ProtectionKeyController] Failed to retrieve clearkeys from ProtectionData 
dash.all.debug.js:18001 [80][Stream] DRM: No license server URL specified! 
Expected behavior

Video to play successfully.

YannickFuereder commented 2 years ago

can you share how you set the Encryption keys in code

dsilhavy commented 1 year ago

Closing due to inactivity