242 lines
11 KiB
HTML
242 lines
11 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>Raw key — 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="Widevine" href="widevine.html" />
|
||
|
<link rel="prev" title="DRM" href="drm.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="widevine.html" title="Widevine"
|
||
|
accesskey="N">next</a> |</li>
|
||
|
<li class="right" >
|
||
|
<a href="drm.html" title="DRM"
|
||
|
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="#">Raw key</a><ul>
|
||
|
<li><a class="reference internal" href="#synopsis">Synopsis</a></li>
|
||
|
<li><a class="reference internal" href="#examples">Examples</a><ul>
|
||
|
<li><a class="reference internal" href="#test-vectors-used-in-this-tutorial">Test vectors used in this tutorial</a></li>
|
||
|
<li><a class="reference internal" href="#raw-key-encryption-options">Raw key encryption options</a></li>
|
||
|
<li><a class="reference internal" href="#pssh-box-utility-to-generate-pssh-boxes">pssh-box (Utility to generate PSSH boxes)</a></li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
</ul>
|
||
|
|
||
|
<h4>Previous topic</h4>
|
||
|
<p class="topless"><a href="drm.html"
|
||
|
title="previous chapter">DRM</a></p>
|
||
|
<h4>Next topic</h4>
|
||
|
<p class="topless"><a href="widevine.html"
|
||
|
title="next chapter">Widevine</a></p>
|
||
|
<div role="note" aria-label="source link">
|
||
|
<h3>This Page</h3>
|
||
|
<ul class="this-page-menu">
|
||
|
<li><a href="../_sources/tutorials/raw_key.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="raw-key">
|
||
|
<h1>Raw key<a class="headerlink" href="#raw-key" title="Permalink to this headline">¶</a></h1>
|
||
|
<p><em>Packager</em> allows encrypting contents with raw key.</p>
|
||
|
<div class="section" id="synopsis">
|
||
|
<h2>Synopsis<a class="headerlink" href="#synopsis" title="Permalink to this headline">¶</a></h2>
|
||
|
<div class="highlight-default"><div class="highlight"><pre><span></span>$ packager {stream_descriptor} [stream_descriptor] ... \
|
||
|
--enable_fixed_key_encryption \
|
||
|
--key_id <key_id> --key <key> \
|
||
|
[--pssh <concatenated PSSHs>] \
|
||
|
[Other options, e.g. DASH options, HLS options]
|
||
|
</pre></div>
|
||
|
</div>
|
||
|
<p>Custom PSSH(s) can be provided in <em>–pssh</em>. If absent,
|
||
|
<a class="reference external" href="https://goo.gl/s8RIhr">v1 common PSSH box</a> is generated.</p>
|
||
|
</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>. Here are examples with DASH. It can be applied to HLS in a similar way.</p>
|
||
|
<p>Common PSSH:</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 \
|
||
|
--enable_fixed_key_encryption \
|
||
|
--key_id abba271e8bcf552bbd2e86a434a9a5d9 \
|
||
|
--key 69eaa802a6763af979e8d1940fb88392 \
|
||
|
--mpd_output h264.mpd
|
||
|
</pre></div>
|
||
|
</div>
|
||
|
<p>Widevine PSSH:</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 \
|
||
|
--enable_fixed_key_encryption \
|
||
|
--key_id abba271e8bcf552bbd2e86a434a9a5d9 \
|
||
|
--key 69eaa802a6763af979e8d1940fb88392 \
|
||
|
--pssh 000000407073736800000000edef8ba979d64acea3c827dcd51d21ed000000201a0d7769646576696e655f74657374220f7465737420636f6e74656e74206964 \
|
||
|
--mpd_output h264.mpd
|
||
|
</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 class="section" id="test-vectors-used-in-this-tutorial">
|
||
|
<h3>Test vectors used in this tutorial<a class="headerlink" href="#test-vectors-used-in-this-tutorial" title="Permalink to this headline">¶</a></h3>
|
||
|
<p>Key ID</p>
|
||
|
<blockquote>
|
||
|
<div><p>abba271e8bcf552bbd2e86a434a9a5d9</p>
|
||
|
<p>Key ID must be 16 bytes or 32 digits in HEX.</p>
|
||
|
</div></blockquote>
|
||
|
<p>Key</p>
|
||
|
<blockquote>
|
||
|
<div><p>69eaa802a6763af979e8d1940fb88392</p>
|
||
|
<p>Key must be 16 bytes or 32 digits in HEX.</p>
|
||
|
</div></blockquote>
|
||
|
<p>Widevine PSSH</p>
|
||
|
<blockquote>
|
||
|
<div><p>000000407073736800000000edef8ba979d64acea3c827dcd51d21ed000000201a0d7769646576696e655f74657374220f7465737420636f6e74656e74206964</p>
|
||
|
<p>The PSSH is generated using
|
||
|
<a class="reference external" href="https://github.com/google/shaka-packager/tree/master/packager/tools/pssh">pssh-box script</a>:</p>
|
||
|
<div class="highlight-default"><div class="highlight"><pre><span></span>$ pssh-box.py --widevine-system-id \
|
||
|
--content-id 7465737420636f6e74656e74206964 --provider widevine_test
|
||
|
</pre></div>
|
||
|
</div>
|
||
|
</div></blockquote>
|
||
|
</div>
|
||
|
<div class="section" id="raw-key-encryption-options">
|
||
|
<h3>Raw key encryption options<a class="headerlink" href="#raw-key-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_fixed_key_encryption</span></kbd></td>
|
||
|
</tr>
|
||
|
<tr><td> </td><td>Enable encryption with fixed key.</td></tr>
|
||
|
<tr><td class="option-group" colspan="2">
|
||
|
<kbd><span class="option">--enable_fixed_key_decryption</span></kbd></td>
|
||
|
</tr>
|
||
|
<tr><td> </td><td>Enable decryption with fixed key.</td></tr>
|
||
|
<tr><td class="option-group" colspan="2">
|
||
|
<kbd><span class="option">--key_id <var><32-digit hex string></var></span></kbd></td>
|
||
|
</tr>
|
||
|
<tr><td> </td><td>The key id in hex string format.
|
||
|
HEX.</td></tr>
|
||
|
<tr><td class="option-group" colspan="2">
|
||
|
<kbd><span class="option">--key <var><32-digit hex string></var></span></kbd></td>
|
||
|
</tr>
|
||
|
<tr><td> </td><td>The key in hex string format.</td></tr>
|
||
|
<tr><td class="option-group" colspan="2">
|
||
|
<kbd><span class="option">--iv <var><16-digit or 32-digit hex string></var></span></kbd></td>
|
||
|
</tr>
|
||
|
<tr><td> </td><td>IV in hex string format. If not specified, a random IV will be generated.
|
||
|
This flag should only be used for testing. IV must be either 8 bytes
|
||
|
(16 digits HEX) or 16 bytes (32 digits in HEX).</td></tr>
|
||
|
<tr><td class="option-group" colspan="2">
|
||
|
<kbd><span class="option">--pssh <var><hex string></var></span></kbd></td>
|
||
|
</tr>
|
||
|
<tr><td> </td><td>One or more concatenated PSSH boxes in hex string format. If not specified,
|
||
|
a <a class="reference external" href="https://goo.gl/s8RIhr">v1 common PSSH box</a> will be generated.</td></tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="section" id="pssh-box-utility-to-generate-pssh-boxes">
|
||
|
<h3>pssh-box (Utility to generate PSSH boxes)<a class="headerlink" href="#pssh-box-utility-to-generate-pssh-boxes" title="Permalink to this headline">¶</a></h3>
|
||
|
<p><a class="reference external" href="https://github.com/google/shaka-packager/tree/master/packager/tools/pssh">https://github.com/google/shaka-packager/tree/master/packager/tools/pssh</a></p>
|
||
|
</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="widevine.html" title="Widevine"
|
||
|
>next</a> |</li>
|
||
|
<li class="right" >
|
||
|
<a href="drm.html" title="DRM"
|
||
|
>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>
|