This release introduces a major overhaul of the `mediacurator` command-line interface (CLI) and comprehensive updates to the documentation. The CLI has transitioned from a custom argument parsing system to utilizing Python's `argparse` and `argcomplete` libraries, greatly enhancing usability and flexibility. Due to these significant changes, the version is incremented from **0.0.13** to **1.0.1**. - **Refactored** `tools.py` for standardized command-line argument handling using `argparse` and `argcomplete`. - **Improved** user interaction with structured arguments and built-in help, error handling, and validation. - **Consolidated** video detail printing logic into a reusable method within the `Video` class. - **Enhanced** `MediaLibrary` class with better clarity, functionality, and expanded support for video formats. - **Reorganized** `main.py` to streamline argument handling and improve error feedback. - **Updated** `setup.py` for release preparation, including new classifiers and dependencies. - **Revised** README.md for clarity, including structured command usage and improved descriptions. - **Moved** and improved old documentation, removing outdated content and adding new screenshots. - **Maintained** legacy commands for backward compatibility while enhancing usability with clear examples. - **Removed** non-existent `bcolors` from the public API. - **Upgraded** requirements.txt to include `argcomplete` for command-line completion. - **Updated** docstrings and function documentation for clarity on functionality and parameters.
221 lines
13 KiB
HTML
221 lines
13 KiB
HTML
<!DOCTYPE html>
|
||
|
||
<html lang="en" data-content_root="../">
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||
|
||
<title>Use cases — mediacurator documentation</title>
|
||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=d1102ebc" />
|
||
<link rel="stylesheet" type="text/css" href="../_static/alabaster.css?v=12dfc556" />
|
||
<link rel="stylesheet" type="text/css" href="../_static/custom.css?v=d9b65b63" />
|
||
<script src="../_static/documentation_options.js?v=5929fcd5"></script>
|
||
<script src="../_static/doctools.js?v=9a2dae69"></script>
|
||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||
<link rel="icon" href="../_static/favicon.ico"/>
|
||
<link rel="index" title="Index" href="../genindex.html" />
|
||
<link rel="search" title="Search" href="../search.html" />
|
||
<link rel="next" title="Errors" href="errors.html" />
|
||
<link rel="prev" title="Manual" href="manual.html" />
|
||
|
||
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
|
||
|
||
|
||
|
||
|
||
|
||
</head><body>
|
||
|
||
|
||
<div class="document">
|
||
<div class="documentwrapper">
|
||
<div class="bodywrapper">
|
||
|
||
|
||
<div class="body" role="main">
|
||
|
||
<section id="use-cases">
|
||
<h1>Use cases<a class="headerlink" href="#use-cases" title="Link to this heading">¶</a></h1>
|
||
<div class="admonition warning">
|
||
<p class="admonition-title">Warning</p>
|
||
<p>The following documentation is for versions prior to 1.0.1. It may contain features and usage instructions that are incompatible with the current version of mediacurator.</p>
|
||
</div>
|
||
<p>The main reasons to use mediacurator would be the following:</p>
|
||
<ul class="simple">
|
||
<li><dl class="simple">
|
||
<dt><a class="reference internal" href="#legacy-list-cmd"><span class="std std-ref">Print information</span></a> on a video library such as:</dt><dd><ul>
|
||
<li><p>How many videos of the lot are in HD vs standard or substandard definitions</p></li>
|
||
<li><p>What videos are in older codecs</p></li>
|
||
<li><p>Are there videos in the library with encoding or corruption errors</p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
</li>
|
||
<li><p><a class="reference internal" href="#legacy-purge"><span class="std std-ref">Purge</span></a> selected videos in a media library</p></li>
|
||
<li><p><a class="reference internal" href="#legacy-fferror"><span class="std std-ref">Batch repair encoding errors</span></a> on selected videos in a media library</p></li>
|
||
<li><p><a class="reference internal" href="#legacy-convert"><span class="std std-ref">Batch re-encode</span></a> videos from an old codec to <a class="reference external" href="https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding">High Efficiency Video Coding</a></p></li>
|
||
</ul>
|
||
<section id="print-information">
|
||
<span id="legacy-list-cmd"></span><h2>Print information<a class="headerlink" href="#print-information" title="Link to this heading">¶</a></h2>
|
||
<p>List all videos with old codec in formatted output</p>
|
||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>mediacurator<span class="w"> </span>list<span class="w"> </span>-filters:old<span class="w"> </span>-print:formated<span class="w"> </span>-dirs:<span class="s2">"/mnt/media/"</span>,,<span class="s2">"/mnt/media2/"</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>List all videos with substandard definitions with a formatted output</p>
|
||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>mediacurator<span class="w"> </span>list<span class="w"> </span>-filters:subsd<span class="w"> </span>-print:formated<span class="w"> </span>-dirs:<span class="s2">"/mnt/media/"</span>,,<span class="s2">"/mnt/media2/"</span>
|
||
</pre></div>
|
||
</div>
|
||
</section>
|
||
<section id="purge">
|
||
<span id="legacy-purge"></span><h2>Purge<a class="headerlink" href="#purge" title="Link to this heading">¶</a></h2>
|
||
<p>Please see <a class="reference internal" href="warnings.html"><span class="doc">Warnings</span></a></p>
|
||
<p>List and delete all videos using the <a class="reference external" href="https://en.wikipedia.org/wiki/Windows_Media_Video">Windows Media Video</a> codecs</p>
|
||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>mediacurator<span class="w"> </span>list<span class="w"> </span>--delete<span class="w"> </span>-filters:wmv<span class="w"> </span>-dirs:<span class="s2">"/mnt/media/"</span>,,<span class="s2">"/mnt/media2/"</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>List and delete all videos using <a class="reference external" href="https://en.wikipedia.org/wiki/Audio_Video_Interleave">Audio Video Interleave</a></p>
|
||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>mediacurator<span class="w"> </span>list<span class="w"> </span>--delete<span class="w"> </span>-in:avi<span class="w"> </span>-dirs:<span class="s2">"/mnt/media/"</span>,,<span class="s2">"/mnt/media2/"</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>List and delete any videos with encoding errors</p>
|
||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>mediacurator<span class="w"> </span>list<span class="w"> </span>--delete<span class="w"> </span>-filters:fferror<span class="w"> </span>-dirs:<span class="s2">"/mnt/media/"</span>,,<span class="s2">"/mnt/media2/"</span>
|
||
</pre></div>
|
||
</div>
|
||
</section>
|
||
<section id="batch-repair-encoding-errors">
|
||
<span id="legacy-fferror"></span><h2>Batch repair encoding errors<a class="headerlink" href="#batch-repair-encoding-errors" title="Link to this heading">¶</a></h2>
|
||
<p>List all videos with encoding errors</p>
|
||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>mediacurator<span class="w"> </span>list<span class="w"> </span>-filters:fferror<span class="w"> </span>-dirs:<span class="s2">"/mnt/media/"</span>,,<span class="s2">"/mnt/media2/"</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>List and delete any videos with encoding errors</p>
|
||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>mediacurator<span class="w"> </span>list<span class="w"> </span>--delete<span class="w"> </span>-filters:fferror<span class="w"> </span>-dirs:<span class="s2">"/mnt/media/"</span>,,<span class="s2">"/mnt/media2/"</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>Convert all videos with encoding errors to <a class="reference external" href="https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding">High Efficiency Video Coding</a> and delete the originals</p>
|
||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>mediacurator<span class="w"> </span>convert<span class="w"> </span>--delete<span class="w"> </span>-filters:fferror<span class="w"> </span>-dirs:<span class="s2">"/mnt/media/"</span>,,<span class="s2">"/mnt/media2/"</span>
|
||
</pre></div>
|
||
</div>
|
||
</section>
|
||
<section id="batch-re-encode">
|
||
<span id="legacy-convert"></span><h2>Batch re-encode<a class="headerlink" href="#batch-re-encode" title="Link to this heading">¶</a></h2>
|
||
<p>Convert all videos with old codecs to <a class="reference external" href="https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding">High Efficiency Video Coding</a> to save space and delete the originals</p>
|
||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>mediacurator<span class="w"> </span>convert<span class="w"> </span>--delete<span class="w"> </span>-filters:old<span class="w"> </span>-dirs:<span class="s2">"/mnt/media/"</span>,,<span class="s2">"/mnt/media2/"</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>Convert all videos with the codec mpeg4 to an mkv container using the av1 video codec</p>
|
||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>mediacurator<span class="w"> </span>convert<span class="w"> </span>-filters:mpeg4<span class="w"> </span>-out:av1,mkv<span class="w"> </span>-dirs:<span class="s2">"/mnt/media/"</span>,,<span class="s2">"/mnt/media2/"</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>Convert any video with avi or mpg extensions, print formatted text including ffmpeg’s output, and then delete the originals</p>
|
||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>mediacurator<span class="w"> </span>convert<span class="w"> </span>--delete<span class="w"> </span>-in:avi,mpg<span class="w"> </span>-print:formated,verbose<span class="w"> </span>-dirs:<span class="s2">"/mnt/media/"</span>,,<span class="s2">"/mnt/media2/"</span>
|
||
</pre></div>
|
||
</div>
|
||
</section>
|
||
</section>
|
||
|
||
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
<div class="sphinxsidebar" role="navigation" aria-label="Main">
|
||
<div class="sphinxsidebarwrapper">
|
||
<p class="logo"><a href="../index.html">
|
||
<img class="logo" src="../_static/mclogo4x.png" alt="Logo of mediacurator"/>
|
||
</a></p>
|
||
<h1 class="logo"><a href="../index.html">mediacurator</a></h1>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<h3>Navigation</h3>
|
||
<p class="caption" role="heading"><span class="caption-text">Usage:</span></p>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../usage/warnings.html">Warnings</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../usage/installation.html">Installation</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../usage/quickstart.html">Quickstart</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../usage/manual.html">Manual</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../usage/use_cases.html">Use cases</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../usage/errors.html">Errors</a></li>
|
||
</ul>
|
||
<p class="caption" role="heading"><span class="caption-text">Release Notes:</span></p>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../releasenotes/1.0.1-changelog.html">mediacurator 1.0.1 Release Notes</a></li>
|
||
</ul>
|
||
<p class="caption" role="heading"><span class="caption-text">Legacy Usage:</span></p>
|
||
<ul class="current">
|
||
<li class="toctree-l1"><a class="reference internal" href="warnings.html">Warnings</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="quickstart.html">Quickstart</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="manual.html">Manual</a></li>
|
||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Use cases</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="errors.html">Errors</a></li>
|
||
</ul>
|
||
<p class="caption" role="heading"><span class="caption-text">Legacy Release Notes:</span></p>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="../releasenotes/0.0.13-changelog.html">MediaCurator 0.0.13 Release Notes</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../releasenotes/0.0.12-changelog.html">MediaCurator 0.0.12 Release Notes</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../releasenotes/0.0.11-changelog.html">MediaCurator 0.0.11 Release Notes</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../releasenotes/0.0.10-changelog.html">MediaCurator 0.0.10 Release Notes</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../releasenotes/0.0.9-changelog.html">MediaCurator 0.0.9 Release Notes</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../releasenotes/0.0.8-changelog.html">MediaCurator 0.0.8 Release Notes</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../releasenotes/0.0.7-changelog.html">MediaCurator 0.0.7 Release Notes</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../releasenotes/0.0.6-changelog.html">MediaCurator 0.0.6 Release Notes</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../releasenotes/0.0.5-changelog.html">MediaCurator 0.0.5 Release Notes</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../releasenotes/0.0.4-changelog.html">MediaCurator 0.0.4 Release Notes</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../releasenotes/0.0.1-changelog.html">MediaCurator 0.0.1 Release Notes</a></li>
|
||
</ul>
|
||
|
||
<div class="relations">
|
||
<h3>Related Topics</h3>
|
||
<ul>
|
||
<li><a href="../index.html">Documentation overview</a><ul>
|
||
<li>Previous: <a href="manual.html" title="previous chapter">Manual</a></li>
|
||
<li>Next: <a href="errors.html" title="next chapter">Errors</a></li>
|
||
</ul></li>
|
||
</ul>
|
||
</div>
|
||
<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
||
<input type="submit" value="Go" />
|
||
</form>
|
||
</div>
|
||
</search>
|
||
<script>document.getElementById('searchbox').style.display = "block"</script>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div class="clearer"></div>
|
||
</div>
|
||
<div class="footer">
|
||
©2020, Fabrice Quenneville.
|
||
|
||
|
|
||
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.4.7</a>
|
||
& <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
|
||
|
||
|
|
||
<a href="../_sources/legacy_usage/use_cases.rst.txt"
|
||
rel="nofollow">Page source</a>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
</body>
|
||
</html> |