Widevine和PlayReady的多重DRM工作流程 multi-drm-workflow-for-widevine-and-playready
此多DRM工作流程會帶您完成設定、封裝、授權及播放使用Widevine和PlayReady加密的DASH內容。
Primetime TVSDK僅支援TVSDK 2.X版在HTML5和Android上播放Widevine加密或PlayReady加密的DASH內容。DASH內容加密由「一般加密」規格定義,其完整詳細資訊不在本檔案的範圍之內。 本節提供DASH格式和加密規格的相關詳細資訊,以及您可以用來產生支援內容的某些工具的資訊。
NOTE
尚未計畫將Widevine加密的DASH內容回傳至Android TVSDK 1.X。
DASH內容與一般加密一覽 section_33A881158F724835B4B89AAE97302B17
虛線內容包含以xml撰寫的主要資訊清單,指向要播放的視訊和音訊檔案。 在以下範例中,DASH資訊清單指向相對於資訊清單URL的視訊URL video/1080_30.mp4和音訊URL audio/1080_30.mp4。
<MPD xmlns="urn:mpeg:DASH:schema:MPD:2011" xmlns:cenc="urn:mpeg:cenc:2013" xmlns:scte35="urn:scte:scte35:2013" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"mediaPresentationDuration="PT30S" minBufferTime="PT8S" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011" type="static" xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 DASH-MPD.xsd">
<Period id="1" start="PT0S">
<AdaptationSet bitstreamSwitching="true" contentType="video" id="1" segmentAlignment="true" startWithSAP="2">
<Representation bandwidth="4215100" codecs="avc1.4d4029" height="1080" id="1" mimeType="video/mp4" width="1920">
<BaseURL>video/1080_30.mp4</BaseURL>
<CueInfo schemeIdUri="urn:adobe:mpeg:dash:cueinfo:2012"/>
</Representation>
</AdaptationSet>
<AdaptationSet bitstreamSwitching="true" contentType="audio" id="2" segmentAlignment="1" startWithSAP="1">
<Representation bandwidth="320600" codecs="mp4a.40.02" id="1" mimeType="audio/mp4">
<BaseURL>audio/1080_30.mp4</BaseURL>
<CueInfo schemeIdUri="urn:adobe:mpeg:dash:cueinfo:2012"/>
</Representation>
</AdaptationSet>
</Period>
</MPD>
以下是套用一般加密的範例資訊清單。 Widevine內容保護XML元素( <ContentProtection> 資訊清單中的區塊包含base64編碼的pssh (保護系統專屬標頭)方塊。 pssh方塊包含初始化內容解密所需的資料。 此資料也內嵌在資訊清單參照的視訊/音訊內容中。 DASH內容可以有多個內容保護元素,例如1表示PlayReady,1表示Widevine。
<?xml version="1.0" ?>
<MPD mediaPresentationDuration="PT3M35.533S" minBufferTime="PT15.00S" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:cenc="urn:mpeg:cenc:2013">
<!-- Created with Bento4 mp4-dash.py, VERSION=1.6.0-607 -->
<Period>
<!-- Audio -->
<AdaptationSet mimeType="audio/mp4" segmentAlignment="true" startWithSAP="1">
<!-- Common Encryption -->
<ContentProtection cenc:default_KID="9e828b37-842d-9f71-0233-c007fb1d4f5b" schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc"/>
<!-- Widevine -->
<ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed">
<cenc:pssh>
AAAAQ3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAACMIARIQnoKLN4Qtn3ECM8AH+x1PWxoKaW50ZXJ0cnVzdCIBKg==
</cenc:pssh>
</ContentProtection>
<Representation audioSamplingRate="44100" bandwidth="200429" codecs="mp4a.40.2" id="audio/und">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
<SegmentList duration="15000" timescale="1000">
<Initialization sourceURL="audio/und/init.mp4"/>
<SegmentURL media="audio/und/seg-1.m4f"/>
<SegmentURL media="audio/und/seg-2.m4f"/>
<SegmentURL media="audio/und/seg-3.m4f"/>
<SegmentURL media="audio/und/seg-4.m4f"/>
<SegmentURL media="audio/und/seg-5.m4f"/>
<SegmentURL media="audio/und/seg-6.m4f"/>
<SegmentURL media="audio/und/seg-7.m4f"/>
<SegmentURL media="audio/und/seg-8.m4f"/>
<SegmentURL media="audio/und/seg-9.m4f"/>
<SegmentURL media="audio/und/seg-10.m4f"/>
<SegmentURL media="audio/und/seg-11.m4f"/>
<SegmentURL media="audio/und/seg-12.m4f"/>
<SegmentURL media="audio/und/seg-13.m4f"/>
<SegmentURL media="audio/und/seg-14.m4f"/>
<SegmentURL media="audio/und/seg-15.m4f"/>
<SegmentURL media="audio/und/seg-16.m4f"/>
</SegmentList>
</Representation>
</AdaptationSet>
<!-- Video -->
<AdaptationSet maxHeight="720" maxWidth="1280" mimeType="video/mp4" minHeight="720" minWidth="1280" segmentAlignment="true" startWithSAP="1">
<!-- Common Encryption -->
<ContentProtection cenc:default_KID="9e828b37-842d-9f71-0233-c007fb1d4f5b" schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc"/>
<!-- Widevine -->
<ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed">
<cenc:pssh>
AAAAQ3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAACMIARIQnoKLN4Qtn3ECM8AH+x1PWxoKaW50ZXJ0cnVzdCIBKg==
</cenc:pssh>
</ContentProtection>
<Representation bandwidth="2640920" codecs="avc1.64001F" frameRate="30" height="720" id="video/1" scanType="progressive" width="1280">
<SegmentList duration="15000" timescale="1000">
<Initialization sourceURL="video/1/init.mp4"/>
<SegmentURL media="video/1/seg-1.m4f"/>
<SegmentURL media="video/1/seg-2.m4f"/>
<SegmentURL media="video/1/seg-3.m4f"/>
<SegmentURL media="video/1/seg-4.m4f"/>
<SegmentURL media="video/1/seg-5.m4f"/>
<SegmentURL media="video/1/seg-6.m4f"/>
<SegmentURL media="video/1/seg-7.m4f"/>
<SegmentURL media="video/1/seg-8.m4f"/>
<SegmentURL media="video/1/seg-9.m4f"/>
<SegmentURL media="video/1/seg-10.m4f"/>
<SegmentURL media="video/1/seg-11.m4f"/>
<SegmentURL media="video/1/seg-12.m4f"/>
<SegmentURL media="video/1/seg-13.m4f"/>
<SegmentURL media="video/1/seg-14.m4f"/>
<SegmentURL media="video/1/seg-15.m4f"/>
</SegmentList>
</Representation>
</AdaptationSet>
</Period>
</MPD>
請注意,上述第一個範例僅參照每個資料流的一個檔案,而第二個範例則參照一系列小型內容片段。 您也可以定義片段範本,而不是明確提及片段,例如:
<Representation bandwidth="348000" codecs="avc1.42c01e" height="360" id="1" width="640">
<BaseURL>video/</BaseURL>
<SegmentTemplate initialization="JaigoInit.mp4" media="Jaigo$Number$.m4s" startNumber="0" timescale="1000">
<SegmentTimeline>
<S d="4538" t="0"/>
<S d="4304" t="4538"/>
<S d="4004" t="8842"/>
<S d="2102" t="12846"/>
</SegmentTimeline>
</SegmentTemplate>
</Representation>
在此案例中,內容剖析器(TVSDK)預期會在Jaigo0.m4s、Jaigo1.m4s、Jaigo2.m4s等找到視訊內容。 這主要用於即時串流,並且具有不需要使用者端不時再次下載資訊清單的優勢。
recommendation-more-help
65c6b713-0922-46bf-a817-e70a5a893727