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.
106 lines
3.2 KiB
ReStructuredText
106 lines
3.2 KiB
ReStructuredText
=========
|
|
Use cases
|
|
=========
|
|
|
|
.. warning::
|
|
|
|
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.
|
|
|
|
The main reasons to use mediacurator would be the following:
|
|
|
|
* :ref:`legacy_list_cmd` on a video library such as:
|
|
- How many videos of the lot are in HD vs standard or substandard definitions
|
|
- What videos are in older codecs
|
|
- Are there videos in the library with encoding or corruption errors
|
|
* :ref:`legacy_purge` selected videos in a media library
|
|
* :ref:`legacy_fferror` on selected videos in a media library
|
|
* :ref:`legacy_convert` videos from an old codec to `High Efficiency Video Coding <https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding>`_
|
|
|
|
.. _legacy_list_cmd:
|
|
|
|
Print information
|
|
-----------------
|
|
|
|
List all videos with old codec in formatted output
|
|
|
|
.. code-block:: bash
|
|
|
|
mediacurator list -filters:old -print:formated -dirs:"/mnt/media/",,"/mnt/media2/"
|
|
|
|
List all videos with substandard definitions with a formatted output
|
|
|
|
.. code-block:: bash
|
|
|
|
mediacurator list -filters:subsd -print:formated -dirs:"/mnt/media/",,"/mnt/media2/"
|
|
|
|
.. _legacy_purge:
|
|
|
|
Purge
|
|
-----
|
|
|
|
Please see :doc:`warnings`
|
|
|
|
List and delete all videos using the `Windows Media Video <https://en.wikipedia.org/wiki/Windows_Media_Video>`_ codecs
|
|
|
|
.. code-block:: bash
|
|
|
|
mediacurator list --delete -filters:wmv -dirs:"/mnt/media/",,"/mnt/media2/"
|
|
|
|
List and delete all videos using `Audio Video Interleave <https://en.wikipedia.org/wiki/Audio_Video_Interleave>`_
|
|
|
|
.. code-block:: bash
|
|
|
|
mediacurator list --delete -in:avi -dirs:"/mnt/media/",,"/mnt/media2/"
|
|
|
|
List and delete any videos with encoding errors
|
|
|
|
.. code-block:: bash
|
|
|
|
mediacurator list --delete -filters:fferror -dirs:"/mnt/media/",,"/mnt/media2/"
|
|
|
|
.. _legacy_fferror:
|
|
|
|
Batch repair encoding errors
|
|
----------------------------
|
|
|
|
List all videos with encoding errors
|
|
|
|
.. code-block:: bash
|
|
|
|
mediacurator list -filters:fferror -dirs:"/mnt/media/",,"/mnt/media2/"
|
|
|
|
List and delete any videos with encoding errors
|
|
|
|
.. code-block:: bash
|
|
|
|
mediacurator list --delete -filters:fferror -dirs:"/mnt/media/",,"/mnt/media2/"
|
|
|
|
Convert all videos with encoding errors to `High Efficiency Video Coding <https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding>`_ and delete the originals
|
|
|
|
.. code-block:: bash
|
|
|
|
mediacurator convert --delete -filters:fferror -dirs:"/mnt/media/",,"/mnt/media2/"
|
|
|
|
.. _legacy_convert:
|
|
|
|
Batch re-encode
|
|
---------------
|
|
|
|
Convert all videos with old codecs to `High Efficiency Video Coding <https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding>`_ to save space and delete the originals
|
|
|
|
.. code-block:: bash
|
|
|
|
mediacurator convert --delete -filters:old -dirs:"/mnt/media/",,"/mnt/media2/"
|
|
|
|
Convert all videos with the codec mpeg4 to an mkv container using the av1 video codec
|
|
|
|
.. code-block:: bash
|
|
|
|
mediacurator convert -filters:mpeg4 -out:av1,mkv -dirs:"/mnt/media/",,"/mnt/media2/"
|
|
|
|
Convert any video with avi or mpg extensions, print formatted text including ffmpeg's output, and then delete the originals
|
|
|
|
.. code-block:: bash
|
|
|
|
mediacurator convert --delete -in:avi,mpg -print:formated,verbose -dirs:"/mnt/media/",,"/mnt/media2/"
|
|
|