DASH + Widevine get the default_KID present on the manifest

See original GitHub issue

Hi we’re using ExoPlayer to play MPEG-DASH content protected with Widevine DRM.

Everything is working great, but now as a new requisite we have to send the default_KID that is present on the content manifest to the Widevine License Server.

Is there a away to get this value when executeKeyRequest is called?

Here is the part of one of the manifesst:

<?xml version="1.0" encoding="UTF-8"?>
<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns="urn:mpeg:dash:schema:mpd:2011"
     xmlns:xlink="http://www.w3.org/1999/xlink"
     xmlns:cenc="urn:mpeg:cenc:2013"
     xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd"
     profiles="urn:mpeg:dash:profile:isoff-live:2011"
     type="static"
     publishTime="2016-03-15T16:25:30Z" 
     mediaPresentationDuration="PT1H54M34.112S"
     minBufferTime="PT1.5S">
<ProgramInformation>
    <Title>media/Vods/LM-2921648/Main/2921648_SD_H.smil</Title>
</ProgramInformation>
<Period id="0" start="PT0.0S">
    <AdaptationSet id="0" mimeType="video/mp4" maxWidth="720" maxHeight="400" frameRate="25" segmentAlignment="true" startWithSAP="1" subsegmentAlignment="true" subsegmentStartsWithSAP="1">
        <ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="701a9f48-5fc4-467f-b4a9-d417d97b5be1"/>
        <ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed" value="Widevine">
            <cenc:pssh>AAAAMnBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAABISEHAan0hfxEZ/tKnUF9l7W+E=</cenc:pssh>
        </ContentProtection>
        <SegmentTemplate presentationTimeOffset="0" timescale="90000" media="chunk_ctvideo_cfm4s_rid$RepresentationID$_cs$Time$_mpd.m4s" initialization="chunk_ctvideo_cfm4s_rid$RepresentationID$_cinit_mpd.m4s">
            <SegmentTimeline>
                <S t="0" d="900000"/>
                <S d="900000"/>
                <S d="900000"/>
...

Thanks in advance.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ojw28commented, May 11, 2017

I still think the setup being described here is pretty unnecessary. There definitely exist cleaner solutions to this problem. I thought the CENC PSSH data is sent up as part of the license request. If the KID is contained within the PSSH data as implied above, why can’t the server just parse and extract it from what’s already being sent?

The above aside, it’s a little unclear how your current implementation works. What are you actually doing in onLoadStarted currently? Specifically, where are you getting the manifest from? If you’re getting it from ExoPlayer.getCurrentManifest then you should probably use the ExoPlayer.onTimelineChanged callback instead, since this is the earliest point at which the manifest can be retrieved from that method.

I don’t think we want to make hard guarantees about the ordering, however, so this is still risky. The only guaranteed way to get data from the manifest before the key request is made would be to extend DashManifestParser and retrieve what you need during the actual parsing. You can inject your extended/custom parser into DashMediaSource constructors.

0reactions
jrocharodriguescommented, May 16, 2017

Ok @ojw28, i’ll do that.

Thanks for your help.

BRs

Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating a DASH DRM Manifest for the Brightcove Player
In this topic, you will learn how to create an MPEG-DASH manifest (.MPD file) with DRM protection for Brightcove Player.
Read more >
Why is my Widevine PSSH invalid in DASH manifest?
When all the videos are encrypted, I'm making a manifest file MP4Box -dash 3000 -rap -pssh=m -profile live -out L1/ecdn/manifest.mpd ...
Read more >
Dash JavaScript Player - DASH Industry Forum
Click on "Copy Settings URL" on the top right and paste the URL in the address bar of your browser. The current settings...
Read more >
DASH-IF implementation guidelines: content protection and ...
A content key is a 128-bit key used by a DRM system to make content available for playback. It is identified by a...
Read more >
DASH Content Protection using Microsoft PlayReady
When a ContentProtection Descriptor element refers to several tracks, and these use different default Key Identifiers in different 'tenc' boxes, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found