shaka-packager/html/tutorials/basic_usage.html

170 lines
8.9 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>Basic Usage &#8212; Shaka Packager documentation</title>
<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" />
<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="DASH" href="dash.html" />
<link rel="prev" title="Tutorials" href="tutorials.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="dash.html" title="DASH"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="tutorials.html" title="Tutorials"
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-1"><a href="tutorials.html" accesskey="U">Tutorials</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Basic Usage</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="basic-usage">
<h1>Basic Usage<a class="headerlink" href="#basic-usage" title="Permalink to this headline"></a></h1>
<section id="getting-help">
<h2>Getting help<a class="headerlink" href="#getting-help" title="Permalink to this headline"></a></h2>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ packager --help
</pre></div>
</div>
</section>
<section id="media-file-analysis">
<h2>Media file analysis<a class="headerlink" href="#media-file-analysis" title="Permalink to this headline"></a></h2>
<p>Shaka Packager can be used to inspect the content of a media file and dump basic
stream information:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ packager input=some_content.mp4 --dump_stream_info
</pre></div>
</div>
<p>The output looks like:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">File</span> <span class="s2">&quot;some_content.mp4&quot;</span><span class="p">:</span>
<span class="n">Found</span> <span class="mi">2</span> <span class="n">stream</span><span class="p">(</span><span class="n">s</span><span class="p">)</span><span class="o">.</span>
<span class="n">Stream</span> <span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="nb">type</span><span class="p">:</span> <span class="n">Video</span>
<span class="n">codec_string</span><span class="p">:</span> <span class="n">avc1</span><span class="mf">.4</span><span class="n">d001e</span>
<span class="n">time_scale</span><span class="p">:</span> <span class="mi">24000</span>
<span class="n">duration</span><span class="p">:</span> <span class="mi">3002000</span> <span class="p">(</span><span class="mf">125.1</span> <span class="n">seconds</span><span class="p">)</span>
<span class="n">is_encrypted</span><span class="p">:</span> <span class="n">false</span>
<span class="n">codec</span><span class="p">:</span> <span class="n">H264</span>
<span class="n">width</span><span class="p">:</span> <span class="mi">720</span>
<span class="n">height</span><span class="p">:</span> <span class="mi">360</span>
<span class="n">pixel_aspect_ratio</span><span class="p">:</span> <span class="mi">8</span><span class="p">:</span><span class="mi">9</span>
<span class="n">trick_play_factor</span><span class="p">:</span> <span class="mi">0</span>
<span class="n">nalu_length_size</span><span class="p">:</span> <span class="mi">4</span>
<span class="n">Stream</span> <span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="nb">type</span><span class="p">:</span> <span class="n">Audio</span>
<span class="n">codec_string</span><span class="p">:</span> <span class="n">mp4a</span><span class="mf">.40.2</span>
<span class="n">time_scale</span><span class="p">:</span> <span class="mi">44100</span>
<span class="n">duration</span><span class="p">:</span> <span class="mi">5517311</span> <span class="p">(</span><span class="mf">125.1</span> <span class="n">seconds</span><span class="p">)</span>
<span class="n">is_encrypted</span><span class="p">:</span> <span class="n">false</span>
<span class="n">codec</span><span class="p">:</span> <span class="n">AAC</span>
<span class="n">sample_bits</span><span class="p">:</span> <span class="mi">16</span>
<span class="n">num_channels</span><span class="p">:</span> <span class="mi">2</span>
<span class="n">sampling_frequency</span><span class="p">:</span> <span class="mi">44100</span>
<span class="n">language</span><span class="p">:</span> <span class="n">eng</span>
</pre></div>
</div>
</section>
<section id="basic-transmuxing">
<h2>Basic transmuxing<a class="headerlink" href="#basic-transmuxing" title="Permalink to this headline"></a></h2>
<p>Shaka Packager can be used to extract streams, optionally transmuxes the streams
from one container format to another container format.</p>
<p>Here is a simple command that extracts video and audio from the input file:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ packager in=some_content.mp4,stream=video,out=video.mp4 \
in=some_content.mp4,stream=audio,out=audio.mp4
</pre></div>
</div>
<p>Shaka Packager is also capable of more complex tasks, such as applying
encryption, packaging contents to DASH or HLS formats, etc. Refer to
<a class="reference internal" href="tutorials.html"><span class="doc">Tutorials</span></a>.</p>
</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="#">Basic Usage</a><ul>
<li><a class="reference internal" href="#getting-help">Getting help</a></li>
<li><a class="reference internal" href="#media-file-analysis">Media file analysis</a></li>
<li><a class="reference internal" href="#basic-transmuxing">Basic transmuxing</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="tutorials.html"
title="previous chapter">Tutorials</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="dash.html"
title="next chapter">DASH</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/tutorials/basic_usage.rst.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="dash.html" title="DASH"
>next</a> |</li>
<li class="right" >
<a href="tutorials.html" title="Tutorials"
>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-1"><a href="tutorials.html" >Tutorials</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Basic Usage</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2017, Google.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.0.2.
</div>
</body>
</html>