shaka-project / shaka-streamer

A simple config-file based approach to preparing streaming media, based on FFmpeg and Shaka Packager.
https://shaka-project.github.io/shaka-streamer/
Apache License 2.0
198 stars 62 forks source link

Shaka Player Demo Fails to Play Streams from Shaka-Streamer #134

Closed PanikParty closed 1 year ago

PanikParty commented 1 year ago

I deployed the shaka-streamer to a compute instance on GCP and configured both VOD and live pipelines to emit DASH to a public bucket. The clear content worked as expected, but playback of the WideVine protected content fails with "NO_LICENSE_SERVER_GIVEN".

The encryption settings for both pipelines are identical, and taken from the included examples, they read as follows: encryption:

  # Enables encryption.
  # If disabled, the following settings are ignored.
  enable: True
  # Content identifier that identifies which encryption key to use.
  # This will default to a random content ID, so this is optional.
  content_id: '1234'
  # Key server url.  An encryption key is generated from this server.
  key_server_url: https://license.uat.widevine.com/cenc/getcontentkey/widevine_test
  # The name of the signer.
  signer: widevine_test
  # AES signing key in hex string.
  signing_key: 1ae8ccd0e7985cc0b6203a55855a1034afc252980e970ca90e5202689f947ab9
  # AES signing iv in hex string.
  signing_iv: d58ce954203b7c9a9a9d467f59839249
  # Protection scheme (cenc or cbcs)
  # These are different methods of using a block cipher to encrypt media.
  protection_scheme: cenc
  # Seconds of unencrypted media at the beginning of the stream.
  clear_lead: 10

Does the player require an explicit declaration for the license server? If so, is it the same URL used as the keyserver URL in the pipeline config?

PanikParty commented 1 year ago

My apologies, looking at some of the previous posts, I understand that the player must be explicitly configured to use the UAT server. The following changes to the player application made all the difference.

const licenseServer = 'https://cwip-shaka-proxy.appspot.com/no_auth';

  player.configure({
    drm: {
      servers: {
        'com.widevine.alpha': licenseServer
      }
    }
  });

-- case closed