shaka-packager/html/docker_instructions.html

151 lines
7.5 KiB
HTML
Raw Permalink Normal View History

2018-02-10 23:37:42 +00:00
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
2021-06-22 00:16:40 +00:00
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>Using Docker &#8212; Shaka Packager documentation</title>
2021-06-22 00:16:40 +00:00
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/sphinxdoc_new.css" />
<link rel="stylesheet" type="text/css" href="_static/graphviz.css" />
<link rel="stylesheet" type="text/css" href="_static/table_styling.css" />
2021-06-22 00:16:40 +00:00
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Shaka Packager Library (Continued)" href="library_details.html" />
<link rel="prev" title="Build Instructions" href="build_instructions.html" />
</head><body>
<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="library_details.html" title="Shaka Packager Library (Continued)"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="build_instructions.html" title="Build Instructions"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">Shaka Packager documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Using Docker</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
2021-06-22 00:16:40 +00:00
<section id="using-docker">
<h1>Using Docker<a class="headerlink" href="#using-docker" title="Permalink to this headline"></a></h1>
<p><a class="reference external" href="https://www.docker.com/whatisdocker">Docker</a> is a tool that can package an
application and its dependencies in a virtual container to run on different
host operating systems.</p>
2021-06-22 00:16:40 +00:00
<section id="get-shaka-packager-from-dockerhub">
<h2>Get Shaka Packager from Dockerhub<a class="headerlink" href="#get-shaka-packager-from-dockerhub" title="Permalink to this headline"></a></h2>
<p>To pull latest Shaka Packager:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>$ docker pull google/shaka-packager
</pre></div>
</div>
<p>You can pull a specific version, e.g. v1.6.2:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>$ docker pull google/shaka-packager:release-v1.6.2
</pre></div>
</div>
<p>The full list of tags is available
<a class="reference external" href="https://hub.docker.com/r/google/shaka-packager/tags/">here</a>.</p>
2021-06-22 00:16:40 +00:00
</section>
<section id="run-the-container">
<h2>Run the container<a class="headerlink" href="#run-the-container" title="Permalink to this headline"></a></h2>
<p>Assume you have your media files stored in <code class="docutils literal notranslate"><span class="pre">host_media_path</span></code> in the host
machine.</p>
<p>This runs the container and maps <code class="docutils literal notranslate"><span class="pre">host_media_path</span></code> to <code class="docutils literal notranslate"><span class="pre">media</span></code> in the container:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>$ docker run -v /host_media_path/:/media -it --rm google/shaka-packager
</pre></div>
</div>
<p>Note that the networking in the container is containerized by default, so if
you want to access UDP multicast in the host network, you will need to configure
the network explicitly. You may do this with <code class="docutils literal notranslate"><span class="pre">--net=host</span></code> option, i.e.</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>$ docker run -v /host_media_path/:/media -it --net<span class="o">=</span>host --rm google/shaka-packager
</pre></div>
</div>
<p>Then in the container, run the packager command, e.g.:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>$ packager <span class="nv">input</span><span class="o">=</span>/media/example.mp4,stream<span class="o">=</span>audio,output<span class="o">=</span>/media/audio.mp4 <span class="se">\</span>
<span class="nv">input</span><span class="o">=</span>/media/example.mp4,stream<span class="o">=</span>video,output<span class="o">=</span>/media/video.mp4 <span class="se">\</span>
--mpd_output /media/example.mpd
</pre></div>
</div>
<p>Outputs are available in the hosts media folder <code class="docutils literal notranslate"><span class="pre">host_media_path</span></code>.</p>
2021-06-22 00:16:40 +00:00
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</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="#">Using Docker</a><ul>
<li><a class="reference internal" href="#get-shaka-packager-from-dockerhub">Get Shaka Packager from Dockerhub</a></li>
<li><a class="reference internal" href="#run-the-container">Run the container</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="build_instructions.html"
title="previous chapter">Build Instructions</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="library_details.html"
title="next chapter">Shaka Packager Library (Continued)</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/docker_instructions.md.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</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="library_details.html" title="Shaka Packager Library (Continued)"
>next</a> |</li>
<li class="right" >
<a href="build_instructions.html" title="Build Instructions"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">Shaka Packager documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Using Docker</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2017, Google.
2021-06-22 00:16:40 +00:00
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.0.2.
</div>
</body>
</html>