287 lines
14 KiB
HTML
287 lines
14 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
|
<title>Widevine — Shaka Packager documentation</title>
|
|
|
|
<link rel="stylesheet" href="../_static/sphinxdoc_new.css" type="text/css" />
|
|
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
|
<link rel="stylesheet" href="../_static/table_styling.css" type="text/css" />
|
|
|
|
<script type="text/javascript">
|
|
var DOCUMENTATION_OPTIONS = {
|
|
URL_ROOT: '../',
|
|
VERSION: '',
|
|
COLLAPSE_INDEX: false,
|
|
FILE_SUFFIX: '.html',
|
|
HAS_SOURCE: true,
|
|
SOURCELINK_SUFFIX: '.txt'
|
|
};
|
|
</script>
|
|
<script type="text/javascript" src="../_static/jquery.js"></script>
|
|
<script type="text/javascript" src="../_static/underscore.js"></script>
|
|
<script type="text/javascript" src="../_static/doctools.js"></script>
|
|
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
|
<link rel="index" title="Index" href="../genindex.html" />
|
|
<link rel="search" title="Search" href="../search.html" />
|
|
<link rel="next" title="Playready" href="playready.html" />
|
|
<link rel="prev" title="Raw key" href="raw_key.html" />
|
|
</head>
|
|
<body role="document">
|
|
<div class="related" role="navigation" aria-label="related navigation">
|
|
<h3>Navigation</h3>
|
|
<ul>
|
|
<li class="right" style="margin-right: 10px">
|
|
<a href="../genindex.html" title="General Index"
|
|
accesskey="I">index</a></li>
|
|
<li class="right" >
|
|
<a href="playready.html" title="Playready"
|
|
accesskey="N">next</a> |</li>
|
|
<li class="right" >
|
|
<a href="raw_key.html" title="Raw key"
|
|
accesskey="P">previous</a> |</li>
|
|
<li class="nav-item nav-item-0"><a href="../index.html">Shaka Packager documentation</a> »</li>
|
|
<li class="nav-item nav-item-1"><a href="tutorials.html" >Tutorials</a> »</li>
|
|
<li class="nav-item nav-item-2"><a href="drm.html" accesskey="U">DRM</a> »</li>
|
|
</ul>
|
|
</div>
|
|
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
|
<div class="sphinxsidebarwrapper">
|
|
<h3><a href="../index.html">Table Of Contents</a></h3>
|
|
<ul>
|
|
<li><a class="reference internal" href="#">Widevine</a><ul>
|
|
<li><a class="reference internal" href="#synopsis">Synopsis</a></li>
|
|
<li><a class="reference internal" href="#examples">Examples</a></li>
|
|
<li><a class="reference internal" href="#widevine-test-credential">Widevine test credential</a><ul>
|
|
<li><a class="reference internal" href="#widevine-encryption-options">Widevine encryption options</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
|
|
<h4>Previous topic</h4>
|
|
<p class="topless"><a href="raw_key.html"
|
|
title="previous chapter">Raw key</a></p>
|
|
<h4>Next topic</h4>
|
|
<p class="topless"><a href="playready.html"
|
|
title="next chapter">Playready</a></p>
|
|
<div role="note" aria-label="source link">
|
|
<h3>This Page</h3>
|
|
<ul class="this-page-menu">
|
|
<li><a href="../_sources/tutorials/widevine.rst.txt"
|
|
rel="nofollow">Show Source</a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="searchbox" style="display: none" role="search">
|
|
<h3>Quick search</h3>
|
|
<form class="search" action="../search.html" method="get">
|
|
<div><input type="text" name="q" /></div>
|
|
<div><input type="submit" value="Go" /></div>
|
|
<input type="hidden" name="check_keywords" value="yes" />
|
|
<input type="hidden" name="area" value="default" />
|
|
</form>
|
|
</div>
|
|
<script type="text/javascript">$('#searchbox').show(0);</script>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="document">
|
|
<div class="documentwrapper">
|
|
<div class="bodywrapper">
|
|
<div class="body" role="main">
|
|
|
|
<div class="section" id="widevine">
|
|
<h1>Widevine<a class="headerlink" href="#widevine" title="Permalink to this headline">¶</a></h1>
|
|
<p>There are two options to package a Widevine DRM encrypted content:</p>
|
|
<ol class="arabic simple">
|
|
<li>If you know the encryption keys and have the associated Widevine PSSH at
|
|
hand, you can provide them in clear text to <em>packager</em> directly. Refer to
|
|
<a class="reference internal" href="raw_key.html"><span class="doc">Raw key</span></a> for details.</li>
|
|
<li>Provide <em>key_server_url</em> and associated credentials to <em>packager</em>.
|
|
<em>Packager</em> will fetch encryption keys from Widevine key server.</li>
|
|
</ol>
|
|
<div class="section" id="synopsis">
|
|
<h2>Synopsis<a class="headerlink" href="#synopsis" title="Permalink to this headline">¶</a></h2>
|
|
<p>AES signing:</p>
|
|
<div class="highlight-default"><div class="highlight"><pre><span></span>$ packager {stream_descriptor} [stream_descriptor] ... \
|
|
--enable_widevine_encryption \
|
|
--key_server_url <key_server_url> \
|
|
--content_id <content_id> \
|
|
--signer <signer> --aes_signing_key <aes_signing_key> \
|
|
--aes_signing_iv <aes_signing_iv> \
|
|
[Other options, e.g. DASH options, HLS options]
|
|
</pre></div>
|
|
</div>
|
|
<p>RSA signing:</p>
|
|
<div class="highlight-default"><div class="highlight"><pre><span></span>$ packager {stream_descriptor} [stream_descriptor] ... \
|
|
--enable_widevine_encryption \
|
|
--key_server_url <key_server_url> \
|
|
--content_id <content_id> \
|
|
--signer <signer> --rsa_signing_key_path <rsa_signing_key_path> \
|
|
[Other options, e.g. DASH options, HLS options]
|
|
</pre></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="examples">
|
|
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
|
|
<p>The examples below uses the H264 streams created in <a class="reference internal" href="encoding.html"><span class="doc">Media Encoding</span></a>.</p>
|
|
<p>Here is an example with DASH. It can be applied to HLS in a similar way:</p>
|
|
<div class="highlight-default"><div class="highlight"><pre><span></span>$ packager \
|
|
in=h264_baseline_360p_600.mp4,stream=audio,output=audio.mp4 \
|
|
in=h264_baseline_360p_600.mp4,stream=video,output=h264_360p.mp4 \
|
|
in=h264_main_480p_1000.mp4,stream=video,output=h264_480p.mp4 \
|
|
in=h264_main_720p_3000.mp4,stream=video,output=h264_720p.mp4 \
|
|
in=h264_high_1080p_6000.mp4,stream=video,output=h264_1080p.mp4 \
|
|
--mpd_output h264.mpd \
|
|
--enable_widevine_encryption \
|
|
--key_server_url https://license.uat.widevine.com/cenc/getcontentkey/widevine_test \
|
|
--content_id 7465737420636f6e74656e74206964 \
|
|
--signer widevine_test \
|
|
--aes_signing_key 1ae8ccd0e7985cc0b6203a55855a1034afc252980e970ca90e5202689f947ab9 \
|
|
--aes_signing_iv d58ce954203b7c9a9a9d467f59839249
|
|
</pre></div>
|
|
</div>
|
|
<p>Refer to
|
|
<a class="reference external" href="https://shaka-player-demo.appspot.com/docs/api/tutorial-drm-config.html">player setup</a>
|
|
on how to config the DRM in Shaka Player.</p>
|
|
</div>
|
|
<div class="section" id="widevine-test-credential">
|
|
<h2>Widevine test credential<a class="headerlink" href="#widevine-test-credential" title="Permalink to this headline">¶</a></h2>
|
|
<p>Here is the test crendential used in this tutorial.</p>
|
|
<p>key_server_url</p>
|
|
<blockquote>
|
|
<div><a class="reference external" href="https://license.uat.widevine.com/cenc/getcontentkey/widevine_test">https://license.uat.widevine.com/cenc/getcontentkey/widevine_test</a></div></blockquote>
|
|
<p>signer</p>
|
|
<blockquote>
|
|
<div>widevine_test</div></blockquote>
|
|
<p>aes_signing_key</p>
|
|
<blockquote>
|
|
<div>1ae8ccd0e7985cc0b6203a55855a1034afc252980e970ca90e5202689f947ab9</div></blockquote>
|
|
<p>aes_signing_iv</p>
|
|
<blockquote>
|
|
<div>d58ce954203b7c9a9a9d467f59839249</div></blockquote>
|
|
<div class="admonition note">
|
|
<p class="first admonition-title">Note</p>
|
|
<p class="last">The test credential is only meant for development. Please reach out to
|
|
<a class="reference external" href="https://support.google.com/widevine/troubleshooter/6027072">Widevine</a> if
|
|
you need something for production use.</p>
|
|
</div>
|
|
<div class="section" id="widevine-encryption-options">
|
|
<h3>Widevine encryption options<a class="headerlink" href="#widevine-encryption-options" title="Permalink to this headline">¶</a></h3>
|
|
<table class="docutils option-list" frame="void" rules="none">
|
|
<col class="option" />
|
|
<col class="description" />
|
|
<tbody valign="top">
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--enable_widevine_encryption</span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>Enable encryption with Widevine key server. User should provide either
|
|
AES signing key (–aes_signing_key, –aes_signing_iv) or RSA signing key
|
|
(–rsa_signing_key_path).</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--enable_widevine_decryption</span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>Enable decryption with Widevine key server. User should provide either
|
|
AES signing key (–aes_signing_key, –aes_signing_iv) or RSA signing key
|
|
(–rsa_signing_key_path).</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--include_common_pssh</span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>When using Widevine encryption, include an additional v1 PSSH box for the
|
|
common system ID that includes the key IDs. See <a class="reference external" href="https://goo.gl/s8RIhr">https://goo.gl/s8RIhr</a>.</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--key_server_url <var><url></var></span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>Key server url. Required for Widevine encryption and decryption.</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--content_id <var><hex></var></span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>Content identifier that uniquely identifies the content.</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--policy <var><policy></var></span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>The name of a stored policy, which specifies DRM content rights.</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--max_sd_pixels <var><pixels></var></span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>The video track is considered SD if its max pixels per frame is no higher
|
|
than <em>max_sd_pixels</em>. Default: 442368 (768 x 576).</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--max_hd_pixels <var><pixels></var></span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>The video track is considered HD if its max pixels per frame is higher than
|
|
<em>max_sd_pixels</em>, but no higher than <em>max_hd_pixels</em>. Default: 2073600
|
|
(1920 x 1080).</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--max_uhd1_pixels <var><pixels></var></span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>The video track is considered UHD1 if its max pixels per frame is higher
|
|
than <em>max_hd_pixels</em>, but no higher than <em>max_uhd1_pixels</em>. Otherwise it is
|
|
UHD2. Default: 8847360 (4096 x 2160).</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--signer <var><signer></var></span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>The name of the signer.</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--aes_signing_key <var><hex></var></span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>AES signing key in hex string. <em>aes_signing_iv</em> is required if
|
|
<em>aes_signing_key</em> is specified. This option is exclusive with
|
|
<em>rsa_signing_key_path</em>.</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--aes_signing_iv <var><hex></var></span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>AES signing iv in hex string.</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--rsa_signing_key_path <var><file path></var></span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>Path to the file containing PKCS#1 RSA private key for request signing.
|
|
This option is exclusive with <em>aes_signing_key</em>.</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--crypto_period_duration <var><seconds></var></span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>Defines how often key rotates. If it is non-zero, key rotation is enabled.</td></tr>
|
|
<tr><td class="option-group" colspan="2">
|
|
<kbd><span class="option">--group_id <var><hex></var></span></kbd></td>
|
|
</tr>
|
|
<tr><td> </td><td>Identifier for a group of licenses.</td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="clearer"></div>
|
|
</div>
|
|
<div class="related" role="navigation" aria-label="related navigation">
|
|
<h3>Navigation</h3>
|
|
<ul>
|
|
<li class="right" style="margin-right: 10px">
|
|
<a href="../genindex.html" title="General Index"
|
|
>index</a></li>
|
|
<li class="right" >
|
|
<a href="playready.html" title="Playready"
|
|
>next</a> |</li>
|
|
<li class="right" >
|
|
<a href="raw_key.html" title="Raw key"
|
|
>previous</a> |</li>
|
|
<li class="nav-item nav-item-0"><a href="../index.html">Shaka Packager documentation</a> »</li>
|
|
<li class="nav-item nav-item-1"><a href="tutorials.html" >Tutorials</a> »</li>
|
|
<li class="nav-item nav-item-2"><a href="drm.html" >DRM</a> »</li>
|
|
</ul>
|
|
</div>
|
|
<div class="footer" role="contentinfo">
|
|
© Copyright 2017, Google.
|
|
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.5.3.
|
|
</div>
|
|
</body>
|
|
</html> |