mpd file
<?xml version="1.0" encoding="UTF-8"?>
<!--Generated with https://github.com/google/shaka-packager version v2.2.0-9e9833ea63-release-->
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd" xmlns:cenc="urn:mpeg:cenc:2013" profiles="urn:mpeg:dash:profile:isoff-live:2011" minBufferTime="PT2S" type="static" mediaPresentationDuration="PT10S">
<BaseURL>gsp.vp9.init.webm</BaseURL>
<Period id="0">
<AdaptationSet id="0" contentType="video" width="320" height="240" frameRate="1000000/40000" segmentAlignment="true" par="4:3">
<ContentProtection schemeIdUri="urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b" cenc:default_KID="27992649-6a7f-5d25-da69-f2b3b2799a7f">
<cenc:pssh>AAAANHBzc2gBAAAAEHfv7MCyTQKs4zweUuL7SwAAAAEnmSZJan9dJdpp8rOyeZp/AAAAAA==</cenc:pssh>
</ContentProtection>
<Representation id="0" bandwidth="652189" codecs="vp09.00.10.08.00.02.02.02.00" mimeType="video/webm" sar="1:1">
<SegmentTemplate timescale="1000000" initialization="vp69/gsp.vp9.init.webm" media="vp69/gsp.vp9.$Number$.webm" startNumber="1">
<SegmentTimeline>
<S t="0" d="5120000"/>
<S t="5120000" d="4880000"/>
</SegmentTimeline>
</SegmentTemplate>
</Representation>
</AdaptationSet>
</Period>
</MPD>
webm file structure
webm
error source dash.js
var KeyMessage =
/ *
- @ param {SessionToken} sessionToken the session
- to which the key message is associated
- @ param {ArrayBuffer} message the key message
@ param {string} defaultURL license acquisition URL provided by the CDM the whole parameter causes an error *
- @ param {string} messageType Supported message types can be found
- {@ link https://w3c.github.io/encrypt.}.
- @ class
* /
function KeyMessage (sessionToken, message, defaultURL, messageType) {
_ classCallCheck (this, KeyMessage);
this.sessionToken = sessionToken;
this.message = message;
this.defaultURL = defaultURL;
this.messageType = messageType? MessageType: "license-request";
};
preliminary analysis may be that there are other areas not considered in video slicing
slice: use the packager command to slice and encrypt it with raw-key
packager input=vp9.webm,stream=video,init_segment=vp59/gsp.vp9.init.webm,segment_template=vp59/gsp.vp9.$Number$.webm-- segment_duration 5-- protection_scheme cenc-- enable_raw_key_encryption-- keys label=SD:key_id=279926496a7f5d25da69f2b3b2799a7f:key=ccc0f2b3b279926496a7f5d25da692f6-- generate_static_mpd-- mpd_output vp59.mpd