1
votes

I have been trying to play encrypted .WEBM media files in ShakaPlayer without much success and I am here to seek advise from anybody who had been through this. It would be great if somebody in this awesome developer community can guide me here.

Round 1 - What I tried (Encoded & Dashed):

  • Encoded .MP4 file to multiple-streams Video .WEBM (VP9) & single-stream Audio .WEBM (Vorbis) files using FFMPEG.
  • Created DASH MANIFEST.MPD file with WEBM_TOOLS/WEBM_DASH_MANIFEST

Outcome: I am able to play this in Shaka Player without any issues.

Round 2 - What I tried (Encoded, Encrypted & Dashed):

  • Encoded .MP4 file to multiple-streams Video .WEBM (VP9) & single-stream Audio .WEBM (Vorbis) files using FFMPEG.

  • Encrypted generated .WEBM files with WEBM_TOOLS/WEBM_CRYPT

  • Created DASH MANIFEST.MPD file with WEBM_TOOLS/WEBM_DASH_MANIFEST

Outcome: I don't know how should I play this content in Shaka Player. Where and how should I provide the .key file generated in step 2 above to Shaka Player. I would like to use Clearkeys with CENC on browser. I don't want to encode to multi-stream .MP4, but only .WEBM.

Thanks so much!

1

1 Answers

1
votes

If you just want to test the content then you can configure the clear keys directly in the Shaka player itself. From their documentation at https://github.com/google/shaka-player/blob/master/docs/tutorials/drm-config.md:

player.configure({
  drm: {
    clearKeys: {
      'deadbeefdeadbeefdeadbeefdeadbeef': '18675309186753091867530918675309',
      '02030507011013017019023029031037': '03050701302303204201080425098033'
    }
  }
});

If you want to have the player request the keys from a key server, which is like a typical DRM interaction, then you need to have a license server (key server) that you request the key from. You'd don't really need to do this if all you want to do it make sure that you are packaging and encrypting the content correctly - the local clearkey config above will probably do fine for you.