2018-02-10 23:37:42 +00:00
|
|
|
|
2020-01-22 00:59:16 +00:00
|
|
|
<!DOCTYPE html>
|
2017-09-20 02:35:05 +00:00
|
|
|
|
2021-04-10 04:00:37 +00:00
|
|
|
<html>
|
2017-09-20 02:35:05 +00:00
|
|
|
<head>
|
2020-01-22 00:59:16 +00:00
|
|
|
<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/" />
|
|
|
|
|
2017-09-20 02:35:05 +00:00
|
|
|
<title>Basic Usage — 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" />
|
2020-01-22 00:59:16 +00:00
|
|
|
<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>
|
2021-04-10 04:00:37 +00:00
|
|
|
<script src="../_static/jquery.js"></script>
|
|
|
|
<script src="../_static/underscore.js"></script>
|
|
|
|
<script src="../_static/doctools.js"></script>
|
2017-09-20 02:35:05 +00:00
|
|
|
<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" />
|
2020-01-22 00:59:16 +00:00
|
|
|
</head><body>
|
2017-09-20 02:35:05 +00:00
|
|
|
<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> »</li>
|
2021-04-10 04:00:37 +00:00
|
|
|
<li class="nav-item nav-item-1"><a href="tutorials.html" accesskey="U">Tutorials</a> »</li>
|
|
|
|
<li class="nav-item nav-item-this"><a href="">Basic Usage</a></li>
|
2017-09-20 02:35:05 +00:00
|
|
|
</ul>
|
2021-04-10 04:00:37 +00:00
|
|
|
</div>
|
2017-09-20 02:35:05 +00:00
|
|
|
|
|
|
|
<div class="document">
|
|
|
|
<div class="documentwrapper">
|
|
|
|
<div class="bodywrapper">
|
|
|
|
<div class="body" role="main">
|
|
|
|
|
2021-06-22 00:16:40 +00:00
|
|
|
<section id="basic-usage">
|
2017-12-12 02:14:43 +00:00
|
|
|
<h1>Basic Usage<a class="headerlink" href="#basic-usage" title="Permalink to this headline">¶</a></h1>
|
2021-06-22 00:16:40 +00:00
|
|
|
<section id="getting-help">
|
2017-12-12 02:14:43 +00:00
|
|
|
<h2>Getting help<a class="headerlink" href="#getting-help" title="Permalink to this headline">¶</a></h2>
|
2020-01-22 00:59:16 +00:00
|
|
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ packager --help
|
2017-09-20 02:35:05 +00:00
|
|
|
</pre></div>
|
|
|
|
</div>
|
2021-06-22 00:16:40 +00:00
|
|
|
</section>
|
|
|
|
<section id="media-file-analysis">
|
2017-12-12 02:14:43 +00:00
|
|
|
<h2>Media file analysis<a class="headerlink" href="#media-file-analysis" title="Permalink to this headline">¶</a></h2>
|
2017-09-20 02:35:05 +00:00
|
|
|
<p>Shaka Packager can be used to inspect the content of a media file and dump basic
|
2017-12-12 02:14:43 +00:00
|
|
|
stream information:</p>
|
2020-01-22 00:59:16 +00:00
|
|
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ packager input=some_content.mp4 --dump_stream_info
|
2017-09-20 02:35:05 +00:00
|
|
|
</pre></div>
|
|
|
|
</div>
|
|
|
|
<p>The output looks like:</p>
|
2020-01-22 00:59:16 +00:00
|
|
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">File</span> <span class="s2">"some_content.mp4"</span><span class="p">:</span>
|
2017-12-12 02:14:43 +00:00
|
|
|
<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>
|
2021-06-22 00:16:40 +00:00
|
|
|
<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>
|
2017-12-12 02:14:43 +00:00
|
|
|
<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>
|
2017-09-20 02:35:05 +00:00
|
|
|
|
2017-12-12 02:14:43 +00:00
|
|
|
<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>
|
2021-06-22 00:16:40 +00:00
|
|
|
<span class="n">codec_string</span><span class="p">:</span> <span class="n">mp4a</span><span class="mf">.40.2</span>
|
2017-12-12 02:14:43 +00:00
|
|
|
<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>
|
2017-09-20 02:35:05 +00:00
|
|
|
</pre></div>
|
|
|
|
</div>
|
2021-06-22 00:16:40 +00:00
|
|
|
</section>
|
|
|
|
<section id="basic-transmuxing">
|
2017-12-12 02:14:43 +00:00
|
|
|
<h2>Basic transmuxing<a class="headerlink" href="#basic-transmuxing" title="Permalink to this headline">¶</a></h2>
|
2017-09-20 02:35:05 +00:00
|
|
|
<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>
|
2020-01-22 00:59:16 +00:00
|
|
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ packager in=some_content.mp4,stream=video,out=video.mp4 \
|
2017-12-12 02:14:43 +00:00
|
|
|
in=some_content.mp4,stream=audio,out=audio.mp4
|
2017-09-20 02:35:05 +00:00
|
|
|
</pre></div>
|
|
|
|
</div>
|
|
|
|
<p>Shaka Packager is also capable of more complex tasks, such as applying
|
2017-12-12 02:14:43 +00:00
|
|
|
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>
|
2021-06-22 00:16:40 +00:00
|
|
|
</section>
|
|
|
|
</section>
|
2017-09-20 02:35:05 +00:00
|
|
|
|
|
|
|
|
2021-04-10 04:00:37 +00:00
|
|
|
<div class="clearer"></div>
|
2017-09-20 02:35:05 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-04-10 04:00:37 +00:00
|
|
|
<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>
|
2017-09-20 02:35:05 +00:00
|
|
|
<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> »</li>
|
2021-04-10 04:00:37 +00:00
|
|
|
<li class="nav-item nav-item-1"><a href="tutorials.html" >Tutorials</a> »</li>
|
|
|
|
<li class="nav-item nav-item-this"><a href="">Basic Usage</a></li>
|
2017-09-20 02:35:05 +00:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div class="footer" role="contentinfo">
|
|
|
|
© 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.
|
2017-09-20 02:35:05 +00:00
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|