diff --git a/README.md b/README.md index fb8cca7..d5e2dab 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ mediacurator is a Python command line tool to manage a media database. -- List all the video’s and their information with or without filters +- List all the videos and their information with or without filters - Batch find and repair/convert videos with encoding errors -- Batch recode videos to more modern codecs (x265 / AV1) based on filters: extentions, codecs, resolutions … +- Batch recode videos to more modern codecs (x265 / AV1) based on filters: extensions, codecs, resolutions … ## Documentation @@ -13,26 +13,58 @@ The documentation is available on the following [link](https://fabquenneville.gi ## Releases mediacurator is released on [PyPi](https://pypi.org/project/mediacurator/). -Instalation instructions are found on the [Github page](https://fabquenneville.github.io/mediacurator/usage/installation.html). +Installation instructions are found on the [GitHub page](https://fabquenneville.github.io/mediacurator/usage/installation.html). ## Usage -mediacurator [list,convert] [-del] [-in:any,avi,mkv,wmv,mpg,mp4,m4v,flv,vid] [-filters:fferror,old,lowres,hd,720p,1080p,uhd,mpeg,mpeg4,x264,wmv3,wmv] [-out:mkv/mp4,x265/av1] [-print:list,formated,verbose] [-dirs/-files:"/mnt/media/",,"/mnt/media2/"] +```bash + mediacurator [options] -> for multiple files or filenames use double comma separated values ",," + # Command options + mediacurator [list convert] [-del/--delete] + [-i/--inputs any 3gp asf avi divx dv f4v flv gif m2ts m4v mkv mov mp4 mpeg mpg mts ogm ogv rm swf ts vid vob webm wmv] + [-fl/--filters fferror old lowres hd 720p 1080p uhd mpeg mpeg4 x264 wmv3 wmv] + [-o/--outputs mkv/mp4 x265/av1] + [-p/--printop list formatted verbose] + [-d/--dirs "/mnt/media/" "/mnt/media2/"] + [-f/--files "file1.ext" "file2.ext"] +``` -default options are: --in:any --filters: --out:mkv,x265 --print:list +**Available commands:** -Examples: +- `list`: List all videos with specified filters. +- `convert`: Convert videos to specified formats. + +**Options:** + +- `-del` or `--delete`: Delete found results after successful operations. **Use with caution**. +- `-i ` or `--inputs `: Specify input file formats (default: `any`). +- `-fl ` or `--filters `: Apply filters to the selection of videos. +- `-o ` or `--outputs `: Specify output formats (default: `mkv`, `x265`). +- `-p ` or `--printop `: Set print options (default: `list`). +- `-f ` or `--files `: Specify files to process. +- `-d ` or `--dirs `: Specify directories to process. + +**For multiple files or filenames, use space-separated values ( ).** + +**Default options (if not specified):** + +- `-i/--inputs`: `any` +- `-fl/--filters`: (none) +- `-o/--outputs`: `mkv`, `x265` +- `-p/--printop`: `list` + +### Examples ```bash -mediacurator list -filters:old -print:formated -dirs:/mnt/media/ >> ../medlist.txt -mediacurator convert -del -filters:mpeg4 -out:av1,mp4 -dirs:"/mnt/media/Movies/" -mediacurator convert -del -in:avi,mpg -print:formated,verbose -dirs:/mnt/media/ +# List all videos with old codecs in formatted output +mediacurator list --filters old --printop formatted --dirs "/mnt/media/" "/mnt/media2/" >> ../medlist.txt + +# Convert all MPEG4 videos to AV1 in MP4 format, and delete originals after conversion +mediacurator convert --delete --filters mpeg4 --outputs av1 mp4 --dirs "/mnt/media/" "/mnt/media2/" + +# Convert videos with AVI or MPG extensions, print formatted and verbose output, and delete originals +mediacurator convert --delete --inputs avi mpg --printop formatted verbose --dirs "/mnt/media/" "/mnt/media2/" ``` ## Contributing diff --git a/docs/_images/Legacy-Screenshot-delete.png b/docs/_images/Legacy-Screenshot-delete.png new file mode 100644 index 0000000..03dc5bb Binary files /dev/null and b/docs/_images/Legacy-Screenshot-delete.png differ diff --git a/docs/_images/Screenshot-delete.png b/docs/_images/Screenshot-delete.png index 03dc5bb..6442b20 100644 Binary files a/docs/_images/Screenshot-delete.png and b/docs/_images/Screenshot-delete.png differ diff --git a/docs/_images/Screenshot-print_formated-single.png b/docs/_images/Screenshot-print_formatted-single.png similarity index 100% rename from docs/_images/Screenshot-print_formated-single.png rename to docs/_images/Screenshot-print_formatted-single.png diff --git a/docs/_sources/index.rst.txt b/docs/_sources/index.rst.txt index ff22aeb..d865c6a 100644 --- a/docs/_sources/index.rst.txt +++ b/docs/_sources/index.rst.txt @@ -1,20 +1,27 @@ -.. mediacurator documentation master file, created by - sphinx-quickstart on Fri Nov 20 22:46:06 2020. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - ======================================== Welcome to mediacurator's documentation! ======================================== mediacurator is a Python command line tool to manage a media database. -* List all the video's and their information with or without filters +* List all the videos and their information with or without filters * Batch find and repair/convert videos with encoding errors -* Batch recode videos to more modern codecs (x265 / AV1) based on filters: extentions, codecs, resolutions ... +* Batch recode videos to more modern codecs (x265 / AV1) based on filters: extensions, codecs, resolutions ... The source code can be found on `GitHub `_ +.. warning:: + + **Breaking changes in version 1.0.1:** + + Starting with version 1.0.1, the command-line interface (CLI) has undergone major changes, and the usage is **not backwards-compatible** with previous versions. + + If you are using `mediacurator < 1.0.1`, please refer to the legacy documentation available below (:ref:`legacy_docs`). + +---------------------------------------- +Documentation +---------------------------------------- + .. toctree:: :maxdepth: 2 :caption: Usage: @@ -31,6 +38,34 @@ The source code can be found on `GitHub `_, as many distributions provide outdated versions in their repositories. +* **Run with Verbose Option**: Execute mediacurator with the verbose print option, which will display the raw FFmpeg output for better troubleshooting. +* **Retry**: In my experience, some errors do not necessarily recur... + +Other Bugs +---------- + +If you encounter other bugs, issues, or would like to suggest features, feel free to open a bug report on `GitHub `_. + +For further assistance, you can reach out through the GitHub repository or the project’s support channels. diff --git a/docs/_sources/legacy_usage/installation.rst.txt b/docs/_sources/legacy_usage/installation.rst.txt new file mode 100644 index 0000000..128d41e --- /dev/null +++ b/docs/_sources/legacy_usage/installation.rst.txt @@ -0,0 +1,45 @@ +============ +Installation +============ + +.. 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. + +This package has been tested on GNU/Linux (e.g., Debian, Ubuntu, Fedora) and Windows, and requires FFmpeg to be installed. For now, it will be distributed on `GitHub `_. + +Install FFmpeg +-------------- + +To install FFmpeg, you can follow the instructions for your platform: + +- **On Debian and Ubuntu**: + .. code-block:: bash + + sudo apt update + sudo apt install ffmpeg + +- **On Fedora**: + .. code-block:: bash + + sudo dnf install ffmpeg + +- **On Windows**: + - Download the latest build from `FFmpeg `_. + - Follow the installation instructions provided on the site. + +To verify your FFmpeg installation, you can run: + +.. code-block:: bash + + ffmpeg -version + + +Install from PyPi +----------------- + +You can install the `mediacurator` package directly from PyPi using the following command: + +.. code-block:: bash + + pip install MediaCurator diff --git a/docs/_sources/legacy_usage/manual.rst.txt b/docs/_sources/legacy_usage/manual.rst.txt new file mode 100644 index 0000000..68178b6 --- /dev/null +++ b/docs/_sources/legacy_usage/manual.rst.txt @@ -0,0 +1,185 @@ +====== +Manual +====== + +.. 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. + +Name +---- + +mediacurator + +Synopsis +-------- + +.. code-block:: bash + + mediacurator [options] + + mediacurator [list,convert] [-del] + [-in:any,avi,divx,flv,m4v,mkv,mp4,mpg,ogm,vid,webm,wmv] + [-filters:fferror,old,lowres,hd,720p,1080p,uhd,mpeg,mpeg4,x264,wmv3,wmv,vob] + [-out:mkv/mp4,x265/av1] + [-print:list,formated,verbose] + [-dirs/-files:"/mnt/media/",,"/mnt/media2/"] + +**Available commands:** +- `list`: List all videos with specified filters. +- `convert`: Convert videos to specified formats. + +**Options:** + +- `-del`: Delete found results after successful operations. **Use with caution**. +- `-in `: Specify input file formats (default: `any`). +- `-filters `: Apply filters to the selection of videos. +- `-out `: Specify output formats (default: `mkv`, `x265`). +- `-print `: Set print options (default: `list`). +- `-files `: Specify files to process. +- `-dirs `: Specify directories to process. + +**For multiple files or filenames, use double comma separated values (,,).** + +**Default options (if not specified):** + +- `-in`: `any` +- `-filters`: (none) +- `-out`: `mkv`, `x265` +- `-print`: `list` + +Description +----------- + +**mediacurator** is a Python command-line tool designed to manage a media database. It allows you to: + +- List all videos and their metadata, optionally filtered by specified criteria. +- Batch find, repair, or convert videos with encoding errors. +- Batch recode videos to modern codecs (e.g., x265, AV1) based on filters (e.g., container, codec, resolution). + +Options +------- + +list +==== + Search and list videos filtered by the user-provided parameters. + +convert +======= + Search and convert all videos filtered by the user-provided parameters. + +-del: +===== + Deletes the original videos after successful completion of operations (e.g., conversion or listing). **Use with caution**. + + See :doc:`warnings` + +-in: +==== + [**any**, avi, divx, flv, m4v, mkv, mp4, mpg, ogm, vid, webm, wmv] + + Filters videos by file format (container extensions). The default is `any`, meaning all formats are included. + +-filters: +========= + [fferror, old, lowres, hd, 720p, 1080p, uhd, mpeg, mpeg4, x264, wmv3, wmv] + + Filters videos based on specific criteria: + + - **fferror**: Select videos with encoding errors (see :doc:`errors`) + - **old**: Select videos using outdated codecs (anything except hevc or av1) + - **hd**: Select videos in HD (720p, 1080p, UHD) + - **lowres**: Select videos that are not in HD + - **uhd**: Select Ultra-HD videos (width or height >= 2160) + - **1080p**: Select Full-HD videos (1440 <= width < 2160 or 1080 <= height < 2160) + - **720p**: Select HD videos (1280 <= width < 1440 or 720 <= height < 1080) + - **sd**: Select standard-definition videos (480 <= height < 720) + - **subsd**: Select substandard-definition videos (height < 480) + - **mpeg, mpeg4, x264, wmv3, wmv, vob**: Filter by video codec + +-out: +===== + [**mkv**/mp4, x265/av1] + + Specifies the output format for video conversions: + + - **mkv**: (**Default**) Package the output video in a `Matroska `_ container. + - **mp4**: Package the output video in an MP4 container. + - **x265** or **hevc**: (**Default**) Encode the video using `x265 `_ (HEVC). + - **av1**: Encode the video using `AOMedia Video 1 `_ (AV1). + +-print: +======= + [**list**, formated, verbose] + + Specifies how the output should be displayed: + + - **list**: (**Default**) Prints video info in a concise, single-line format. + + .. image:: ../_static/Screenshot-print_list-single.png + :width: 600 + :alt: List videos (single-line output) + + - **formated**: Prints video info in a more readable format with line breaks. + + .. image:: ../_static/Screenshot-print_formatted-single.png + :width: 400 + :alt: List videos (formatted output) + + - **verbose**: Prints the FFmpeg output during conversions. + +-dirs: +====== + ["/mnt/media/",,"/mnt/media2/"] + + Specifies directories to scan, separated by **double commas** (,,). + +-files: +======= + ["/mnt/media/video.avi",,"/mnt/media2/video2.mp4"] + + Specifies individual video files to process, separated by **double commas** (,,). + +Examples +-------- + +.. code-block:: bash + + # This command lists all videos in the specified directories that use old codecs and + # formats the output. + mediacurator list -filters:old -print:formated -dirs:"/mnt/media/",,"/mnt/media2/" + + # This command converts all MPEG4 videos found in the specified directories to AV1 format + # in MP4 containers and deletes the originals. + mediacurator convert -del -filters:mpeg4 -out:av1,mp4 -dirs:"/mnt/media/",,"/mnt/media2/" + + # This command converts AVI or MPG videos, displays detailed output during conversion, and + # deletes originals. + mediacurator convert -del -in:avi,mpg -print:formated,verbose -dirs:"/mnt/media/",,"/mnt/media2/" + +For more examples, see :doc:`use_cases` + +See Also +-------- + +- `FFmpeg `_ + +Glossary +-------- + +- **Codec**: A program or device that compresses and decompresses digital media. +- **Container**: A file format that holds video, audio, and metadata. +- **UHD**: Ultra High Definition, refers to video resolutions of 3840x2160 pixels or higher. + +Error Handling +-------------- + +Common issues users might encounter include: + +- **Encoding Errors**: If videos have encoding errors, they can be filtered using the `-filters fferror` option. +- **Unsupported Formats**: Ensure that input formats specified in `-in` are supported by mediacurator. + +Author +------ + +Fabrice Quenneville diff --git a/docs/_sources/legacy_usage/quickstart.rst.txt b/docs/_sources/legacy_usage/quickstart.rst.txt new file mode 100644 index 0000000..83cefaa --- /dev/null +++ b/docs/_sources/legacy_usage/quickstart.rst.txt @@ -0,0 +1,40 @@ +========== +Quickstart +========== + +.. 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. + +.. code-block:: bash + + mediacurator [list,convert] [-del] + [-in:any,avi,mkv,wmv,mpg,mp4,m4v,flv,vid,divx,ogm,webm] + [-filters:fferror,old,lowres,hd,720p,1080p,uhd,mpeg,mpeg4,x264,wmv3,wmv] + [-out:mkv/mp4,x265/av1] + [-print:list,formated,verbose] + [-dirs/-files:"/mnt/media/",,"/mnt/media2/"] + +**for multiple files or filenames use double comma separated values ",,"** + +default options are: + +.. code-block:: bash + + -in:any + -filters: + -out:mkv,x265 + -print:list + +Examples: + +.. code-block:: bash + + # List all videos with old codec in formated format + mediacurator list -filters:old -print:formated -dirs:/mnt/media/ >> ../medlist.txt + # Convert all videos with the codec mpeg4 in a mp4 using the av1 video codec and the delete the originals + mediacurator convert -del -filters:mpeg4 -out:av1,mp4 -dirs:"/mnt/media/Movies/" + # Convert any video with avi or mpg extensions, print formated text including ffmpeg's output and then delete the originals + mediacurator convert -del -in:avi,mpg -print:formated,verbose -dirs:/mnt/media/ + +More examples in :doc:`use_cases` \ No newline at end of file diff --git a/docs/_sources/legacy_usage/use_cases.rst.txt b/docs/_sources/legacy_usage/use_cases.rst.txt new file mode 100644 index 0000000..9fa3d82 --- /dev/null +++ b/docs/_sources/legacy_usage/use_cases.rst.txt @@ -0,0 +1,106 @@ +========= +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 `_ + +.. _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 `_ codecs + +.. code-block:: bash + + mediacurator list --delete -filters:wmv -dirs:"/mnt/media/",,"/mnt/media2/" + +List and delete all videos using `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 `_ 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 `_ 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/" + \ No newline at end of file diff --git a/docs/_sources/legacy_usage/warnings.rst.txt b/docs/_sources/legacy_usage/warnings.rst.txt new file mode 100644 index 0000000..d58bda3 --- /dev/null +++ b/docs/_sources/legacy_usage/warnings.rst.txt @@ -0,0 +1,67 @@ +======== +Warnings +======== + +.. 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. + +.. warning:: + + Before using the **delete feature**, we strongly recommend running several dry runs to get acquainted with `mediacurator`, as incorrect usage can cause irreversible damage to your media library. + +The `-del` flag will **permanently delete** files, so it is crucial to ensure that the command is executed correctly. Below are some examples of how the delete feature works. + +Example use Cases for the `-del` Flag +----------------------------------------- + +1. **Delete all non-HD (low-resolution) videos in a folder:** + +.. code-block:: bash + + mediacurator list -del -filters:lowres -dirs:"/mnt/media/" + +2. **Delete all substandard quality videos in a folder:** + +.. code-block:: bash + + mediacurator list -del -filters:subsd -dirs:"/mnt/media/" + +.. image:: ../_static/Legacy-Screenshot-delete.png + :width: 600 + :alt: Deleting videos + +3. **Delete all videos in a folder with encoding errors:** + +.. code-block:: bash + + mediacurator list -del -filters:fferror -dirs:"/mnt/media/" + +4. **Convert (repair) and then delete all videos in a folder with encoding errors:** + +.. code-block:: bash + + mediacurator convert -del -filters:fferror -dirs:"/mnt/media/" + +5. **Delete all videos in a folder:** + +.. code-block:: bash + + mediacurator list -del -filters:lowres -dirs:"/mnt/media/" + +Important Notes +--------------- + +- **Irreversibility**: All of these commands involve permanent deletion. Once a file is deleted using the `-del` flag, it cannot be recovered. +- **Run without `-del` first**: Always perform several dry runs by omitting the `-del` flag to ensure that the correct files are selected for deletion. Familiarizing yourself with the tool before using destructive commands is essential to avoid unintended consequences. +- **Specific File Selection**: If you're unsure about applying filters to an entire directory, you can use the `-files` option to target individual files for deletion or conversion, further reducing the risk of unintended deletions. +- **Backup Recommendation**: Before running any commands with the `-del` flag, it is a good practice to back up your media library or the specific directories being processed, especially if they contain valuable or irreplaceable files. + +Dry run example (without deletion) +---------------------------------- + +.. code-block:: bash + + mediacurator list -filters:lowres -dirs:"/mnt/media/" + +Make sure you carefully verify the output and files selected during the dry runs to prevent accidental data loss. diff --git a/docs/_sources/releasenotes/1.0.1-changelog.rst.txt b/docs/_sources/releasenotes/1.0.1-changelog.rst.txt index e67255c..6a802f3 100644 --- a/docs/_sources/releasenotes/1.0.1-changelog.rst.txt +++ b/docs/_sources/releasenotes/1.0.1-changelog.rst.txt @@ -34,9 +34,11 @@ New Features Improvements ============ +* Added line break in conversion output before each video to improve readability. * Standardized audio, subtitle and metadata copying. * Added support for .mov and .ts formats. * Introduced CRF (Constant Rate Factor) settings for AV1 and x265 for better control over quality and file size. +* Implemented handling for odd pixel dimensions by adding black pixel padding to ensure even width and height. Changes ======= diff --git a/docs/_sources/usage/errors.rst.txt b/docs/_sources/usage/errors.rst.txt index 77522a1..3b0e697 100644 --- a/docs/_sources/usage/errors.rst.txt +++ b/docs/_sources/usage/errors.rst.txt @@ -1,37 +1,37 @@ - ====== Errors ====== -FFmpeg can detect quite a few errors in the encoding of your source video's encoding. It can also be used to repair errors. +FFmpeg can detect quite a few errors in the encoding of your source video's encoding and can also be used to repair these errors. -Repairable encoding errors +Repairable Encoding Errors -------------------------- Here are some example errors that mediacurator will print and can possibly repair by re-encoding: -* "Referenced QT chapter track not found" -* "Error, header damaged or not MPEG-4 header" -* "Header missing" -* "SEI type" -* "no frame!" -* "Error while decoding MPEG audio frame." -* "big_values too big" +* **"Referenced QT chapter track not found"**: Indicates that the video references a chapter that doesn't exist. +* **"Error, header damaged or not MPEG-4 header"**: The file's header is corrupted or missing. +* **"Header missing"**: The file lacks the necessary header information for decoding. +* **"SEI type"**: Issues related to SEI (Supplemental Enhancement Information) data. +* **"no frame!"**: No video frames available for processing. +* **"Error while decoding MPEG audio frame."**: Issues decoding the audio stream. +* **"big_values too big"**: Indicates that certain values in the file are larger than expected. * ... -FFmpeg issues +FFmpeg Issues ------------- -While using FFmpeg depending on your version you may also face other errors like segfaults. mediacurator will also print information when that occurs and move on to the next video after cleaning up after failure. +While using FFmpeg, you may encounter other errors (such as segfaults) depending on your version. Mediacurator will also print information when that occurs and will move on to the next video after cleaning up any failures. -If that happens there are a few steps you can take: +If you experience these errors, consider the following steps: +* **Update FFmpeg**: Ensure you are using the latest version by downloading it from `ffmpeg.org `_, as many distributions provide outdated versions in their repositories. +* **Run with Verbose Option**: Execute mediacurator with the verbose print option, which will display the raw FFmpeg output for better troubleshooting. +* **Retry**: In my experience, some errors do not necessarily recur... -* `Update FFmpeg `_ to its latest version as it is a very active project and most distributions serve old versions in their repositories -* Run mediacurator with the verbose print option wich will print the raw FFmpeg output -* Try again: In my experience some errors don't necessarly recur... - -Other bugs +Other Bugs ---------- -If you face other bugs, issues or want to suggest features feel free to open a bug report on `GitHub `_ \ No newline at end of file +If you encounter other bugs, issues, or would like to suggest features, feel free to open a bug report on `GitHub `_. + +For further assistance, you can reach out through the GitHub repository or the project’s support channels. diff --git a/docs/_sources/usage/installation.rst.txt b/docs/_sources/usage/installation.rst.txt index c6fbf9c..ac5ea94 100644 --- a/docs/_sources/usage/installation.rst.txt +++ b/docs/_sources/usage/installation.rst.txt @@ -2,17 +2,40 @@ Installation ============ -This package has only been tested on GNU/Linux & Windows and requires FFMPEG installed. For now it will be distributed on `GitHub `_ +This package has been tested on GNU/Linux (e.g., Debian, Ubuntu, Fedora) and Windows, and requires FFmpeg to be installed. For now, it will be distributed on `GitHub `_. Install FFmpeg -------------- -`Download FFmpeg `_ +To install FFmpeg, you can follow the instructions for your platform: + +- **On Debian and Ubuntu**: + .. code-block:: bash + + sudo apt update + sudo apt install ffmpeg + +- **On Fedora**: + .. code-block:: bash + + sudo dnf install ffmpeg + +- **On Windows**: + - Download the latest build from `FFmpeg `_. + - Follow the installation instructions provided on the site. + +To verify your FFmpeg installation, you can run: + +.. code-block:: bash + + ffmpeg -version + Install from PyPi ----------------- +You can install the `mediacurator` package directly from PyPi using the following command: + .. code-block:: bash - :linenos: pip install mediacurator diff --git a/docs/_sources/usage/manual.rst.txt b/docs/_sources/usage/manual.rst.txt index bb82509..0200c7f 100644 --- a/docs/_sources/usage/manual.rst.txt +++ b/docs/_sources/usage/manual.rst.txt @@ -12,134 +12,183 @@ Synopsis .. code-block:: bash - mediacurator [list,convert] [-del] - [-in:any,avi,mkv,wmv,mpg,mp4,m4v,flv,vid,divx,ogm,webm] - [-filters:fferror,old,lowres,hd,720p,1080p,uhd,mpeg,mpeg4,x264,wmv3,wmv,vob] - [-out:mkv/mp4,x265/av1] - [-print:list,formated,verbose] - [-dirs/-files:"/mnt/media/",,"/mnt/media2/"] + mediacurator [options] + mediacurator [list convert] [-del/--delete] + [-i/--inputs any 3gp asf avi divx dv f4v flv gif m2ts m4v mkv mov mp4 mpeg mpg mts ogm ogv rm swf ts vid vob webm wmv] + [-fl/--filters fferror old lowres hd 720p 1080p uhd mpeg mpeg4 x264 wmv3 wmv] + [-o/--outputs mkv/mp4 x265/av1] + [-p/--printop list formatted verbose] + [-d/--dirs "/mnt/media/" "/mnt/media2/"] + [-f/--files "file1.ext" "file2.ext"] -**for multiple files or filenames use double comma separated values ",,"** +**Available commands:** +- `list`: List all videos with specified filters. +- `convert`: Convert videos to specified formats. -default options are: +**Options:** -.. code-block:: bash +- `-del` or `--delete`: Delete found results after successful operations. **Use with caution**. +- `-i ` or `--inputs `: Specify input file formats (default: `any`). +- `-fl ` or `--filters `: Apply filters to the selection of videos. +- `-o ` or `--outputs `: Specify output formats (default: `mkv`, `x265`). +- `-p ` or `--printop `: Set print options (default: `list`). +- `-f ` or `--files `: Specify files to process. +- `-d ` or `--dirs `: Specify directories to process. - -in:any - -filters: - -out:mkv,x265 - -print:list +**For multiple files or filenames, use space-separated values ( ).** + +**Default options (if not specified):** + +- `-i/--inputs`: `any` +- `-fl/--filters`: (none) +- `-o/--outputs`: `mkv`, `x265` +- `-p/--printop`: `list` Description ----------- -mediacurator is a Python command line tool to manage a media database. +**mediacurator** is a Python command-line tool designed to manage a media database. It allows you to: -* List all the video's and their information with or without filters -* Batch find and repair/convert videos with encoding errors -* Batch recode videos to more modern codecs (x265 / AV1) based on filters: extentions, codecs, resolutions ... +- List all videos and their metadata, optionally filtered by specified criteria. +- Batch find, repair, or convert videos with encoding errors. +- Batch recode videos to modern codecs (e.g., x265, AV1) based on filters (e.g., container, codec, resolution). Options ------- list ==== -Search and list videos filtered by the parameters passed by the user. + Search and list videos filtered by the user-provided parameters. convert ======= -Search and convert all videos filtered by the parameters passed by the user. + Search and convert all videos filtered by the user-provided parameters. --del: -===== -Delete all original videos once selected operations have been done succefully. +--delete +======== + Short form: `-del` -See :doc:`warnings` + Deletes the original videos after successful completion of operations (e.g., conversion or listing). **Use with caution**. --in: -==== -[**any**,avi,mkv,wmv,mpg,mp4,m4v,flv,vid,divx,ogm] + See :doc:`warnings` -Search all videos of the selected container **extensions** in the directories. By default it will include any file format. +--inputs +======== + Short form: `-i` --filters: + [**any**, 3gp, asf, avi, divx, dv, f4v, flv, gif, m2ts, m4v, mkv, mov, mp4, mpeg, mpg, mts, ogm, ogv, rm, swf, ts, vid, vob, webm, wmv] + + Filters videos by file format (container extensions). The default is `any`, meaning all formats are included. + +--filters ========= -[fferror,old,lowres,hd,720p,1080p,uhd,mpeg,mpeg4,x264,wmv3,wmv] + Short form: `-fl` -Filter the selected videos for parameters: + [fferror, old, lowres, hd, 720p, 1080p, uhd, mpeg, mpeg4, x264, wmv3, wmv] -* fferror: Select all videos with encoding errors (See :doc:`errors`) -* old: Select all videos using old codecs (Everything except hevc or av1) -* hd: 720p, 1080p, uhd -* lowres: Everything not hd -* uhd: if width >= 2160 or height >= 2160 -* 1080p: if less than uhd and width >= 1440 or height >= 1080 -* 720p: if less than 1080p and width >= 1280 or height >= 720: -* sd: if less than 720p and if height >= 480 -* subsd: Substandard definitions: Everything under 480p -* mpeg,mpeg4,x264,wmv3,wmv,vob: Filter for videos encoded in the requested video codec + Filters videos based on specific criteria: --out: -===== -[**mkv**/mp4,x265/av1] + - **fferror**: Select videos with encoding errors (see :doc:`errors`) + - **old**: Select videos using outdated codecs (anything except hevc or av1) + - **hd**: Select videos in HD (720p, 1080p, UHD) + - **lowres**: Select videos that are not in HD + - **uhd**: Select Ultra-HD videos (width or height >= 2160) + - **1080p**: Select Full-HD videos (1440 <= width < 2160 or 1080 <= height < 2160) + - **720p**: Select HD videos (1280 <= width < 1440 or 720 <= height < 1080) + - **sd**: Select standard-definition videos (480 <= height < 720) + - **subsd**: Select substandard-definition videos (height < 480) + - **mpeg, mpeg4, x264, wmv3, wmv, vob**: Filter by video codec -Select the outputs for the video conversions +--outputs +========= + Short form: `-o` -* mkv: (**Default**) Package the resulting video in a `Matroska `_ container. -* mp4: Package the resulting video in a container. -* x265/hevc: (**Default**) Encode the video using the `x265 `_ compression format. -* av1: Encode the video using the `AOMedia Video 1 `_ compression format. This will be used as default once the developpers at FFmpeg move it out of `experimental `_ . + [**mkv**/mp4, x265/av1] --print: -======= -[**list**,formated,verbose] + Specifies the output format for video conversions: -* list: (**Default**) Print the information about the videos on a single line + - **mkv**: (**Default**) Package the output video in a `Matroska `_ container. + - **mp4**: Package the output video in an MP4 container. + - **x265** or **hevc**: (**Default**) Encode the video using `x265 `_ (HEVC). + - **av1**: Encode the video using `AOMedia Video 1 `_ (AV1). -.. image:: ../_static/Screenshot-print_list-single.png - :width: 600 - :alt: Deleting videos +--printop +========= + Short form: `-p` -* formated: Print the information in an aerated format + [**list**, formatted, verbose] -.. image:: ../_static/Screenshot-print_formated-single.png - :width: 400 - :alt: Deleting videos + Specifies how the output should be displayed: -* verbose: Print the FFmpeg output during the video conversions + - **list**: (**Default**) Prints video info in a concise, single-line format. --dirs: + .. image:: ../_static/Screenshot-print_list-single.png + :width: 600 + :alt: List videos (single-line output) + + - **formatted**: Prints video info in a more readable format with line breaks. + + .. image:: ../_static/Screenshot-print_formatted-single.png + :width: 400 + :alt: List videos (formatted output) + + - **verbose**: Prints the FFmpeg output during conversions. + +--dirs ====== -["/mnt/media/",,"/mnt/media2/"] + Short form: `-d` -The directories to scan as a **double comma** separated values list. + ["/mnt/media/", "/mnt/media2/"] + Specifies directories to scan, separated by spaces. --files: +--files ======= -["/mnt/media/video.avi",,"/mnt/media2/video2.mp4"] + Short form: `-f` -Specific videos to include as a **double comma** separated values list. + ["/mnt/media/video.avi", "/mnt/media2/video2.mp4"] + + Specifies individual video files to process, separated by spaces. Examples -------- .. code-block:: bash - # List all videos with old codec in formated format - mediacurator list -filters:old -print:formated -dirs:/mnt/media/ >> ../medlist.txt - # Convert all videos with the codec mpeg4 in a mp4 using the av1 video codec and the delete the originals - mediacurator convert -del -filters:mpeg4 -out:av1,mp4 -dirs:"/mnt/media/Movies/" - # Convert any video with avi or mpg extensions, print formated text including ffmpeg's output and then delete the originals - mediacurator convert -del -in:avi,mpg -print:formated,verbose -dirs:/mnt/media/ + # This command lists all videos in the specified directories that use old codecs and + # formats the output. + mediacurator list --filters old --printop formatted --dirs "/mnt/media/" "/mnt/media2/" + + # This command converts all MPEG4 videos found in the specified directories to AV1 format + # in MP4 containers and deletes the originals. + mediacurator convert --delete --filters mpeg4 --outputs av1 mp4 --dirs "/mnt/media/" "/mnt/media2/" + + # This command converts AVI or MPG videos, displays detailed output during conversion, and + # deletes originals. + mediacurator convert --delete --inputs avi mpg --printop formatted verbose --dirs "/mnt/media/" "/mnt/media2/" -More examples in :doc:`use_cases` +For more examples, see :doc:`use_cases` See Also -------- -`FFmpeg `_ +- `FFmpeg `_ + +Glossary +-------- + +- **Codec**: A program or device that compresses and decompresses digital media. +- **Container**: A file format that holds video, audio, and metadata. +- **UHD**: Ultra High Definition, refers to video resolutions of 3840x2160 pixels or higher. + +Error Handling +-------------- + +Common issues users might encounter include: + +- **Encoding Errors**: If videos have encoding errors, they can be filtered using the `--filters fferror` option. +- **Unsupported Formats**: Ensure that input formats specified in `--inputs` are supported by mediacurator. Author ------ diff --git a/docs/_sources/usage/quickstart.rst.txt b/docs/_sources/usage/quickstart.rst.txt index 86cf42c..c4424dc 100644 --- a/docs/_sources/usage/quickstart.rst.txt +++ b/docs/_sources/usage/quickstart.rst.txt @@ -2,35 +2,56 @@ Quickstart ========== -.. code-block:: bash - - mediacurator [list,convert] [-del] - [-in:any,avi,mkv,wmv,mpg,mp4,m4v,flv,vid,divx,ogm,webm] - [-filters:fferror,old,lowres,hd,720p,1080p,uhd,mpeg,mpeg4,x264,wmv3,wmv] - [-out:mkv/mp4,x265/av1] - [-print:list,formated,verbose] - [-dirs/-files:"/mnt/media/",,"/mnt/media2/"] - -**for multiple files or filenames use double comma separated values ",,"** - -default options are: +To use `mediacurator`, execute the following command structure: .. code-block:: bash - -in:any - -filters: - -out:mkv,x265 - -print:list + mediacurator [options] -Examples: + mediacurator [list convert] [-del/--delete] + [-i/--inputs any 3gp asf avi divx dv f4v flv gif m2ts m4v mkv mov mp4 mpeg mpg mts ogm ogv rm swf ts vid vob webm wmv] + [-fl/--filters fferror old lowres hd 720p 1080p uhd mpeg mpeg4 x264 wmv3 wmv] + [-o/--outputs mkv/mp4 x265/av1] + [-p/--printop list formatted verbose] + [-d/--dirs "/mnt/media/" "/mnt/media2/"] + [-f/--files "file1.ext" "file2.ext"] + +**Available commands:** +- `list`: List all videos with specified filters. +- `convert`: Convert videos to specified formats. + +**Options:** + +- `-del` or `--delete`: Delete found results after successful operations. +- `-i ` or `--inputs `: Specify input file formats (default: `any`). +- `-fl ` or `--filters `: Apply filters to the selection of videos. +- `-o ` or `--outputs `: Specify output formats (default: `mkv`, `x265`). +- `-p ` or `--printop `: Set print options (default: `list`). +- `-f ` or `--files `: Specify files to process. +- `-d ` or `--dirs `: Specify directories to process. + +**For multiple files or filenames, use space-separated values ( ).** + +**Default options:** + +- `-i/--inputs any` +- `-fl/--filters` +- `-o/--outputs mkv x265` +- `-p/--printop list` + +**Examples:** + +The following examples demonstrate how to use `mediacurator` with the options listed above: .. code-block:: bash - # List all videos with old codec in formated format - mediacurator list -filters:old -print:formated -dirs:/mnt/media/ >> ../medlist.txt - # Convert all videos with the codec mpeg4 in a mp4 using the av1 video codec and the delete the originals - mediacurator convert -del -filters:mpeg4 -out:av1,mp4 -dirs:"/mnt/media/Movies/" - # Convert any video with avi or mpg extensions, print formated text including ffmpeg's output and then delete the originals - mediacurator convert -del -in:avi,mpg -print:formated,verbose -dirs:/mnt/media/ + # List all videos with an old codec in formatted format + mediacurator list --filters old --printop formatted --dirs /mnt/media/ >> ../medlist.txt -More examples in :doc:`use_cases` \ No newline at end of file + # Convert all videos with the MPEG4 codec to MP4 using the AV1 codec and delete the originals + mediacurator convert --delete --filters mpeg4 --outputs av1,mp4 --dirs "/mnt/media/Movies/" + + # Convert any video with AVI or MPG extensions, print formatted text including FFmpeg's output, and then delete the originals + mediacurator convert --delete --inputs avi,mpg --printop formatted,verbose --dirs /mnt/media/ + +For more examples, see :doc:`use_cases`. diff --git a/docs/_sources/usage/use_cases.rst.txt b/docs/_sources/usage/use_cases.rst.txt index 7e22b57..0e39f15 100644 --- a/docs/_sources/usage/use_cases.rst.txt +++ b/docs/_sources/usage/use_cases.rst.txt @@ -17,18 +17,17 @@ The main reasons to use mediacurator would be the following: Print information ----------------- -List all videos with old codec in formated format +List all videos with old codec in formatted output .. code-block:: bash - mediacurator list -filters:old -dirs:/mnt/media/ + mediacurator list --filters old --printop formatted --dirs "/mnt/media/" "/mnt/media2/" -List all videos with substandard definitions with a formated output +List all videos with substandard definitions with a formatted output .. code-block:: bash - mediacurator list -filters:subsd -print:formated -dirs:/mnt/media/ - + mediacurator list --filters subsd --printop formatted --dirs "/mnt/media/" "/mnt/media2/" .. _purge: @@ -41,21 +40,19 @@ List and delete all videos using the `Windows Media Video `_ +List and delete all videos using `Audio Video Interleave `_ .. code-block:: bash - mediacurator list -del -in:avi -dirs:/mnt/media/ + mediacurator list --delete --inputs avi --dirs "/mnt/media/" "/mnt/media2/" List and delete any videos with encoding errors .. code-block:: bash - mediacurator list -del -filters:fferror -dirs:/mnt/media/ - - + mediacurator list --delete --filters fferror --dirs "/mnt/media/" "/mnt/media2/" .. _fferror: @@ -66,20 +63,19 @@ List all videos with encoding errors .. code-block:: bash - mediacurator list -filters:fferror -dirs:/mnt/media/ + mediacurator list --filters fferror --dirs "/mnt/media/" "/mnt/media2/" List and delete any videos with encoding errors .. code-block:: bash - mediacurator list -del -filters:fferror -dirs:/mnt/media/ + mediacurator list --delete --filters fferror --dirs "/mnt/media/" "/mnt/media2/" -Convert all videos with encoding errors to `High Efficiency Video Coding `_ and the delete the originals +Convert all videos with encoding errors to `High Efficiency Video Coding `_ and delete the originals .. code-block:: bash - mediacurator convert -del -filters:fferror -dirs:"/mnt/media/Movies/" - + mediacurator convert --delete --filters fferror --dirs "/mnt/media/" "/mnt/media2/" .. _convert: @@ -90,16 +86,16 @@ Convert all videos with old codecs to `High Efficiency Video Coding Index — mediacurator documentation - + @@ -70,6 +70,18 @@

Release Notes:

+

Legacy Usage:

+ +

Legacy Release Notes:

+ @@ -81,6 +96,30 @@

Release Notes:

+ +
+ +
+

Legacy Documentation (Pre 1.0)

+
+

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.

+
+ + +
@@ -128,6 +168,18 @@

Release Notes:

+

Legacy Usage:

+ +

Legacy Release Notes:

+
  • MediaCurator 0.0.13 Release Notes
  • MediaCurator 0.0.12 Release Notes
  • MediaCurator 0.0.11 Release Notes
  • diff --git a/docs/legacy_usage/errors.html b/docs/legacy_usage/errors.html new file mode 100644 index 0000000..511d73d --- /dev/null +++ b/docs/legacy_usage/errors.html @@ -0,0 +1,179 @@ + + + + + + + + Errors — mediacurator documentation + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + +
    + +
    +

    Errors

    +
    +

    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.

    +
    +

    FFmpeg can detect quite a few errors in the encoding of your source video’s encoding and can also be used to repair these errors.

    +
    +

    Repairable Encoding Errors

    +

    Here are some example errors that mediacurator will print and can possibly repair by re-encoding:

    +
      +
    • “Referenced QT chapter track not found”: Indicates that the video references a chapter that doesn’t exist.

    • +
    • “Error, header damaged or not MPEG-4 header”: The file’s header is corrupted or missing.

    • +
    • “Header missing”: The file lacks the necessary header information for decoding.

    • +
    • “SEI type”: Issues related to SEI (Supplemental Enhancement Information) data.

    • +
    • “no frame!”: No video frames available for processing.

    • +
    • “Error while decoding MPEG audio frame.”: Issues decoding the audio stream.

    • +
    • “big_values too big”: Indicates that certain values in the file are larger than expected.

    • +
    • +
    +
    +
    +

    FFmpeg Issues

    +

    While using FFmpeg, you may encounter other errors (such as segfaults) depending on your version. Mediacurator will also print information when that occurs and will move on to the next video after cleaning up any failures.

    +

    If you experience these errors, consider the following steps:

    +
      +
    • Update FFmpeg: Ensure you are using the latest version by downloading it from ffmpeg.org, as many distributions provide outdated versions in their repositories.

    • +
    • Run with Verbose Option: Execute mediacurator with the verbose print option, which will display the raw FFmpeg output for better troubleshooting.

    • +
    • Retry: In my experience, some errors do not necessarily recur…

    • +
    +
    +
    +

    Other Bugs

    +

    If you encounter other bugs, issues, or would like to suggest features, feel free to open a bug report on GitHub.

    +

    For further assistance, you can reach out through the GitHub repository or the project’s support channels.

    +
    +
    + + +
    + +
    +
    + +
    +
    + + + + + + + \ No newline at end of file diff --git a/docs/legacy_usage/installation.html b/docs/legacy_usage/installation.html new file mode 100644 index 0000000..b6dc01f --- /dev/null +++ b/docs/legacy_usage/installation.html @@ -0,0 +1,185 @@ + + + + + + + + Installation — mediacurator documentation + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + +
    + +
    +

    Installation

    +
    +

    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.

    +
    +

    This package has been tested on GNU/Linux (e.g., Debian, Ubuntu, Fedora) and Windows, and requires FFmpeg to be installed. For now, it will be distributed on GitHub.

    +
    +

    Install FFmpeg

    +

    To install FFmpeg, you can follow the instructions for your platform:

    +
      +
    • +
      On Debian and Ubuntu:
      sudo apt update
      +sudo apt install ffmpeg
      +
      +
      +
      +
      +
    • +
    • +
      On Fedora:
      sudo dnf install ffmpeg
      +
      +
      +
      +
      +
    • +
    • On Windows: +- Download the latest build from FFmpeg. +- Follow the installation instructions provided on the site.

    • +
    +

    To verify your FFmpeg installation, you can run:

    +
    ffmpeg -version
    +
    +
    +
    +
    +

    Install from PyPi

    +

    You can install the mediacurator package directly from PyPi using the following command:

    +
    pip install MediaCurator
    +
    +
    +
    +
    + + +
    + +
    +
    + +
    +
    + + + + + + + \ No newline at end of file diff --git a/docs/legacy_usage/manual.html b/docs/legacy_usage/manual.html new file mode 100644 index 0000000..216a067 --- /dev/null +++ b/docs/legacy_usage/manual.html @@ -0,0 +1,334 @@ + + + + + + + + Manual — mediacurator documentation + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + +
    + +
    +

    Manual

    +
    +

    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.

    +
    +
    +

    Name

    +

    mediacurator

    +
    +
    +

    Synopsis

    +
    mediacurator <command> [options]
    +
    +mediacurator [list,convert] [-del]
    +    [-in:any,avi,divx,flv,m4v,mkv,mp4,mpg,ogm,vid,webm,wmv]
    +    [-filters:fferror,old,lowres,hd,720p,1080p,uhd,mpeg,mpeg4,x264,wmv3,wmv,vob]
    +    [-out:mkv/mp4,x265/av1]
    +    [-print:list,formated,verbose]
    +    [-dirs/-files:"/mnt/media/",,"/mnt/media2/"]
    +
    +
    +

    Available commands: +- list: List all videos with specified filters. +- convert: Convert videos to specified formats.

    +

    Options:

    +
      +
    • -del: Delete found results after successful operations. Use with caution.

    • +
    • -in <input>: Specify input file formats (default: any).

    • +
    • -filters <filter>: Apply filters to the selection of videos.

    • +
    • -out <output>: Specify output formats (default: mkv, x265).

    • +
    • -print <print_option>: Set print options (default: list).

    • +
    • -files <file>: Specify files to process.

    • +
    • -dirs <directory>: Specify directories to process.

    • +
    +

    For multiple files or filenames, use double comma separated values (,,).

    +

    Default options (if not specified):

    +
      +
    • -in: any

    • +
    • -filters: (none)

    • +
    • -out: mkv, x265

    • +
    • -print: list

    • +
    +
    +
    +

    Description

    +

    mediacurator is a Python command-line tool designed to manage a media database. It allows you to:

    +
      +
    • List all videos and their metadata, optionally filtered by specified criteria.

    • +
    • Batch find, repair, or convert videos with encoding errors.

    • +
    • Batch recode videos to modern codecs (e.g., x265, AV1) based on filters (e.g., container, codec, resolution).

    • +
    +
    +
    +

    Options

    +
    +

    list

    +
    +

    Search and list videos filtered by the user-provided parameters.

    +
    +
    +
    +

    convert

    +
    +

    Search and convert all videos filtered by the user-provided parameters.

    +
    +
    +
    +

    -del:

    +
    +

    Deletes the original videos after successful completion of operations (e.g., conversion or listing). Use with caution.

    +

    See Warnings

    +
    +
    +
    +

    -in:

    +
    +

    [any, avi, divx, flv, m4v, mkv, mp4, mpg, ogm, vid, webm, wmv]

    +

    Filters videos by file format (container extensions). The default is any, meaning all formats are included.

    +
    +
    +
    +

    -filters:

    +
    +

    [fferror, old, lowres, hd, 720p, 1080p, uhd, mpeg, mpeg4, x264, wmv3, wmv]

    +

    Filters videos based on specific criteria:

    +
      +
    • fferror: Select videos with encoding errors (see Errors)

    • +
    • old: Select videos using outdated codecs (anything except hevc or av1)

    • +
    • hd: Select videos in HD (720p, 1080p, UHD)

    • +
    • lowres: Select videos that are not in HD

    • +
    • uhd: Select Ultra-HD videos (width or height >= 2160)

    • +
    • 1080p: Select Full-HD videos (1440 <= width < 2160 or 1080 <= height < 2160)

    • +
    • 720p: Select HD videos (1280 <= width < 1440 or 720 <= height < 1080)

    • +
    • sd: Select standard-definition videos (480 <= height < 720)

    • +
    • subsd: Select substandard-definition videos (height < 480)

    • +
    • mpeg, mpeg4, x264, wmv3, wmv, vob: Filter by video codec

    • +
    +
    +
    +
    +

    -out:

    +
    +

    [mkv/mp4, x265/av1]

    +

    Specifies the output format for video conversions:

    +
      +
    • mkv: (Default) Package the output video in a Matroska container.

    • +
    • mp4: Package the output video in an MP4 container.

    • +
    • x265 or hevc: (Default) Encode the video using x265 (HEVC).

    • +
    • av1: Encode the video using AOMedia Video 1 (AV1).

    • +
    +
    +
    +
    +

    -print:

    +
    +

    [list, formated, verbose]

    +

    Specifies how the output should be displayed:

    +
      +
    • list: (Default) Prints video info in a concise, single-line format.

    • +
    +List videos (single-line output) + +
      +
    • formated: Prints video info in a more readable format with line breaks.

    • +
    +List videos (formatted output) + +
      +
    • verbose: Prints the FFmpeg output during conversions.

    • +
    +
    +
    +
    +

    -dirs:

    +
    +

    [“/mnt/media/”,,”/mnt/media2/”]

    +

    Specifies directories to scan, separated by double commas (,,).

    +
    +
    +
    +

    -files:

    +
    +

    [“/mnt/media/video.avi”,,”/mnt/media2/video2.mp4”]

    +

    Specifies individual video files to process, separated by double commas (,,).

    +
    +
    +
    +
    +

    Examples

    +
    # This command lists all videos in the specified directories that use old codecs and
    +# formats the output.
    +mediacurator list -filters:old -print:formated -dirs:"/mnt/media/",,"/mnt/media2/"
    +
    +# This command converts all MPEG4 videos found in the specified directories to AV1 format
    +# in MP4 containers and deletes the originals.
    +mediacurator convert -del -filters:mpeg4 -out:av1,mp4 -dirs:"/mnt/media/",,"/mnt/media2/"
    +
    +# This command converts AVI or MPG videos, displays detailed output during conversion, and
    +# deletes originals.
    +mediacurator convert -del -in:avi,mpg -print:formated,verbose -dirs:"/mnt/media/",,"/mnt/media2/"
    +
    +
    +

    For more examples, see Use cases

    +
    +
    +

    See Also

    + +
    +
    +

    Glossary

    +
      +
    • Codec: A program or device that compresses and decompresses digital media.

    • +
    • Container: A file format that holds video, audio, and metadata.

    • +
    • UHD: Ultra High Definition, refers to video resolutions of 3840x2160 pixels or higher.

    • +
    +
    +
    +

    Error Handling

    +

    Common issues users might encounter include:

    +
      +
    • Encoding Errors: If videos have encoding errors, they can be filtered using the -filters fferror option.

    • +
    • Unsupported Formats: Ensure that input formats specified in -in are supported by mediacurator.

    • +
    +
    +
    +

    Author

    +

    Fabrice Quenneville

    +
    +
    + + +
    + +
    +
    + +
    +
    + + + + + + + \ No newline at end of file diff --git a/docs/legacy_usage/quickstart.html b/docs/legacy_usage/quickstart.html new file mode 100644 index 0000000..54dae01 --- /dev/null +++ b/docs/legacy_usage/quickstart.html @@ -0,0 +1,175 @@ + + + + + + + + Quickstart — mediacurator documentation + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + +
    + +
    +

    Quickstart

    +
    +

    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.

    +
    +
    mediacurator [list,convert] [-del]
    +    [-in:any,avi,mkv,wmv,mpg,mp4,m4v,flv,vid,divx,ogm,webm]
    +    [-filters:fferror,old,lowres,hd,720p,1080p,uhd,mpeg,mpeg4,x264,wmv3,wmv]
    +    [-out:mkv/mp4,x265/av1]
    +    [-print:list,formated,verbose]
    +    [-dirs/-files:"/mnt/media/",,"/mnt/media2/"]
    +
    +
    +

    for multiple files or filenames use double comma separated values “,,”

    +

    default options are:

    +
    -in:any
    +-filters:
    +-out:mkv,x265
    +-print:list
    +
    +
    +

    Examples:

    +
    # List all videos with old codec in formated format
    +mediacurator list -filters:old -print:formated -dirs:/mnt/media/ >> ../medlist.txt
    +# Convert all videos with the codec mpeg4 in a mp4 using the av1 video codec and the delete the originals
    +mediacurator convert -del -filters:mpeg4 -out:av1,mp4 -dirs:"/mnt/media/Movies/"
    +# Convert any video with avi or mpg extensions, print formated text including ffmpeg's output and then delete the originals
    +mediacurator convert -del -in:avi,mpg -print:formated,verbose -dirs:/mnt/media/
    +
    +
    +

    More examples in Use cases

    +
    + + +
    + +
    +
    + +
    +
    + + + + + + + \ No newline at end of file diff --git a/docs/legacy_usage/use_cases.html b/docs/legacy_usage/use_cases.html new file mode 100644 index 0000000..ef8267a --- /dev/null +++ b/docs/legacy_usage/use_cases.html @@ -0,0 +1,221 @@ + + + + + + + + Use cases — mediacurator documentation + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + +
    + +
    +

    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:

    + + +
    +

    Purge

    +

    Please see Warnings

    +

    List and delete all videos using the Windows Media Video codecs

    +
    mediacurator list --delete -filters:wmv -dirs:"/mnt/media/",,"/mnt/media2/"
    +
    +
    +

    List and delete all videos using Audio Video Interleave

    +
    mediacurator list --delete -in:avi -dirs:"/mnt/media/",,"/mnt/media2/"
    +
    +
    +

    List and delete any videos with encoding errors

    +
    mediacurator list --delete -filters:fferror -dirs:"/mnt/media/",,"/mnt/media2/"
    +
    +
    +
    +
    +

    Batch repair encoding errors

    +

    List all videos with encoding errors

    +
    mediacurator list -filters:fferror -dirs:"/mnt/media/",,"/mnt/media2/"
    +
    +
    +

    List and delete any videos with encoding errors

    +
    mediacurator list --delete -filters:fferror -dirs:"/mnt/media/",,"/mnt/media2/"
    +
    +
    +

    Convert all videos with encoding errors to High Efficiency Video Coding and delete the originals

    +
    mediacurator convert --delete -filters:fferror -dirs:"/mnt/media/",,"/mnt/media2/"
    +
    +
    +
    +
    +

    Batch re-encode

    +

    Convert all videos with old codecs to High Efficiency Video Coding to save space and delete the originals

    +
    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

    +
    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

    +
    mediacurator convert --delete -in:avi,mpg -print:formated,verbose -dirs:"/mnt/media/",,"/mnt/media2/"
    +
    +
    +
    +
    + + +
    + +
    +
    + +
    +
    + + + + + + + \ No newline at end of file diff --git a/docs/legacy_usage/warnings.html b/docs/legacy_usage/warnings.html new file mode 100644 index 0000000..21d13d1 --- /dev/null +++ b/docs/legacy_usage/warnings.html @@ -0,0 +1,205 @@ + + + + + + + + Warnings — mediacurator documentation + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + +
    + +
    +

    Warnings

    +
    +

    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.

    +
    +
    +

    Warning

    +

    Before using the delete feature, we strongly recommend running several dry runs to get acquainted with mediacurator, as incorrect usage can cause irreversible damage to your media library.

    +
    +

    The -del flag will permanently delete files, so it is crucial to ensure that the command is executed correctly. Below are some examples of how the delete feature works.

    +
    +

    Example use Cases for the -del Flag

    +
      +
    1. Delete all non-HD (low-resolution) videos in a folder:

    2. +
    +
    mediacurator list -del -filters:lowres  -dirs:"/mnt/media/"
    +
    +
    +
      +
    1. Delete all substandard quality videos in a folder:

    2. +
    +
    mediacurator list -del -filters:subsd  -dirs:"/mnt/media/"
    +
    +
    +Deleting videos + +
      +
    1. Delete all videos in a folder with encoding errors:

    2. +
    +
    mediacurator list -del -filters:fferror  -dirs:"/mnt/media/"
    +
    +
    +
      +
    1. Convert (repair) and then delete all videos in a folder with encoding errors:

    2. +
    +
    mediacurator convert -del -filters:fferror  -dirs:"/mnt/media/"
    +
    +
    +
      +
    1. Delete all videos in a folder:

    2. +
    +
    mediacurator list -del -filters:lowres  -dirs:"/mnt/media/"
    +
    +
    +
    +
    +

    Important Notes

    +
      +
    • Irreversibility: All of these commands involve permanent deletion. Once a file is deleted using the -del flag, it cannot be recovered.

    • +
    • Run without `-del` first: Always perform several dry runs by omitting the -del flag to ensure that the correct files are selected for deletion. Familiarizing yourself with the tool before using destructive commands is essential to avoid unintended consequences.

    • +
    • Specific File Selection: If you’re unsure about applying filters to an entire directory, you can use the -files option to target individual files for deletion or conversion, further reducing the risk of unintended deletions.

    • +
    • Backup Recommendation: Before running any commands with the -del flag, it is a good practice to back up your media library or the specific directories being processed, especially if they contain valuable or irreplaceable files.

    • +
    +
    +
    +

    Dry run example (without deletion)

    +
    mediacurator list -filters:lowres -dirs:"/mnt/media/"
    +
    +
    +

    Make sure you carefully verify the output and files selected during the dry runs to prevent accidental data loss.

    +
    +
    + + +
    + +
    +
    + +
    +
    + + + + + + + \ No newline at end of file diff --git a/docs/objects.inv b/docs/objects.inv index b168b20..b825204 100644 --- a/docs/objects.inv +++ b/docs/objects.inv @@ -2,8 +2,5 @@ # Project: mediacurator # Version: 0.0.13 # The remainder of this file is compressed using zlib. -xڕR0{=u?\q1dq4RNtǓ`[ -/O~\0Z_J&,+ࢲș;XRW55:Z1vÄ^zK -PB֯{mK͑r͛NHKNrxe:*A9VgD -yG|IMԥռ6e[Ml]+ Me -ز$jfuk4J; d _3UEwBD6znTGPi,+a)J,5a,mӆ(mKFG(k& `i$jjG(jZBeK*;kfGfj-R ^įePot߽w1:&entkPdbPTs1/P$z_ϱ+3CGH0p#_( \ No newline at end of file +xڕMӓ0|8z}uÖ2&Aͯ,okjx8tY/,s)w:fH7{US'zlϕf]o~=fG)Z{!RDN}]K**ʽRlE޵U]$.V]HҸގu~RUx_w^.rOwMٴYpĽ*Tpg ن!ŜFp54Y2Kcv".aͦ$1Ҏ)z6o$g<6is-p-aKP@ +E0:FQk DmPCmQ[P@EPiJ]Cj-ERǐ@U1dz G][;h]wAOmft%Obd <* \ No newline at end of file diff --git a/docs/releasenotes/0.0.1-changelog.html b/docs/releasenotes/0.0.1-changelog.html index 80aa011..d039f16 100644 --- a/docs/releasenotes/0.0.1-changelog.html +++ b/docs/releasenotes/0.0.1-changelog.html @@ -8,7 +8,7 @@ MediaCurator 0.0.1 Release Notes — mediacurator documentation - + @@ -109,8 +109,20 @@
  • Errors

Release Notes:

-
    + +

    Legacy Usage:

    + +

    Legacy Release Notes:

    +

    Release Notes:

    -
      + +

      Legacy Usage:

      + +

      Legacy Release Notes:

      +

      Release Notes:

      -
        + +

        Legacy Usage:

        + +

        Legacy Release Notes:

        +

        Release Notes:

        -
          + +

          Legacy Usage:

          + +

          Legacy Release Notes:

          +

          Release Notes:

          -
            + +

            Legacy Usage:

            + +

            Legacy Release Notes:

            +

            Release Notes:

            -
              + +

              Legacy Usage:

              + +

              Legacy Release Notes:

              +

              Release Notes:

              -
                + +

                Legacy Usage:

                + +

                Legacy Release Notes:

                +

                Release Notes:

                -
                  + +

                  Legacy Usage:

                  + +

                  Legacy Release Notes:

                  +

                  Release Notes:

                  -
                    + +

                    Legacy Usage:

                    + +

                    Legacy Release Notes:

                    +

                    Release Notes:

                    -
                      + +

                      Legacy Usage:

                      + +

                      Legacy Release Notes:

                      +

                      Release Notes:

                      -
                        + +

                        Legacy Usage:

                        + +

                        Legacy Release Notes:

                        +
                        • MediaCurator 0.0.13 Release Notes
                        • MediaCurator 0.0.12 Release Notes
                        • MediaCurator 0.0.11 Release Notes
                        • diff --git a/docs/releasenotes/1.0.1-changelog.html b/docs/releasenotes/1.0.1-changelog.html index ebc72b0..0ffb6f4 100644 --- a/docs/releasenotes/1.0.1-changelog.html +++ b/docs/releasenotes/1.0.1-changelog.html @@ -8,14 +8,14 @@ mediacurator 1.0.1 Release Notes — mediacurator documentation - + - + @@ -66,9 +66,11 @@

                          Improvements

                            +
                          • Added line break in conversion output before each video to improve readability.

                          • Standardized audio, subtitle and metadata copying.

                          • Added support for .mov and .ts formats.

                          • Introduced CRF (Constant Rate Factor) settings for AV1 and x265 for better control over quality and file size.

                          • +
                          • Implemented handling for odd pixel dimensions by adding black pixel padding to ensure even width and height.

                          @@ -119,6 +121,18 @@

                          Release Notes:

                          +

                          Legacy Usage:

                          + +

                          Legacy Release Notes:

                          +
                          • MediaCurator 0.0.13 Release Notes
                          • MediaCurator 0.0.12 Release Notes
                          • MediaCurator 0.0.11 Release Notes
                          • @@ -137,7 +151,7 @@ diff --git a/docs/search.html b/docs/search.html index e6655a0..dfbd07e 100644 --- a/docs/search.html +++ b/docs/search.html @@ -7,7 +7,7 @@ Search — mediacurator documentation - + @@ -97,6 +97,18 @@

                            Release Notes:

                            +

                            Legacy Usage:

                            + +

                            Legacy Release Notes:

                            +
                            • MediaCurator 0.0.13 Release Notes
                            • MediaCurator 0.0.12 Release Notes
                            • MediaCurator 0.0.11 Release Notes
                            • diff --git a/docs/searchindex.js b/docs/searchindex.js index 9d057c3..61e0b8c 100644 --- a/docs/searchindex.js +++ b/docs/searchindex.js @@ -1 +1 @@ -Search.setIndex({"alltitles": {"-del:": [[15, "del"]], "-dirs:": [[15, "dirs"]], "-files:": [[15, "files"]], "-filters:": [[15, "filters"]], "-in:": [[15, "in"]], "-out:": [[15, "out"]], "-print:": [[15, "print"]], "Author": [[15, "author"]], "Batch re-encode": [[17, "batch-re-encode"]], "Batch repair encoding errors": [[17, "batch-repair-encoding-errors"]], "Changes": [[1, "changes"], [2, "changes"], [3, "changes"], [4, "changes"], [5, "changes"], [6, "changes"], [7, "changes"], [8, "changes"], [9, "changes"], [10, "changes"], [11, "changes"], [12, "changes"]], "Compatibility Notes": [[2, "compatibility-notes"], [3, "compatibility-notes"], [4, "compatibility-notes"], [5, "compatibility-notes"], [12, "compatibility-notes"]], "Compatibility notes": [[1, "compatibility-notes"], [6, "compatibility-notes"], [7, "compatibility-notes"], [8, "compatibility-notes"], [9, "compatibility-notes"], [10, "compatibility-notes"], [11, "compatibility-notes"]], "Deprecations": [[1, "deprecations"], [2, "deprecations"], [3, "deprecations"], [4, "deprecations"], [5, "deprecations"], [6, "deprecations"], [7, "deprecations"], [8, "deprecations"], [9, "deprecations"], [10, "deprecations"], [11, "deprecations"], [12, "deprecations"]], "Description": [[15, "description"]], "Dropped Support": [[1, "dropped-support"], [2, "dropped-support"], [3, "dropped-support"], [4, "dropped-support"], [5, "dropped-support"], [6, "dropped-support"], [7, "dropped-support"], [8, "dropped-support"], [9, "dropped-support"], [10, "dropped-support"], [11, "dropped-support"], [12, "dropped-support"]], "Errors": [[13, null]], "Examples": [[15, "examples"]], "FFMPEG Support": [[1, "ffmpeg-support"], [2, "ffmpeg-support"], [3, "ffmpeg-support"], [4, "ffmpeg-support"], [5, "ffmpeg-support"], [6, "ffmpeg-support"], [7, "ffmpeg-support"], [8, "ffmpeg-support"], [9, "ffmpeg-support"], [10, "ffmpeg-support"], [11, "ffmpeg-support"], [12, "ffmpeg-support"]], "FFmpeg issues": [[13, "ffmpeg-issues"]], "Future Changes": [[1, "future-changes"], [2, "future-changes"], [3, "future-changes"], [4, "future-changes"], [5, "future-changes"], [6, "future-changes"], [7, "future-changes"], [8, "future-changes"], [9, "future-changes"], [10, "future-changes"], [11, "future-changes"], [12, "future-changes"]], "Highlights": [[1, "highlights"], [2, "highlights"], [3, "highlights"], [4, "highlights"], [5, "highlights"], [6, "highlights"], [7, "highlights"], [8, "highlights"], [9, "highlights"], [10, "highlights"], [11, "highlights"], [12, "highlights"]], "Improvements": [[1, "improvements"], [2, "improvements"], [3, "improvements"], [4, "improvements"], [5, "improvements"], [6, "improvements"], [7, "improvements"], [8, "improvements"], [9, "improvements"], [10, "improvements"], [11, "improvements"], [12, "improvements"]], "Install FFmpeg": [[14, "install-ffmpeg"]], "Install from PyPi": [[14, "install-from-pypi"]], "Installation": [[14, null]], "Manual": [[15, null]], "MediaCurator 0.0.1 Release Notes": [[1, null]], "MediaCurator 0.0.10 Release Notes": [[2, null]], "MediaCurator 0.0.11 Release Notes": [[3, null]], "MediaCurator 0.0.12 Release Notes": [[4, null]], "MediaCurator 0.0.13 Release Notes": [[5, null]], "MediaCurator 0.0.4 Release Notes": [[6, null]], "MediaCurator 0.0.5 Release Notes": [[7, null]], "MediaCurator 0.0.6 Release Notes": [[8, null]], "MediaCurator 0.0.7 Release Notes": [[9, null]], "MediaCurator 0.0.8 Release Notes": [[10, null]], "MediaCurator 0.0.9 Release Notes": [[11, null]], "Name": [[15, "name"]], "New Features": [[1, "new-features"], [2, "new-features"], [3, "new-features"], [4, "new-features"], [5, "new-features"], [6, "new-features"], [7, "new-features"], [8, "new-features"], [9, "new-features"], [10, "new-features"], [11, "new-features"], [12, "new-features"]], "OS Support": [[1, "os-support"], [2, "os-support"], [3, "os-support"], [4, "os-support"], [5, "os-support"], [6, "os-support"], [7, "os-support"], [8, "os-support"], [9, "os-support"], [10, "os-support"], [11, "os-support"], [12, "os-support"]], "Options": [[15, "options"]], "Other bugs": [[13, "other-bugs"]], "Print information": [[17, "print-information"]], "Purge": [[17, "purge"]], "Python Support": [[2, "python-support"], [3, "python-support"], [4, "python-support"], [5, "python-support"], [6, "python-support"], [7, "python-support"], [8, "python-support"], [9, "python-support"], [10, "python-support"], [11, "python-support"], [12, "python-support"]], "Quickstart": [[16, null]], "Release Notes:": [[0, null]], "Repairable encoding errors": [[13, "repairable-encoding-errors"]], "See Also": [[15, "see-also"]], "Synopsis": [[15, "synopsis"]], "Usage:": [[0, null]], "Use cases": [[17, null]], "Warnings": [[18, null]], "Welcome to mediacurator\u2019s documentation!": [[0, null]], "convert": [[15, "convert"]], "list": [[15, "list"]], "mediacurator 1.0.1 Release Notes": [[12, null]]}, "docnames": ["index", "releasenotes/0.0.1-changelog", "releasenotes/0.0.10-changelog", "releasenotes/0.0.11-changelog", "releasenotes/0.0.12-changelog", "releasenotes/0.0.13-changelog", "releasenotes/0.0.4-changelog", "releasenotes/0.0.5-changelog", "releasenotes/0.0.6-changelog", "releasenotes/0.0.7-changelog", "releasenotes/0.0.8-changelog", "releasenotes/0.0.9-changelog", "releasenotes/1.0.1-changelog", "usage/errors", "usage/installation", "usage/manual", "usage/quickstart", "usage/use_cases", "usage/warnings"], "envversion": {"sphinx": 62, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2}, "filenames": ["index.rst", "releasenotes/0.0.1-changelog.rst", "releasenotes/0.0.10-changelog.rst", "releasenotes/0.0.11-changelog.rst", "releasenotes/0.0.12-changelog.rst", "releasenotes/0.0.13-changelog.rst", "releasenotes/0.0.4-changelog.rst", "releasenotes/0.0.5-changelog.rst", "releasenotes/0.0.6-changelog.rst", "releasenotes/0.0.7-changelog.rst", "releasenotes/0.0.8-changelog.rst", "releasenotes/0.0.9-changelog.rst", "releasenotes/1.0.1-changelog.rst", "usage/errors.rst", "usage/installation.rst", "usage/manual.rst", "usage/quickstart.rst", "usage/use_cases.rst", "usage/warnings.rst"], "indexentries": {}, "objects": {}, "objnames": {}, "objtypes": {}, "terms": {"": [1, 13, 15, 16, 17], "0": 0, "1": [0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 15], "10": 0, "1080": 15, "1080p": [15, 16], "11": 0, "12": [0, 12], "1280": 15, "13": 0, "1440": 15, "2": [8, 9, 12], "2160": 15, "3": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "4": [0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 13], "480": 15, "480p": 15, "5": 0, "6": [0, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12], "7": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12], "720": 15, "720p": [15, 16], "8": 0, "9": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], "By": 15, "For": 14, "If": 13, "In": 13, "It": 13, "The": [0, 15, 17], "To": 18, "about": 15, "acquaint": 18, "activ": 13, "ad": [2, 5, 7, 10, 11, 12], "adjust": 3, "aerat": 15, "after": [6, 13], "again": [13, 18], "all": [0, 1, 12, 15, 16, 17, 18], "also": [0, 13], "an": [3, 15, 17], "ani": [15, 16, 17], "aomedia": 15, "api": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "appli": 6, "ar": [13, 15, 16, 17, 18], "audio": [12, 13, 17], "author": 0, "av1": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 16, 17], "avi": [15, 16, 17], "base": [0, 1, 15], "batch": [0, 1, 15], "been": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15], "befor": 18, "behavior": 18, "being": 6, "better": 12, "big": 13, "big_valu": 13, "break": 5, "bug": [0, 3, 4, 6, 7, 8, 9], "can": [0, 13, 18], "case": [0, 15, 16], "chapter": 13, "clariti": 3, "class": [7, 8], "clean": 13, "cleanup": 3, "code": [0, 3, 4, 17], "codec": [0, 1, 15, 16, 17], "comma": [15, 16], "command": [0, 15, 18], "comment": [3, 8], "compress": 15, "consist": 3, "constant": 12, "contain": [15, 17], "control": 12, "convent": 12, "convers": [6, 15], "convert": [0, 1, 16, 17, 18], "copi": 12, "correctli": 6, "corrupt": 17, "crf": 12, "damag": [13, 18], "databas": [0, 15], "decod": 13, "default": [15, 16], "definit": [15, 17], "del": [16, 17, 18], "delet": [15, 16, 17, 18], "depend": 13, "descript": 0, "detect": 13, "developp": 15, "dir": [16, 17, 18], "directori": [3, 15], "distribut": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "divx": [10, 15, 16], "don": 13, "done": [15, 18], "doubl": [15, 16], "download": 14, "dry": 18, "due": 3, "dure": 15, "effici": 17, "encod": [0, 1, 15, 18], "encount": 3, "enhanc": 3, "ensur": 3, "error": [0, 1, 3, 15, 18], "everyth": 15, "exampl": [0, 13, 16], "except": 15, "expect": 18, "experi": 13, "experiment": 15, "extens": [15, 16, 17], "extent": [0, 1, 15], "fabric": 15, "face": 13, "factor": 12, "failur": 13, "featur": [13, 18], "feel": 13, "few": [13, 18], "fferror": [15, 16, 17, 18], "ffmpeg": [0, 15, 16, 17], "file": [7, 8, 12, 16, 18], "filenam": [15, 16], "filetyp": [2, 10, 11], "filter": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 16, 17, 18], "find": [0, 1, 15], "first": 1, "fix": [6, 7, 8, 9], "flag": 18, "flv": [15, 16], "folder": 18, "follow": [1, 17], "format": [12, 15, 16, 17], "found": [0, 13], "frame": 13, "free": 13, "from": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 17], "gather": 4, "get": 18, "github": [0, 13, 14], "gnu": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14], "gui": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "ha": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14], "happen": 13, "have": [15, 18], "hd": [15, 16, 17, 18], "header": 13, "height": 15, "here": [13, 18], "hevc": 15, "high": 17, "how": 17, "i": [0, 13, 15, 18], "implement": 1, "includ": [15, 16, 17], "inform": [0, 1, 13, 15], "instal": 0, "interleav": 17, "introduc": 12, "irrecover": 18, "irrepar": 18, "issu": 0, "its": 13, "latest": 13, "less": 15, "librari": [17, 18], "like": 13, "line": [0, 5, 15], "linux": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14], "list": [0, 1, 8, 16, 17, 18], "lot": 17, "lowercas": 12, "lowr": [15, 16, 18], "m4v": [15, 16], "mai": 13, "main": 17, "manag": [0, 15], "mani": 17, "manual": 0, "matroska": 15, "media": [0, 15, 16, 17, 18], "media2": [15, 16], "mediacur": [13, 14, 15, 16, 17, 18], "medialibrari": [3, 4], "medlist": [15, 16], "metadata": 12, "minor": 8, "miss": [3, 13], "mkv": [15, 16, 17], "mnt": [15, 16, 17, 18], "modern": [0, 1, 15], "more": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 16], "most": 13, "mov": 12, "move": [13, 15], "movi": [15, 16, 17], "mp4": [15, 16], "mpeg": [2, 13, 15, 16], "mpeg4": [15, 16, 17], "mpg": [15, 16, 17], "multipl": [15, 16], "my": 13, "name": [0, 3, 12], "necessarli": 13, "next": 13, "non": 18, "now": 14, "occur": 13, "ogm": [10, 15, 16], "old": [13, 15, 16, 17], "older": 17, "onc": 15, "onli": 14, "open": 13, "oper": [4, 15], "option": [0, 13, 16], "organ": 3, "origin": [15, 16, 17], "other": 0, "out": [16, 17], "output": [13, 15, 16, 17], "over": 12, "packag": [14, 15], "paramet": 15, "pass": 15, "permiss": 6, "pip": 14, "pleas": [17, 18], "possibli": 13, "prepar": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "print": [0, 13, 16], "project": [12, 13], "properli": 18, "purg": 0, "pypi": 0, "python": [0, 1, 15], "qt": 13, "qualiti": 12, "quennevil": 15, "quickstart": 0, "quit": 13, "rang": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], "rate": 12, "raw": 13, "re": [0, 13], "readabl": [3, 5], "reason": 17, "recod": [0, 1, 15], "rectifi": [3, 4], "recur": 13, "referenc": 13, "refin": 3, "renam": 12, "repair": [0, 1, 15, 18], "report": 13, "repositori": 13, "request": 15, "requir": 14, "resolut": [0, 1, 15], "result": 15, "run": [13, 18], "save": 17, "scan": 15, "sd": 15, "search": 15, "see": [0, 17], "segfault": 13, "sei": 13, "select": [15, 17], "separ": [15, 16], "serv": 13, "set": 12, "singl": 15, "size": 12, "some": 13, "sourc": [0, 13], "space": 17, "specif": 15, "standard": [12, 17], "step": 13, "subsd": [15, 17, 18], "substandard": [15, 17, 18], "subtitl": 12, "succefulli": 15, "suggest": 13, "synopsi": 0, "t": [12, 13], "take": 13, "test": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14], "text": [15, 16, 17], "than": 15, "thi": [1, 14, 15], "through": 3, "too": 13, "tool": [0, 15], "track": 13, "try": [13, 18], "txt": [15, 16], "type": 13, "uhd": [15, 16], "unabl": 4, "under": 15, "unintend": 18, "until": 18, "up": 13, "updat": 13, "us": [0, 13, 15, 16, 18], "user": 15, "v": 17, "valu": [7, 8, 15, 16], "valuabl": 18, "variabl": 3, "variou": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "verbos": [13, 15, 16, 17], "veri": 13, "version": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], "vid": [15, 16], "video": [0, 1, 4, 13, 15, 16, 17, 18], "video2": 15, "vob": [7, 15], "want": 13, "warn": [0, 15, 17], "webm": [11, 15, 16], "well": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "what": 17, "when": [13, 18], "where": [3, 4], "while": 13, "wich": 13, "width": 15, "window": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 17], "without": [0, 1, 15, 18], "wmv": [15, 16, 17], "wmv3": [15, 16], "work": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "would": [3, 4, 17], "x264": [15, 16], "x265": [0, 1, 12, 15, 16], "you": [13, 18], "your": [13, 18]}, "titles": ["Welcome to mediacurator\u2019s documentation!", "MediaCurator 0.0.1 Release Notes", "MediaCurator 0.0.10 Release Notes", "MediaCurator 0.0.11 Release Notes", "MediaCurator 0.0.12 Release Notes", "MediaCurator 0.0.13 Release Notes", "MediaCurator 0.0.4 Release Notes", "MediaCurator 0.0.5 Release Notes", "MediaCurator 0.0.6 Release Notes", "MediaCurator 0.0.7 Release Notes", "MediaCurator 0.0.8 Release Notes", "MediaCurator 0.0.9 Release Notes", "mediacurator 1.0.1 Release Notes", "Errors", "Installation", "Manual", "Quickstart", "Use cases", "Warnings"], "titleterms": {"": 0, "0": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "1": [1, 12], "10": 2, "11": 3, "12": 4, "13": 5, "4": 6, "5": 7, "6": 8, "7": 9, "8": 10, "9": 11, "also": 15, "author": 15, "batch": 17, "bug": 13, "case": 17, "chang": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "compat": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "convert": 15, "del": 15, "deprec": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "descript": 15, "dir": 15, "document": 0, "drop": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "encod": [13, 17], "error": [13, 17], "exampl": 15, "featur": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "ffmpeg": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "file": 15, "filter": 15, "from": 14, "futur": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "highlight": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "improv": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "inform": 17, "instal": 14, "issu": 13, "list": 15, "manual": 15, "mediacur": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "name": 15, "new": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "note": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "o": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "option": 15, "other": 13, "out": 15, "print": [15, 17], "purg": 17, "pypi": 14, "python": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "quickstart": 16, "re": 17, "releas": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "repair": [13, 17], "see": 15, "support": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "synopsi": 15, "us": 17, "usag": 0, "warn": 18, "welcom": 0}}) \ No newline at end of file +Search.setIndex({"alltitles": {"-del:": [[3, "del"]], "-dirs:": [[3, "dirs"]], "-files:": [[3, "files"]], "-filters:": [[3, "filters"]], "-in:": [[3, "in"]], "-out:": [[3, "out"]], "-print:": [[3, "print"]], "Author": [[3, "author"], [21, "author"]], "Batch re-encode": [[5, "batch-re-encode"], [23, "batch-re-encode"]], "Batch repair encoding errors": [[5, "batch-repair-encoding-errors"], [23, "batch-repair-encoding-errors"]], "Changes": [[7, "changes"], [8, "changes"], [9, "changes"], [10, "changes"], [11, "changes"], [12, "changes"], [13, "changes"], [14, "changes"], [15, "changes"], [16, "changes"], [17, "changes"], [18, "changes"]], "Compatibility Notes": [[8, "compatibility-notes"], [9, "compatibility-notes"], [10, "compatibility-notes"], [11, "compatibility-notes"], [18, "compatibility-notes"]], "Compatibility notes": [[7, "compatibility-notes"], [12, "compatibility-notes"], [13, "compatibility-notes"], [14, "compatibility-notes"], [15, "compatibility-notes"], [16, "compatibility-notes"], [17, "compatibility-notes"]], "Deprecations": [[7, "deprecations"], [8, "deprecations"], [9, "deprecations"], [10, "deprecations"], [11, "deprecations"], [12, "deprecations"], [13, "deprecations"], [14, "deprecations"], [15, "deprecations"], [16, "deprecations"], [17, "deprecations"], [18, "deprecations"]], "Description": [[3, "description"], [21, "description"]], "Documentation": [[0, "documentation"]], "Dropped Support": [[7, "dropped-support"], [8, "dropped-support"], [9, "dropped-support"], [10, "dropped-support"], [11, "dropped-support"], [12, "dropped-support"], [13, "dropped-support"], [14, "dropped-support"], [15, "dropped-support"], [16, "dropped-support"], [17, "dropped-support"], [18, "dropped-support"]], "Dry run example (without deletion)": [[6, "dry-run-example-without-deletion"], [24, "dry-run-example-without-deletion"]], "Error Handling": [[3, "error-handling"], [21, "error-handling"]], "Errors": [[1, null], [19, null]], "Example use Cases for the -del Flag": [[6, "example-use-cases-for-the-del-flag"]], "Example use cases for the \u2013delete Flag": [[24, "example-use-cases-for-the-delete-flag"]], "Examples": [[3, "examples"], [21, "examples"]], "FFMPEG Support": [[7, "ffmpeg-support"], [8, "ffmpeg-support"], [9, "ffmpeg-support"], [10, "ffmpeg-support"], [11, "ffmpeg-support"], [12, "ffmpeg-support"], [13, "ffmpeg-support"], [14, "ffmpeg-support"], [15, "ffmpeg-support"], [16, "ffmpeg-support"], [17, "ffmpeg-support"], [18, "ffmpeg-support"]], "FFmpeg Issues": [[1, "ffmpeg-issues"], [19, "ffmpeg-issues"]], "Future Changes": [[7, "future-changes"], [8, "future-changes"], [9, "future-changes"], [10, "future-changes"], [11, "future-changes"], [12, "future-changes"], [13, "future-changes"], [14, "future-changes"], [15, "future-changes"], [16, "future-changes"], [17, "future-changes"], [18, "future-changes"]], "Glossary": [[3, "glossary"], [21, "glossary"]], "Highlights": [[7, "highlights"], [8, "highlights"], [9, "highlights"], [10, "highlights"], [11, "highlights"], [12, "highlights"], [13, "highlights"], [14, "highlights"], [15, "highlights"], [16, "highlights"], [17, "highlights"], [18, "highlights"]], "Important Notes": [[6, "important-notes"], [24, "important-notes"]], "Improvements": [[7, "improvements"], [8, "improvements"], [9, "improvements"], [10, "improvements"], [11, "improvements"], [12, "improvements"], [13, "improvements"], [14, "improvements"], [15, "improvements"], [16, "improvements"], [17, "improvements"], [18, "improvements"]], "Install FFmpeg": [[2, "install-ffmpeg"], [20, "install-ffmpeg"]], "Install from PyPi": [[2, "install-from-pypi"], [20, "install-from-pypi"]], "Installation": [[2, null], [20, null]], "Legacy Documentation (Pre 1.0)": [[0, "legacy-documentation-pre-1-0"]], "Legacy Release Notes:": [[0, null]], "Legacy Usage:": [[0, null]], "Manual": [[3, null], [21, null]], "MediaCurator 0.0.1 Release Notes": [[7, null]], "MediaCurator 0.0.10 Release Notes": [[8, null]], "MediaCurator 0.0.11 Release Notes": [[9, null]], "MediaCurator 0.0.12 Release Notes": [[10, null]], "MediaCurator 0.0.13 Release Notes": [[11, null]], "MediaCurator 0.0.4 Release Notes": [[12, null]], "MediaCurator 0.0.5 Release Notes": [[13, null]], "MediaCurator 0.0.6 Release Notes": [[14, null]], "MediaCurator 0.0.7 Release Notes": [[15, null]], "MediaCurator 0.0.8 Release Notes": [[16, null]], "MediaCurator 0.0.9 Release Notes": [[17, null]], "Name": [[3, "name"], [21, "name"]], "New Features": [[7, "new-features"], [8, "new-features"], [9, "new-features"], [10, "new-features"], [11, "new-features"], [12, "new-features"], [13, "new-features"], [14, "new-features"], [15, "new-features"], [16, "new-features"], [17, "new-features"], [18, "new-features"]], "OS Support": [[7, "os-support"], [8, "os-support"], [9, "os-support"], [10, "os-support"], [11, "os-support"], [12, "os-support"], [13, "os-support"], [14, "os-support"], [15, "os-support"], [16, "os-support"], [17, "os-support"], [18, "os-support"]], "Options": [[3, "options"], [21, "options"]], "Other Bugs": [[1, "other-bugs"], [19, "other-bugs"]], "Print information": [[5, "print-information"], [23, "print-information"]], "Purge": [[5, "purge"], [23, "purge"]], "Python Support": [[8, "python-support"], [9, "python-support"], [10, "python-support"], [11, "python-support"], [12, "python-support"], [13, "python-support"], [14, "python-support"], [15, "python-support"], [16, "python-support"], [17, "python-support"], [18, "python-support"]], "Quickstart": [[4, null], [22, null]], "Release Notes:": [[0, null]], "Repairable Encoding Errors": [[1, "repairable-encoding-errors"], [19, "repairable-encoding-errors"]], "See Also": [[3, "see-also"], [21, "see-also"]], "Synopsis": [[3, "synopsis"], [21, "synopsis"]], "Usage:": [[0, null]], "Use cases": [[5, null], [23, null]], "Warnings": [[6, null], [24, null]], "Welcome to mediacurator\u2019s documentation!": [[0, null]], "convert": [[3, "convert"], [21, "convert"]], "list": [[3, "list"], [21, "list"]], "mediacurator 1.0.1 Release Notes": [[18, null]], "\u2013delete": [[21, "delete"]], "\u2013dirs": [[21, "dirs"]], "\u2013files": [[21, "files"]], "\u2013filters": [[21, "filters"]], "\u2013inputs": [[21, "inputs"]], "\u2013outputs": [[21, "outputs"]], "\u2013printop": [[21, "printop"]]}, "docnames": ["index", "legacy_usage/errors", "legacy_usage/installation", "legacy_usage/manual", "legacy_usage/quickstart", "legacy_usage/use_cases", "legacy_usage/warnings", "releasenotes/0.0.1-changelog", "releasenotes/0.0.10-changelog", "releasenotes/0.0.11-changelog", "releasenotes/0.0.12-changelog", "releasenotes/0.0.13-changelog", "releasenotes/0.0.4-changelog", "releasenotes/0.0.5-changelog", "releasenotes/0.0.6-changelog", "releasenotes/0.0.7-changelog", "releasenotes/0.0.8-changelog", "releasenotes/0.0.9-changelog", "releasenotes/1.0.1-changelog", "usage/errors", "usage/installation", "usage/manual", "usage/quickstart", "usage/use_cases", "usage/warnings"], "envversion": {"sphinx": 62, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2}, "filenames": ["index.rst", "legacy_usage/errors.rst", "legacy_usage/installation.rst", "legacy_usage/manual.rst", "legacy_usage/quickstart.rst", "legacy_usage/use_cases.rst", "legacy_usage/warnings.rst", "releasenotes/0.0.1-changelog.rst", "releasenotes/0.0.10-changelog.rst", "releasenotes/0.0.11-changelog.rst", "releasenotes/0.0.12-changelog.rst", "releasenotes/0.0.13-changelog.rst", "releasenotes/0.0.4-changelog.rst", "releasenotes/0.0.5-changelog.rst", "releasenotes/0.0.6-changelog.rst", "releasenotes/0.0.7-changelog.rst", "releasenotes/0.0.8-changelog.rst", "releasenotes/0.0.9-changelog.rst", "releasenotes/1.0.1-changelog.rst", "usage/errors.rst", "usage/installation.rst", "usage/manual.rst", "usage/quickstart.rst", "usage/use_cases.rst", "usage/warnings.rst"], "indexentries": {}, "objects": {}, "objnames": {}, "objtypes": {}, "terms": {"": [1, 4, 5, 7, 19, 22, 23], "0": [1, 2, 3, 4, 5, 6], "1": [1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 21], "10": 0, "1080": [3, 21], "1080p": [3, 4, 21, 22], "11": 0, "12": [0, 18], "1280": [3, 21], "13": 0, "1440": [3, 21], "2": [14, 15, 18], "2160": [3, 21], "3": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "3840x2160": [3, 21], "3gp": [21, 22], "4": [0, 1, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19], "480": [3, 21], "5": 0, "6": [0, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18], "7": [0, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18], "720": [3, 21], "720p": [3, 4, 21, 22], "8": 0, "9": [0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], "A": [3, 21], "For": [1, 2, 3, 19, 20, 21, 22], "If": [0, 1, 3, 6, 19, 21, 24], "In": [1, 19], "It": [0, 1, 2, 3, 4, 5, 6, 21], "No": [1, 19], "On": [2, 20], "The": [0, 1, 2, 3, 4, 5, 6, 19, 21, 22, 23, 24], "To": [2, 20, 22], "about": [6, 24], "abov": 22, "accident": [6, 24], "acquaint": [6, 24], "ad": [8, 11, 13, 16, 17, 18], "adjust": 9, "after": [1, 3, 12, 19, 21, 22], "all": [0, 3, 4, 5, 6, 7, 18, 21, 22, 23, 24], "allow": [3, 21], "also": [0, 1, 19], "alwai": [6, 24], "an": [3, 5, 6, 9, 21, 22, 23, 24], "ani": [1, 3, 4, 5, 6, 19, 21, 22, 23, 24], "anyth": [3, 21], "aomedia": [3, 21], "api": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "appli": [3, 6, 12, 21, 22, 24], "apt": [2, 20], "ar": [0, 1, 2, 3, 4, 5, 6, 19, 21, 23, 24], "asf": [21, 22], "assist": [1, 19], "audio": [1, 3, 5, 18, 19, 21, 23], "author": 0, "av1": [0, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 21, 22, 23], "avail": [0, 1, 3, 19, 21, 22], "avi": [3, 4, 5, 21, 22, 23], "avoid": [6, 24], "back": [6, 24], "backup": [6, 24], "backward": 0, "base": [0, 3, 7, 21], "batch": [0, 3, 7, 21], "been": [2, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20], "befor": [6, 18, 24], "being": [6, 12, 24], "below": [0, 6, 24], "better": [1, 18, 19], "big": [1, 19], "big_valu": [1, 19], "black": 18, "break": [0, 3, 11, 18, 21], "bug": [0, 9, 10, 12, 13, 14, 15], "build": [2, 20], "can": [0, 1, 2, 3, 6, 19, 20, 21, 24], "cannot": [6, 24], "carefulli": [6, 24], "case": [0, 3, 4, 21, 22], "caus": [6, 24], "caution": [3, 21], "certain": [1, 19], "chang": 0, "channel": [1, 19], "chapter": [1, 19], "clariti": 9, "class": [13, 14], "clean": [1, 19], "cleanup": 9, "cli": 0, "code": [0, 5, 9, 10, 23], "codec": [0, 3, 4, 5, 7, 21, 22, 23], "comma": [3, 4], "command": [0, 2, 3, 6, 20, 21, 22, 24], "comment": [9, 14], "common": [3, 21], "compat": 0, "complet": [3, 21], "compress": [3, 21], "concis": [3, 21], "consequ": [6, 24], "consid": [1, 19], "consist": 9, "constant": 18, "contain": [0, 1, 2, 3, 4, 5, 6, 21, 23, 24], "control": 18, "convent": 18, "convers": [3, 6, 12, 18, 21, 24], "convert": [0, 4, 5, 6, 7, 22, 23, 24], "copi": 18, "correct": [6, 24], "correctli": [6, 12, 24], "corrupt": [1, 5, 19, 23], "crf": 18, "criteria": [3, 21], "crucial": [6, 24], "current": [0, 1, 2, 3, 4, 5, 6], "d": [21, 22], "damag": [1, 6, 19, 24], "data": [1, 6, 19, 24], "databas": [0, 3, 21], "debian": [2, 20], "decod": [1, 19], "decompress": [3, 21], "default": [3, 4, 21, 22], "definit": [3, 5, 21, 23], "del": [4, 21, 22], "delet": [0, 3, 4, 5, 22, 23], "demonstr": 22, "depend": [1, 19], "descript": 0, "design": [3, 21], "destruct": [6, 24], "detail": [3, 21], "detect": [1, 19], "devic": [3, 21], "digit": [3, 21], "dimens": 18, "dir": [4, 5, 6, 22, 23, 24], "directli": [2, 20], "directori": [3, 6, 9, 21, 22, 24], "displai": [1, 3, 19, 21], "distribut": [1, 2, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], "divx": [3, 4, 16, 21, 22], "dnf": [2, 20], "do": [1, 19], "document": [1, 2, 3, 4, 5, 6], "doesn": [1, 19], "doubl": [3, 4], "download": [1, 2, 19, 20], "dry": 0, "due": 9, "dure": [3, 6, 21, 24], "dv": [21, 22], "e": [2, 3, 20, 21], "each": 18, "effici": [5, 23], "encod": [0, 3, 6, 7, 21, 24], "encount": [1, 3, 9, 19, 21], "enhanc": [1, 9, 19], "ensur": [1, 3, 6, 9, 18, 19, 21, 24], "entir": [6, 24], "error": [0, 6, 7, 9, 24], "especi": [6, 24], "essenti": [6, 24], "even": 18, "exampl": [0, 1, 4, 19, 22], "except": [3, 21], "execut": [1, 6, 19, 22, 24], "exist": [1, 19], "expect": [1, 19], "experi": [1, 19], "ext": [21, 22], "extens": [0, 3, 4, 5, 21, 22, 23], "extent": 7, "f": [21, 22], "f4v": [21, 22], "fabric": [3, 21], "factor": 18, "failur": [1, 19], "familiar": [6, 24], "featur": [0, 1, 2, 3, 4, 5, 6, 19, 24], "fedora": [2, 20], "feel": [1, 19], "few": [1, 19], "fferror": [3, 4, 5, 6, 21, 22, 23, 24], "ffmpeg": [0, 3, 4, 5, 21, 22, 23], "file": [1, 4, 6, 13, 14, 18, 19, 22, 24], "file1": [21, 22], "file2": [21, 22], "filenam": [3, 4, 21, 22], "filetyp": [8, 16, 17], "filter": [0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 22, 23, 24], "find": [0, 3, 7, 21], "first": [6, 7, 24], "fix": [12, 13, 14, 15], "fl": [21, 22], "flag": 0, "flv": [3, 4, 21, 22], "folder": [6, 24], "follow": [0, 1, 2, 3, 4, 5, 6, 7, 19, 20, 22, 23], "form": 21, "format": [3, 4, 5, 18, 21, 22, 23], "found": [0, 1, 3, 19, 21, 22], "frame": [1, 19], "free": [1, 19], "from": [0, 1, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 23], "full": [3, 21], "further": [1, 6, 19, 24], "g": [2, 3, 20, 21], "gather": 10, "get": [6, 24], "gif": [21, 22], "github": [0, 1, 2, 19, 20], "glossari": 0, "gnu": [2, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20], "good": [6, 24], "gui": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "ha": [0, 2, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20], "handl": [0, 18], "have": [3, 21], "hd": [3, 4, 5, 6, 21, 22, 23, 24], "header": [1, 19], "height": [3, 18, 21], "here": [1, 19], "hevc": [3, 21], "high": [3, 5, 21, 23], "higher": [3, 21], "hold": [3, 21], "how": [3, 5, 6, 21, 22, 23, 24], "i": [0, 1, 2, 3, 4, 5, 6, 19, 21, 22, 24], "implement": [7, 18], "import": 0, "includ": [3, 4, 5, 21, 22, 23], "incompat": [0, 1, 2, 3, 4, 5, 6], "incorrect": [6, 24], "indic": [1, 19], "individu": [3, 6, 21, 24], "info": [3, 21], "inform": [0, 1, 7, 19], "input": [3, 22, 23], "instal": 0, "instruct": [0, 1, 2, 3, 4, 5, 6, 20], "interfac": 0, "interleav": [5, 23], "introduc": 18, "involv": [6, 24], "irreplac": [6, 24], "irrevers": [6, 24], "issu": [0, 3, 21], "lack": [1, 19], "larger": [1, 19], "latest": [1, 2, 19, 20], "librari": [5, 6, 23, 24], "like": [1, 19], "line": [0, 3, 11, 18, 21], "linux": [2, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20], "list": [0, 4, 5, 6, 7, 14, 22, 23, 24], "loss": [6, 24], "lot": [5, 23], "low": [6, 24], "lowercas": 18, "lowr": [3, 4, 6, 21, 22, 24], "m2t": [21, 22], "m4v": [3, 4, 21, 22], "mai": [0, 1, 2, 3, 4, 5, 6, 19], "main": [5, 23], "major": 0, "make": [6, 24], "manag": [0, 3, 21], "mani": [1, 5, 19, 23], "manual": 0, "matroska": [3, 21], "mean": [3, 21], "media": [0, 3, 4, 5, 6, 21, 22, 23, 24], "media2": [3, 4, 5, 21, 22, 23], "mediacur": [1, 2, 3, 4, 5, 6, 19, 20, 21, 22, 23, 24], "medialibrari": [9, 10], "medlist": [4, 22], "metadata": [3, 18, 21], "might": [3, 21], "minor": 14, "miss": [1, 9, 19], "mkv": [3, 4, 5, 21, 22, 23], "mnt": [3, 4, 5, 6, 21, 22, 23, 24], "modern": [0, 3, 7, 21], "more": [0, 3, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 21, 22], "mov": [18, 21, 22], "move": [1, 19], "movi": [4, 22], "mp4": [3, 4, 21, 22], "mpeg": [1, 3, 4, 8, 19, 21, 22], "mpeg4": [3, 4, 5, 21, 22, 23], "mpg": [3, 4, 5, 21, 22, 23], "mt": [21, 22], "multipl": [3, 4, 21, 22], "my": [1, 19], "name": [0, 9, 18], "necessari": [1, 19], "necessarili": [1, 19], "next": [1, 19], "non": [6, 24], "none": [3, 21], "now": [2, 20], "o": [21, 22], "occur": [1, 19], "odd": 18, "ogm": [3, 4, 16, 21, 22], "ogv": [21, 22], "old": [3, 4, 5, 21, 22, 23], "older": [5, 23], "omit": [6, 24], "onc": [6, 24], "open": [1, 19], "oper": [3, 10, 21, 22], "option": [0, 1, 4, 6, 19, 22, 24], "org": [1, 19], "organ": 9, "origin": [3, 4, 5, 21, 22, 23], "other": 0, "out": [1, 4, 5, 19], "outdat": [1, 3, 19, 21], "output": [1, 3, 4, 5, 6, 18, 19, 22, 23, 24], "over": 18, "p": [21, 22], "packag": [2, 3, 20, 21], "pad": 18, "paramet": [3, 21], "perform": [6, 24], "perman": [6, 24], "permiss": 12, "pip": [2, 20], "pixel": [3, 18, 21], "platform": [2, 20], "pleas": [0, 5, 23], "possibli": [1, 19], "practic": [6, 24], "prepar": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "prevent": [6, 24], "previou": 0, "print": [0, 1, 4, 19, 21, 22], "print_opt": [3, 21, 22], "printop": [22, 23], "prior": [0, 1, 2, 3, 4, 5, 6], "process": [1, 3, 6, 19, 21, 22, 24], "program": [3, 21], "project": [1, 18, 19], "provid": [1, 2, 3, 19, 20, 21], "purg": 0, "pypi": 0, "python": [0, 3, 7, 21], "qt": [1, 19], "qualiti": [6, 18, 24], "quennevil": [3, 21], "quickstart": 0, "quit": [1, 19], "rang": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], "rate": 18, "raw": [1, 19], "re": [0, 1, 6, 19, 24], "reach": [1, 19], "readabl": [3, 9, 11, 18, 21], "reason": [5, 23], "recod": [0, 3, 7, 21], "recommend": [6, 24], "recov": [6, 24], "rectifi": [9, 10], "recur": [1, 19], "reduc": [6, 24], "refer": [0, 1, 3, 19, 21], "referenc": [1, 19], "refin": 9, "relat": [1, 19], "renam": 18, "repair": [0, 3, 6, 7, 21, 24], "report": [1, 19], "repositori": [1, 19], "requir": [2, 20], "resolut": [0, 3, 6, 7, 21, 24], "result": [3, 21, 22], "retri": [1, 19], "risk": [6, 24], "rm": [21, 22], "run": [0, 1, 2, 19, 20], "save": [5, 23], "scan": [3, 21], "sd": [3, 21], "search": [3, 21], "see": [0, 5, 22, 23], "segfault": [1, 19], "sei": [1, 19], "select": [3, 5, 6, 21, 22, 23, 24], "separ": [3, 4, 21, 22], "set": [3, 18, 21, 22], "sever": [6, 24], "short": 21, "should": [3, 21], "singl": [3, 21], "site": [2, 20], "size": 18, "so": [6, 24], "some": [1, 6, 19, 24], "sourc": [0, 1, 19], "space": [5, 21, 22, 23], "specif": [3, 6, 21, 24], "specifi": [3, 21, 22], "standard": [3, 5, 18, 21, 23], "start": 0, "step": [1, 19], "stream": [1, 19], "strongli": [6, 24], "structur": 22, "subsd": [3, 5, 6, 21, 23, 24], "substandard": [3, 5, 6, 21, 23, 24], "subtitl": 18, "success": [3, 21, 22], "sudo": [2, 20], "suggest": [1, 19], "supplement": [1, 19], "support": [1, 3, 19, 21], "sure": [6, 24], "swf": [21, 22], "synopsi": 0, "t": [1, 18, 19, 21, 22], "target": [6, 24], "test": [2, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20], "text": [4, 5, 22, 23], "than": [1, 19], "thei": [3, 6, 21, 24], "thi": [2, 3, 7, 20, 21], "through": [1, 9, 19], "too": [1, 19], "tool": [0, 3, 6, 21, 24], "track": [1, 19], "troubleshoot": [1, 19], "txt": [4, 22], "type": [1, 19], "ubuntu": [2, 20], "uhd": [3, 4, 21, 22], "ultra": [3, 21], "unabl": 10, "undergon": 0, "unintend": [6, 24], "unsupport": [3, 21], "unsur": [6, 24], "up": [1, 6, 19, 24], "updat": [1, 2, 19, 20], "us": [0, 1, 2, 3, 4, 19, 20, 21, 22], "usag": [1, 2, 3, 4, 5, 6, 24], "user": [3, 21], "v": [5, 23], "valu": [1, 3, 4, 13, 14, 19, 21, 22], "valuabl": [6, 24], "variabl": 9, "variou": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "verbos": [1, 3, 4, 5, 19, 21, 22, 23], "verifi": [2, 6, 20, 24], "version": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], "vid": [3, 4, 21, 22], "video": [0, 1, 3, 4, 5, 6, 7, 10, 18, 19, 21, 22, 23, 24], "video2": [3, 21], "vob": [3, 13, 21, 22], "warn": [0, 3, 5, 21, 23], "we": [6, 24], "webm": [3, 4, 17, 21, 22], "well": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "what": [5, 23], "when": [1, 19], "where": [9, 10], "which": [1, 19], "while": [1, 19], "width": [3, 18, 21], "window": [2, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 23], "without": [0, 7], "wmv": [3, 4, 5, 21, 22, 23], "wmv3": [3, 4, 21, 22], "work": [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 24], "would": [1, 5, 9, 10, 19, 23], "x264": [3, 4, 21, 22], "x265": [0, 3, 4, 7, 18, 21, 22], "you": [0, 1, 2, 3, 6, 19, 20, 21, 24], "your": [1, 2, 6, 19, 20, 24], "yourself": [6, 24]}, "titles": ["Welcome to mediacurator\u2019s documentation!", "Errors", "Installation", "Manual", "Quickstart", "Use cases", "Warnings", "MediaCurator 0.0.1 Release Notes", "MediaCurator 0.0.10 Release Notes", "MediaCurator 0.0.11 Release Notes", "MediaCurator 0.0.12 Release Notes", "MediaCurator 0.0.13 Release Notes", "MediaCurator 0.0.4 Release Notes", "MediaCurator 0.0.5 Release Notes", "MediaCurator 0.0.6 Release Notes", "MediaCurator 0.0.7 Release Notes", "MediaCurator 0.0.8 Release Notes", "MediaCurator 0.0.9 Release Notes", "mediacurator 1.0.1 Release Notes", "Errors", "Installation", "Manual", "Quickstart", "Use cases", "Warnings"], "titleterms": {"": 0, "0": [0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "1": [0, 7, 18], "10": 8, "11": 9, "12": 10, "13": 11, "4": 12, "5": 13, "6": 14, "7": 15, "8": 16, "9": 17, "also": [3, 21], "author": [3, 21], "batch": [5, 23], "bug": [1, 19], "case": [5, 6, 23, 24], "chang": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "compat": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "convert": [3, 21], "del": [3, 6], "delet": [6, 21, 24], "deprec": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "descript": [3, 21], "dir": [3, 21], "document": 0, "drop": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "dry": [6, 24], "encod": [1, 5, 19, 23], "error": [1, 3, 5, 19, 21, 23], "exampl": [3, 6, 21, 24], "featur": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "ffmpeg": [1, 2, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], "file": [3, 21], "filter": [3, 21], "flag": [6, 24], "from": [2, 20], "futur": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "glossari": [3, 21], "handl": [3, 21], "highlight": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "import": [6, 24], "improv": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "inform": [5, 23], "input": 21, "instal": [2, 20], "issu": [1, 19], "legaci": 0, "list": [3, 21], "manual": [3, 21], "mediacur": [0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "name": [3, 21], "new": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "note": [0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 24], "o": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "option": [3, 21], "other": [1, 19], "out": 3, "output": 21, "pre": 0, "print": [3, 5, 23], "printop": 21, "purg": [5, 23], "pypi": [2, 20], "python": [8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "quickstart": [4, 22], "re": [5, 23], "releas": [0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "repair": [1, 5, 19, 23], "run": [6, 24], "see": [3, 21], "support": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "synopsi": [3, 21], "us": [5, 6, 23, 24], "usag": 0, "warn": [6, 24], "welcom": 0, "without": [6, 24]}}) \ No newline at end of file diff --git a/docs/usage/errors.html b/docs/usage/errors.html index be8dd35..f98fef9 100644 --- a/docs/usage/errors.html +++ b/docs/usage/errors.html @@ -8,7 +8,7 @@ Errors — mediacurator documentation - + @@ -36,34 +36,35 @@

                              Errors

                              -

                              FFmpeg can detect quite a few errors in the encoding of your source video’s encoding. It can also be used to repair errors.

                              +

                              FFmpeg can detect quite a few errors in the encoding of your source video’s encoding and can also be used to repair these errors.

                              -

                              Repairable encoding errors

                              +

                              Repairable Encoding Errors

                              Here are some example errors that mediacurator will print and can possibly repair by re-encoding:

                                -
                              • “Referenced QT chapter track not found”

                              • -
                              • “Error, header damaged or not MPEG-4 header”

                              • -
                              • “Header missing”

                              • -
                              • “SEI type”

                              • -
                              • “no frame!”

                              • -
                              • “Error while decoding MPEG audio frame.”

                              • -
                              • “big_values too big”

                              • +
                              • “Referenced QT chapter track not found”: Indicates that the video references a chapter that doesn’t exist.

                              • +
                              • “Error, header damaged or not MPEG-4 header”: The file’s header is corrupted or missing.

                              • +
                              • “Header missing”: The file lacks the necessary header information for decoding.

                              • +
                              • “SEI type”: Issues related to SEI (Supplemental Enhancement Information) data.

                              • +
                              • “no frame!”: No video frames available for processing.

                              • +
                              • “Error while decoding MPEG audio frame.”: Issues decoding the audio stream.

                              • +
                              • “big_values too big”: Indicates that certain values in the file are larger than expected.

                              -

                              FFmpeg issues

                              -

                              While using FFmpeg depending on your version you may also face other errors like segfaults. mediacurator will also print information when that occurs and move on to the next video after cleaning up after failure.

                              -

                              If that happens there are a few steps you can take:

                              +

                              FFmpeg Issues

                              +

                              While using FFmpeg, you may encounter other errors (such as segfaults) depending on your version. Mediacurator will also print information when that occurs and will move on to the next video after cleaning up any failures.

                              +

                              If you experience these errors, consider the following steps:

                                -
                              • Update FFmpeg to its latest version as it is a very active project and most distributions serve old versions in their repositories

                              • -
                              • Run mediacurator with the verbose print option wich will print the raw FFmpeg output

                              • -
                              • Try again: In my experience some errors don’t necessarly recur…

                              • +
                              • Update FFmpeg: Ensure you are using the latest version by downloading it from ffmpeg.org, as many distributions provide outdated versions in their repositories.

                              • +
                              • Run with Verbose Option: Execute mediacurator with the verbose print option, which will display the raw FFmpeg output for better troubleshooting.

                              • +
                              • Retry: In my experience, some errors do not necessarily recur…

                              -

                              Other bugs

                              -

                              If you face other bugs, issues or want to suggest features feel free to open a bug report on GitHub

                              +

                              Other Bugs

                              +

                              If you encounter other bugs, issues, or would like to suggest features, feel free to open a bug report on GitHub.

                              +

                              For further assistance, you can reach out through the GitHub repository or the project’s support channels.

                              @@ -95,15 +96,27 @@
                            • Manual
                            • Use cases
                            • Errors

                            Release Notes:

                            +

                            Legacy Usage:

                            + +

                            Legacy Release Notes:

                            +
                            • MediaCurator 0.0.13 Release Notes
                            • MediaCurator 0.0.12 Release Notes
                            • MediaCurator 0.0.11 Release Notes
                            • diff --git a/docs/usage/installation.html b/docs/usage/installation.html index a4563cd..be6f5d9 100644 --- a/docs/usage/installation.html +++ b/docs/usage/installation.html @@ -8,7 +8,7 @@ Installation — mediacurator documentation - + @@ -36,14 +36,39 @@

                              Installation

                              -

                              This package has only been tested on GNU/Linux & Windows and requires FFMPEG installed. For now it will be distributed on GitHub

                              +

                              This package has been tested on GNU/Linux (e.g., Debian, Ubuntu, Fedora) and Windows, and requires FFmpeg to be installed. For now, it will be distributed on GitHub.

                              Install FFmpeg

                              -

                              Download FFmpeg

                              +

                              To install FFmpeg, you can follow the instructions for your platform:

                              +
                                +
                              • +
                                On Debian and Ubuntu:
                                sudo apt update
                                +sudo apt install ffmpeg
                                +
                                +
                                +
                                +
                                +
                              • +
                              • +
                                On Fedora:
                                sudo dnf install ffmpeg
                                +
                                +
                                +
                                +
                                +
                              • +
                              • On Windows: +- Download the latest build from FFmpeg. +- Follow the installation instructions provided on the site.

                              • +
                              +

                              To verify your FFmpeg installation, you can run:

                              +
                              ffmpeg -version
                              +
                              +

                              Install from PyPi

                              -
                              1pip install mediacurator
                              +

                              You can install the mediacurator package directly from PyPi using the following command:

                              +
                              pip install mediacurator
                               
                              @@ -85,6 +110,18 @@

                              Release Notes:

                              +

                              Legacy Usage:

                              + +

                              Legacy Release Notes:

                              +

                              Synopsis

                              -
                              mediacurator [list,convert] [-del]
                              -    [-in:any,avi,mkv,wmv,mpg,mp4,m4v,flv,vid,divx,ogm,webm]
                              -    [-filters:fferror,old,lowres,hd,720p,1080p,uhd,mpeg,mpeg4,x264,wmv3,wmv,vob]
                              -    [-out:mkv/mp4,x265/av1]
                              -    [-print:list,formated,verbose]
                              -    [-dirs/-files:"/mnt/media/",,"/mnt/media2/"]
                              -
                              -
                              -

                              for multiple files or filenames use double comma separated values “,,”

                              -

                              default options are:

                              -
                              -in:any
                              --filters:
                              --out:mkv,x265
                              --print:list
                              +
                              mediacurator <command> [options]
                              +
                              +mediacurator [list convert] [-del/--delete]
                              +    [-i/--inputs any 3gp asf avi divx dv f4v flv gif m2ts m4v mkv mov mp4 mpeg mpg mts ogm ogv rm swf ts vid vob webm wmv]
                              +    [-fl/--filters fferror old lowres hd 720p 1080p uhd mpeg mpeg4 x264 wmv3 wmv]
                              +    [-o/--outputs mkv/mp4 x265/av1]
                              +    [-p/--printop list formatted verbose]
                              +    [-d/--dirs "/mnt/media/" "/mnt/media2/"]
                              +    [-f/--files "file1.ext" "file2.ext"]
                               
                              +

                              Available commands: +- list: List all videos with specified filters. +- convert: Convert videos to specified formats.

                              +

                              Options:

                              +
                                +
                              • -del or –delete: Delete found results after successful operations. Use with caution.

                              • +
                              • -i <input> or –inputs <input>: Specify input file formats (default: any).

                              • +
                              • -fl <filter> or –filters <filter>: Apply filters to the selection of videos.

                              • +
                              • -o <output> or –outputs <output>: Specify output formats (default: mkv, x265).

                              • +
                              • -p <print_option> or –printop <print_option>: Set print options (default: list).

                              • +
                              • -f <file> or –files <file>: Specify files to process.

                              • +
                              • -d <directory> or –dirs <directory>: Specify directories to process.

                              • +
                              +

                              For multiple files or filenames, use space-separated values ( ).

                              +

                              Default options (if not specified):

                              +
                                +
                              • -i/–inputs: any

                              • +
                              • -fl/–filters: (none)

                              • +
                              • -o/–outputs: mkv, x265

                              • +
                              • -p/–printop: list

                              • +

                              Description

                              -

                              mediacurator is a Python command line tool to manage a media database.

                              +

                              mediacurator is a Python command-line tool designed to manage a media database. It allows you to:

                                -
                              • List all the video’s and their information with or without filters

                              • -
                              • Batch find and repair/convert videos with encoding errors

                              • -
                              • Batch recode videos to more modern codecs (x265 / AV1) based on filters: extentions, codecs, resolutions …

                              • +
                              • List all videos and their metadata, optionally filtered by specified criteria.

                              • +
                              • Batch find, repair, or convert videos with encoding errors.

                              • +
                              • Batch recode videos to modern codecs (e.g., x265, AV1) based on filters (e.g., container, codec, resolution).

                              Options

                              list

                              -

                              Search and list videos filtered by the parameters passed by the user.

                              +
                              +

                              Search and list videos filtered by the user-provided parameters.

                              +

                              convert

                              -

                              Search and convert all videos filtered by the parameters passed by the user.

                              +
                              +

                              Search and convert all videos filtered by the user-provided parameters.

                              +
                              -
                              -

                              -del:

                              -

                              Delete all original videos once selected operations have been done succefully.

                              +
                              +

                              –delete

                              +
                              +

                              Short form: -del

                              +

                              Deletes the original videos after successful completion of operations (e.g., conversion or listing). Use with caution.

                              See Warnings

                              +
                              -
                              -

                              -in:

                              -

                              [any,avi,mkv,wmv,mpg,mp4,m4v,flv,vid,divx,ogm]

                              -

                              Search all videos of the selected container extensions in the directories. By default it will include any file format.

                              +
                              +

                              –inputs

                              +
                              +

                              Short form: -i

                              +

                              [any, 3gp, asf, avi, divx, dv, f4v, flv, gif, m2ts, m4v, mkv, mov, mp4, mpeg, mpg, mts, ogm, ogv, rm, swf, ts, vid, vob, webm, wmv]

                              +

                              Filters videos by file format (container extensions). The default is any, meaning all formats are included.

                              +
                              -

                              -filters:

                              -

                              [fferror,old,lowres,hd,720p,1080p,uhd,mpeg,mpeg4,x264,wmv3,wmv]

                              -

                              Filter the selected videos for parameters:

                              +

                              –filters

                              +
                              +

                              Short form: -fl

                              +

                              [fferror, old, lowres, hd, 720p, 1080p, uhd, mpeg, mpeg4, x264, wmv3, wmv]

                              +

                              Filters videos based on specific criteria:

                                -
                              • fferror: Select all videos with encoding errors (See Errors)

                              • -
                              • old: Select all videos using old codecs (Everything except hevc or av1)

                              • -
                              • hd: 720p, 1080p, uhd

                              • -
                              • lowres: Everything not hd

                              • -
                              • uhd: if width >= 2160 or height >= 2160

                              • -
                              • 1080p: if less than uhd and width >= 1440 or height >= 1080

                              • -
                              • 720p: if less than 1080p and width >= 1280 or height >= 720:

                              • -
                              • sd: if less than 720p and if height >= 480

                              • -
                              • subsd: Substandard definitions: Everything under 480p

                              • -
                              • mpeg,mpeg4,x264,wmv3,wmv,vob: Filter for videos encoded in the requested video codec

                              • +
                              • fferror: Select videos with encoding errors (see Errors)

                              • +
                              • old: Select videos using outdated codecs (anything except hevc or av1)

                              • +
                              • hd: Select videos in HD (720p, 1080p, UHD)

                              • +
                              • lowres: Select videos that are not in HD

                              • +
                              • uhd: Select Ultra-HD videos (width or height >= 2160)

                              • +
                              • 1080p: Select Full-HD videos (1440 <= width < 2160 or 1080 <= height < 2160)

                              • +
                              • 720p: Select HD videos (1280 <= width < 1440 or 720 <= height < 1080)

                              • +
                              • sd: Select standard-definition videos (480 <= height < 720)

                              • +
                              • subsd: Select substandard-definition videos (height < 480)

                              • +
                              • mpeg, mpeg4, x264, wmv3, wmv, vob: Filter by video codec

                              +
                              -
                              -

                              -out:

                              -

                              [mkv/mp4,x265/av1]

                              -

                              Select the outputs for the video conversions

                              +
                              +

                              –outputs

                              +
                              +

                              Short form: -o

                              +

                              [mkv/mp4, x265/av1]

                              +

                              Specifies the output format for video conversions:

                                -
                              • mkv: (Default) Package the resulting video in a Matroska container.

                              • -
                              • mp4: Package the resulting video in a container.

                              • -
                              • x265/hevc: (Default) Encode the video using the x265 compression format.

                              • -
                              • av1: Encode the video using the AOMedia Video 1 compression format. This will be used as default once the developpers at FFmpeg move it out of experimental .

                              • +
                              • mkv: (Default) Package the output video in a Matroska container.

                              • +
                              • mp4: Package the output video in an MP4 container.

                              • +
                              • x265 or hevc: (Default) Encode the video using x265 (HEVC).

                              • +
                              • av1: Encode the video using AOMedia Video 1 (AV1).

                              +
                              -
                              -

                              -print:

                              -

                              [list,formated,verbose]

                              +
                              +

                              –printop

                              +
                              +

                              Short form: -p

                              +

                              [list, formatted, verbose]

                              +

                              Specifies how the output should be displayed:

                                -
                              • list: (Default) Print the information about the videos on a single line

                              • +
                              • list: (Default) Prints video info in a concise, single-line format.

                              -Deleting videos +List videos (single-line output)
                                -
                              • formated: Print the information in an aerated format

                              • +
                              • formatted: Prints video info in a more readable format with line breaks.

                              -Deleting videos +List videos (formatted output)
                                -
                              • verbose: Print the FFmpeg output during the video conversions

                              • +
                              • verbose: Prints the FFmpeg output during conversions.

                              +
                              -

                              -dirs:

                              -

                              [“/mnt/media/”,,”/mnt/media2/”]

                              -

                              The directories to scan as a double comma separated values list.

                              +

                              –dirs

                              +
                              +

                              Short form: -d

                              +

                              [“/mnt/media/”, “/mnt/media2/”]

                              +

                              Specifies directories to scan, separated by spaces.

                              +
                              -

                              -files:

                              -

                              [“/mnt/media/video.avi”,,”/mnt/media2/video2.mp4”]

                              -

                              Specific videos to include as a double comma separated values list.

                              +

                              –files

                              +
                              +

                              Short form: -f

                              +

                              [“/mnt/media/video.avi”, “/mnt/media2/video2.mp4”]

                              +

                              Specifies individual video files to process, separated by spaces.

                              +

                              Examples

                              -
                              # List all videos with old codec in formated format
                              -mediacurator list -filters:old -print:formated -dirs:/mnt/media/ >> ../medlist.txt
                              -# Convert all videos with the codec mpeg4 in a mp4 using the av1 video codec and the delete the originals
                              -mediacurator convert -del -filters:mpeg4 -out:av1,mp4 -dirs:"/mnt/media/Movies/"
                              -# Convert any video with avi or mpg extensions, print formated text including ffmpeg's output and then delete the originals
                              -mediacurator convert -del -in:avi,mpg -print:formated,verbose -dirs:/mnt/media/
                              +
                              # This command lists all videos in the specified directories that use old codecs and
                              +# formats the output.
                              +mediacurator list --filters old --printop formatted --dirs "/mnt/media/" "/mnt/media2/"
                              +
                              +# This command converts all MPEG4 videos found in the specified directories to AV1 format
                              +# in MP4 containers and deletes the originals.
                              +mediacurator convert --delete --filters mpeg4 --outputs av1 mp4 --dirs "/mnt/media/" "/mnt/media2/"
                              +
                              +# This command converts AVI or MPG videos, displays detailed output during conversion, and
                              +# deletes originals.
                              +mediacurator convert --delete --inputs avi mpg --printop formatted verbose --dirs "/mnt/media/" "/mnt/media2/"
                               
                              -

                              More examples in Use cases

                              +

                              For more examples, see Use cases

                              See Also

                              -

                              FFmpeg

                              + +
                              +
                              +

                              Glossary

                              +
                                +
                              • Codec: A program or device that compresses and decompresses digital media.

                              • +
                              • Container: A file format that holds video, audio, and metadata.

                              • +
                              • UHD: Ultra High Definition, refers to video resolutions of 3840x2160 pixels or higher.

                              • +
                              +
                              +
                              +

                              Error Handling

                              +

                              Common issues users might encounter include:

                              +
                                +
                              • Encoding Errors: If videos have encoding errors, they can be filtered using the –filters fferror option.

                              • +
                              • Unsupported Formats: Ensure that input formats specified in –inputs are supported by mediacurator.

                              • +

                              Author

                              @@ -198,6 +263,8 @@ mediacurator convert -delOptions
                            • Examples
                            • See Also
                            • +
                            • Glossary
                            • +
                            • Error Handling
                            • Author
                            @@ -207,6 +274,18 @@ mediacurator convert -delRelease Notes:

                            +

                            Legacy Usage:

                            + +

                            Legacy Release Notes:

                            +
                            • MediaCurator 0.0.13 Release Notes
                            • MediaCurator 0.0.12 Release Notes
                            • MediaCurator 0.0.11 Release Notes
                            • diff --git a/docs/usage/quickstart.html b/docs/usage/quickstart.html index f1fa872..d306b00 100644 --- a/docs/usage/quickstart.html +++ b/docs/usage/quickstart.html @@ -8,7 +8,7 @@ Quickstart — mediacurator documentation - + @@ -36,32 +36,52 @@

                              Quickstart

                              -
                              mediacurator [list,convert] [-del]
                              -    [-in:any,avi,mkv,wmv,mpg,mp4,m4v,flv,vid,divx,ogm,webm]
                              -    [-filters:fferror,old,lowres,hd,720p,1080p,uhd,mpeg,mpeg4,x264,wmv3,wmv]
                              -    [-out:mkv/mp4,x265/av1]
                              -    [-print:list,formated,verbose]
                              -    [-dirs/-files:"/mnt/media/",,"/mnt/media2/"]
                              +

                              To use mediacurator, execute the following command structure:

                              +
                              mediacurator <command> [options]
                              +
                              +mediacurator [list convert] [-del/--delete]
                              +    [-i/--inputs any 3gp asf avi divx dv f4v flv gif m2ts m4v mkv mov mp4 mpeg mpg mts ogm ogv rm swf ts vid vob webm wmv]
                              +    [-fl/--filters fferror old lowres hd 720p 1080p uhd mpeg mpeg4 x264 wmv3 wmv]
                              +    [-o/--outputs mkv/mp4 x265/av1]
                              +    [-p/--printop list formatted verbose]
                              +    [-d/--dirs "/mnt/media/" "/mnt/media2/"]
                              +    [-f/--files "file1.ext" "file2.ext"]
                               
                              -

                              for multiple files or filenames use double comma separated values “,,”

                              -

                              default options are:

                              -
                              -in:any
                              --filters:
                              --out:mkv,x265
                              --print:list
                              +

                              Available commands: +- list: List all videos with specified filters. +- convert: Convert videos to specified formats.

                              +

                              Options:

                              +
                                +
                              • -del or –delete: Delete found results after successful operations.

                              • +
                              • -i <input> or –inputs <input>: Specify input file formats (default: any).

                              • +
                              • -fl <filter> or –filters <filter>: Apply filters to the selection of videos.

                              • +
                              • -o <output> or –outputs <output>: Specify output formats (default: mkv, x265).

                              • +
                              • -p <print_option> or –printop <print_option>: Set print options (default: list).

                              • +
                              • -f <file> or –files <file>: Specify files to process.

                              • +
                              • -d <directory> or –dirs <directory>: Specify directories to process.

                              • +
                              +

                              For multiple files or filenames, use space-separated values ( ).

                              +

                              Default options:

                              +
                                +
                              • -i/–inputs any

                              • +
                              • -fl/–filters

                              • +
                              • -o/–outputs mkv x265

                              • +
                              • -p/–printop list

                              • +
                              +

                              Examples:

                              +

                              The following examples demonstrate how to use mediacurator with the options listed above:

                              +
                              # List all videos with an old codec in formatted format
                              +mediacurator list --filters old --printop formatted --dirs /mnt/media/ >> ../medlist.txt
                              +
                              +# Convert all videos with the MPEG4 codec to MP4 using the AV1 codec and delete the originals
                              +mediacurator convert --delete --filters mpeg4 --outputs av1,mp4 --dirs "/mnt/media/Movies/"
                              +
                              +# Convert any video with AVI or MPG extensions, print formatted text including FFmpeg's output, and then delete the originals
                              +mediacurator convert --delete --inputs avi,mpg --printop formatted,verbose --dirs /mnt/media/
                               
                              -

                              Examples:

                              -
                              # List all videos with old codec in formated format
                              -mediacurator list -filters:old -print:formated -dirs:/mnt/media/ >> ../medlist.txt
                              -# Convert all videos with the codec mpeg4 in a mp4 using the av1 video codec and the delete the originals
                              -mediacurator convert -del -filters:mpeg4 -out:av1,mp4 -dirs:"/mnt/media/Movies/"
                              -# Convert any video with avi or mpg extensions, print formated text including ffmpeg's output and then delete the originals
                              -mediacurator convert -del -in:avi,mpg -print:formated,verbose -dirs:/mnt/media/
                              -
                              -
                              -

                              More examples in Use cases

                              +

                              For more examples, see Use cases.

                              @@ -96,6 +116,18 @@ mediacurator convert -delRelease Notes:

                              +

                              Legacy Usage:

                              + +

                              Legacy Release Notes:

                              + @@ -66,45 +66,45 @@

                              Purge

                              Please see Warnings

                              List and delete all videos using the Windows Media Video codecs

                              -
                              mediacurator list -del -filters:wmv -dirs:/mnt/media/
                              +
                              mediacurator list --delete --filters wmv --dirs "/mnt/media/" "/mnt/media2/"
                               
                              -

                              List and delete all videos using an Audio Video Interleave

                              -
                              mediacurator list -del -in:avi -dirs:/mnt/media/
                              +

                              List and delete all videos using Audio Video Interleave

                              +
                              mediacurator list --delete --inputs avi --dirs "/mnt/media/" "/mnt/media2/"
                               

                              List and delete any videos with encoding errors

                              -
                              mediacurator list -del -filters:fferror -dirs:/mnt/media/
                              +
                              mediacurator list --delete --filters fferror --dirs "/mnt/media/" "/mnt/media2/"
                               

                          Batch repair encoding errors

                          List all videos with encoding errors

                          -
                          mediacurator list -filters:fferror -dirs:/mnt/media/
                          +
                          mediacurator list --filters fferror --dirs "/mnt/media/" "/mnt/media2/"
                           

                          List and delete any videos with encoding errors

                          -
                          mediacurator list -del -filters:fferror -dirs:/mnt/media/
                          +
                          mediacurator list --delete --filters fferror --dirs "/mnt/media/" "/mnt/media2/"
                           
                          -

                          Convert all videos with encoding errors to High Efficiency Video Coding and the delete the originals

                          -
                          mediacurator convert -del -filters:fferror -dirs:"/mnt/media/Movies/"
                          +

                          Convert all videos with encoding errors to High Efficiency Video Coding and delete the originals

                          +
                          mediacurator convert --delete --filters fferror --dirs "/mnt/media/" "/mnt/media2/"
                           

                          Batch re-encode

                          Convert all videos with old codecs to High Efficiency Video Coding to save space and delete the originals

                          -
                          mediacurator convert -del -filters:old -dirs:"/mnt/media/Movies/"
                          +
                          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

                          -
                          mediacurator convert -filters:mpeg4 -out:av1,mkv -dirs:"/mnt/media/Movies/"
                          +
                          mediacurator convert --filters mpeg4 --outputs av1,mkv --dirs "/mnt/media/" "/mnt/media2/"
                           
                          -

                          Convert any video with avi or mpg extensions, print formated text including ffmpeg’s output and then delete the originals

                          -
                          mediacurator convert -del -in:avi,mpg -print:formated,verbose -dirs:/mnt/media/
                          +

                          Convert any video with avi or mpg extensions, print formatted text including ffmpeg’s output, and then delete the originals

                          +
                          mediacurator convert --delete --inputs avi,mpg --printop formatted,verbose --dirs "/mnt/media/" "/mnt/media2/"
                           
                          @@ -148,6 +148,18 @@

                          Release Notes:

                          +

                          Legacy Usage:

                          + +

                          Legacy Release Notes:

                          +
                          • MediaCurator 0.0.13 Release Notes
                          • MediaCurator 0.0.12 Release Notes
                          • MediaCurator 0.0.11 Release Notes
                          • diff --git a/docs/usage/warnings.html b/docs/usage/warnings.html index fd95918..db1e1c8 100644 --- a/docs/usage/warnings.html +++ b/docs/usage/warnings.html @@ -8,7 +8,7 @@ Warnings — mediacurator documentation - + @@ -36,32 +36,62 @@

                            Warnings

                            -

                            Before using the delete feature please try a few dry runs to get acquainted with mediacurator as it can irreparably damage your media library when not used properly.

                            -

                            When using the -del flag here is the expected behavior:

                            -

                            To delete all non-hd videos in a folder:

                            -
                            mediacurator list -del -filters:lowres  -dirs/-files:"/mnt/media/"
                            +
                            +

                            Warning

                            +

                            Before using the delete feature, we strongly recommend running several dry runs to get acquainted with mediacurator, as incorrect usage can cause irreversible damage to your media library.

                            +
                            +

                            The –delete flag will permanently delete files, so it is crucial to ensure that the command is executed correctly. Below are some examples of how the delete feature works.

                            +
                            +

                            Example use cases for the –delete Flag

                            +
                              +
                            1. Delete all non-HD (low-resolution) videos in a folder:

                            2. +
                            +
                            mediacurator list --delete --filters lowres --dirs "/mnt/media/"
                             
                            -

                            To delete all substandard videos in a folder:

                            -
                            mediacurator list -del -filters:subsd  -dirs/-files:"/mnt/media/"
                            +
                              +
                            1. Delete all substandard quality videos in a folder:

                            2. +
                            +
                            mediacurator list --delete --filters subsd --dirs "/mnt/media/"
                             
                            Deleting videos -

                            To delete all videos in a folder with encoding errors:

                            -
                            mediacurator list -del -filters:fferror  -dirs/-files:"/mnt/media/"
                            +
                              +
                            1. Delete all videos in a folder with encoding errors:

                            2. +
                            +
                            mediacurator list --delete --filters fferror --dirs "/mnt/media/"
                             
                            -

                            To convert (repair) then delete all videos in a folder with encoding errors:

                            -
                            mediacurator convert -del -filters:fferror  -dirs/-files:"/mnt/media/"
                            +
                              +
                            1. Convert (repair) and then delete all videos in a folder with encoding errors:

                            2. +
                            +
                            mediacurator convert --delete --filters fferror --dirs "/mnt/media/"
                             
                            -

                            To delete all videos in a folder:

                            -
                            mediacurator list -del -filters:lowres  -dirs/-files:"/mnt/media/"
                            +
                              +
                            1. Delete all videos in a folder:

                            2. +
                            +
                            mediacurator list --delete --dirs "/mnt/media/"
                             
                            -

                            All these commands can have valuable use but are irrecoverable if done unintended.

                            -

                            Again, please try a few dry runs without -del until you are acquainted with mediacurator.

                            +
                            +
                            +

                            Important Notes

                            +
                              +
                            • Irreversibility: All of these commands involve permanent deletion. Once a file is deleted using the –delete flag, it cannot be recovered.

                            • +
                            • Run without `–delete` first: Always perform several dry runs by omitting the –delete flag to ensure that the correct files are selected for deletion. Familiarizing yourself with the tool before using destructive commands is essential to avoid unintended consequences.

                            • +
                            • Specific File Selection: If you’re unsure about applying filters to an entire directory, you can use the –files option to target individual files for deletion or conversion, further reducing the risk of unintended deletions.

                            • +
                            • Backup Recommendation: Before running any commands with the –delete flag, it is a good practice to back up your media library or the specific directories being processed, especially if they contain valuable or irreplaceable files.

                            • +
                            +
                            +
                            +

                            Dry run example (without deletion)

                            +
                            mediacurator list --filters lowres --dirs "/mnt/media/"
                            +
                            +
                            +

                            Make sure you carefully verify the output and files selected during the dry runs to prevent accidental data loss.

                            +
                            @@ -86,7 +116,12 @@

                            Navigation

                            Usage:

                              -
                            • Warnings
                            • +
                            • Warnings +
                            • Installation
                            • Quickstart
                            • Manual
                            • @@ -96,6 +131,18 @@

                              Release Notes:

                              +

                              Legacy Usage:

                              + +

                              Legacy Release Notes:

                              +
                              • MediaCurator 0.0.13 Release Notes
                              • MediaCurator 0.0.12 Release Notes
                              • MediaCurator 0.0.11 Release Notes
                              • diff --git a/docsource/source/_static/Legacy-Screenshot-delete.png b/docsource/source/_static/Legacy-Screenshot-delete.png new file mode 100644 index 0000000..03dc5bb Binary files /dev/null and b/docsource/source/_static/Legacy-Screenshot-delete.png differ diff --git a/docsource/source/_static/Screenshot-delete.png b/docsource/source/_static/Screenshot-delete.png index 03dc5bb..6442b20 100644 Binary files a/docsource/source/_static/Screenshot-delete.png and b/docsource/source/_static/Screenshot-delete.png differ diff --git a/docsource/source/_static/Screenshot-print_formated.png b/docsource/source/_static/Screenshot-print_formated.png deleted file mode 100644 index c4e54d2..0000000 Binary files a/docsource/source/_static/Screenshot-print_formated.png and /dev/null differ diff --git a/docsource/source/_static/Screenshot-print_formated-single.png b/docsource/source/_static/Screenshot-print_formatted-single.png similarity index 100% rename from docsource/source/_static/Screenshot-print_formated-single.png rename to docsource/source/_static/Screenshot-print_formatted-single.png diff --git a/docsource/source/_static/Screenshot-print_list.png b/docsource/source/_static/Screenshot-print_list.png deleted file mode 100644 index 9435934..0000000 Binary files a/docsource/source/_static/Screenshot-print_list.png and /dev/null differ diff --git a/docsource/source/_static/custom.css b/docsource/source/_static/custom.css index 4faa61a..3d6a6c2 100644 --- a/docsource/source/_static/custom.css +++ b/docsource/source/_static/custom.css @@ -1,53 +1,57 @@ /* custom.css */ +/* Add text wrap to code blocks */ +/* pre { + white-space: pre-wrap; +} */ + /* Add breakpoints for responsive design */ @media screen and (min-width: 1200px) { - /* Adjust layout for large screens */ - div.document { - width: 90%; /* Adjust width for large screens */ - margin: 30px auto; /* Center the document */ - display: grid; /* Use grid layout */ - grid-template-columns: 1fr 3fr; /* Sidebar takes 1/4, main content takes 3/4 of available space */ - grid-template-areas: - "sidebar main"; /* Define grid areas */ - } + /* Adjust layout for large screens */ + div.document { + width: 90%; /* Adjust width for large screens */ + margin: 30px auto; /* Center the document */ + display: grid; /* Use grid layout */ + grid-template-columns: 1fr 3fr; /* Sidebar takes 1/4, main content takes 3/4 of available space */ + grid-template-areas: "sidebar main"; /* Define grid areas */ + } - div.sphinxsidebar { - /* Add some content or set a min-width to ensure it occupies the grid area */ - width: 100%; /* Example min-width */ - grid-area: sidebar; /* Assign to sidebar grid area */ - padding: 0 20px; /* Add padding to maintain spacing */ - margin-top: 0; - margin-right: 20px; - margin-bottom: 0; - margin-left: 0; /* Adjust margins to fit within the layout */ - } + div.sphinxsidebar { + /* Add some content or set a min-width to ensure it occupies the grid area */ + width: 100%; /* Example min-width */ + grid-area: sidebar; /* Assign to sidebar grid area */ + padding: 0 20px; /* Add padding to maintain spacing */ + margin-top: 0; + margin-right: 20px; + margin-bottom: 0; + margin-left: 0; /* Adjust margins to fit within the layout */ + } - div.bodywrapper { - /* Ensure it occupies the grid area */ - width: 100%; - grid-area: main; /* Assign to main grid area */ - padding: 0 20px; /* Add padding to maintain spacing */ - margin-top: 0; - margin-right: 0; - margin-bottom: 0; - margin-left: 20px; /* Adjust margins to fit within the layout */ - } + div.bodywrapper { + /* Ensure it occupies the grid area */ + width: 100%; + grid-area: main; /* Assign to main grid area */ + padding: 0 20px; /* Add padding to maintain spacing */ + margin-top: 0; + margin-right: 0; + margin-bottom: 0; + margin-left: 20px; /* Adjust margins to fit within the layout */ + } } @media screen and (max-width: 767px) { - /* Adjust layout for mobile phones */ - body { - padding: 10px; /* Add padding to body for better spacing */ - } + /* Adjust layout for mobile phones */ + body { + padding: 10px; /* Add padding to body for better spacing */ + } - div.document { - width: 100%; /* Set width to full for mobile phones */ - margin: 10px auto; /* Center the document */ - display: block; /* Revert to block layout */ - } + div.document { + width: 100%; /* Set width to full for mobile phones */ + margin: 10px auto; /* Center the document */ + display: block; /* Revert to block layout */ + } - div.sphinxsidebar { - display: none; /* Hide sidebar on mobile phones */ - } + div.sphinxsidebar { + display: none; /* Hide sidebar on mobile phones */ + } } diff --git a/docsource/source/index.rst b/docsource/source/index.rst index ff22aeb..d865c6a 100644 --- a/docsource/source/index.rst +++ b/docsource/source/index.rst @@ -1,20 +1,27 @@ -.. mediacurator documentation master file, created by - sphinx-quickstart on Fri Nov 20 22:46:06 2020. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - ======================================== Welcome to mediacurator's documentation! ======================================== mediacurator is a Python command line tool to manage a media database. -* List all the video's and their information with or without filters +* List all the videos and their information with or without filters * Batch find and repair/convert videos with encoding errors -* Batch recode videos to more modern codecs (x265 / AV1) based on filters: extentions, codecs, resolutions ... +* Batch recode videos to more modern codecs (x265 / AV1) based on filters: extensions, codecs, resolutions ... The source code can be found on `GitHub `_ +.. warning:: + + **Breaking changes in version 1.0.1:** + + Starting with version 1.0.1, the command-line interface (CLI) has undergone major changes, and the usage is **not backwards-compatible** with previous versions. + + If you are using `mediacurator < 1.0.1`, please refer to the legacy documentation available below (:ref:`legacy_docs`). + +---------------------------------------- +Documentation +---------------------------------------- + .. toctree:: :maxdepth: 2 :caption: Usage: @@ -31,6 +38,34 @@ The source code can be found on `GitHub `_, as many distributions provide outdated versions in their repositories. +* **Run with Verbose Option**: Execute mediacurator with the verbose print option, which will display the raw FFmpeg output for better troubleshooting. +* **Retry**: In my experience, some errors do not necessarily recur... + +Other Bugs +---------- + +If you encounter other bugs, issues, or would like to suggest features, feel free to open a bug report on `GitHub `_. + +For further assistance, you can reach out through the GitHub repository or the project’s support channels. diff --git a/docsource/source/legacy_usage/installation.rst b/docsource/source/legacy_usage/installation.rst new file mode 100644 index 0000000..128d41e --- /dev/null +++ b/docsource/source/legacy_usage/installation.rst @@ -0,0 +1,45 @@ +============ +Installation +============ + +.. 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. + +This package has been tested on GNU/Linux (e.g., Debian, Ubuntu, Fedora) and Windows, and requires FFmpeg to be installed. For now, it will be distributed on `GitHub `_. + +Install FFmpeg +-------------- + +To install FFmpeg, you can follow the instructions for your platform: + +- **On Debian and Ubuntu**: + .. code-block:: bash + + sudo apt update + sudo apt install ffmpeg + +- **On Fedora**: + .. code-block:: bash + + sudo dnf install ffmpeg + +- **On Windows**: + - Download the latest build from `FFmpeg `_. + - Follow the installation instructions provided on the site. + +To verify your FFmpeg installation, you can run: + +.. code-block:: bash + + ffmpeg -version + + +Install from PyPi +----------------- + +You can install the `mediacurator` package directly from PyPi using the following command: + +.. code-block:: bash + + pip install MediaCurator diff --git a/docsource/source/legacy_usage/manual.rst b/docsource/source/legacy_usage/manual.rst new file mode 100644 index 0000000..68178b6 --- /dev/null +++ b/docsource/source/legacy_usage/manual.rst @@ -0,0 +1,185 @@ +====== +Manual +====== + +.. 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. + +Name +---- + +mediacurator + +Synopsis +-------- + +.. code-block:: bash + + mediacurator [options] + + mediacurator [list,convert] [-del] + [-in:any,avi,divx,flv,m4v,mkv,mp4,mpg,ogm,vid,webm,wmv] + [-filters:fferror,old,lowres,hd,720p,1080p,uhd,mpeg,mpeg4,x264,wmv3,wmv,vob] + [-out:mkv/mp4,x265/av1] + [-print:list,formated,verbose] + [-dirs/-files:"/mnt/media/",,"/mnt/media2/"] + +**Available commands:** +- `list`: List all videos with specified filters. +- `convert`: Convert videos to specified formats. + +**Options:** + +- `-del`: Delete found results after successful operations. **Use with caution**. +- `-in `: Specify input file formats (default: `any`). +- `-filters `: Apply filters to the selection of videos. +- `-out `: Specify output formats (default: `mkv`, `x265`). +- `-print `: Set print options (default: `list`). +- `-files `: Specify files to process. +- `-dirs `: Specify directories to process. + +**For multiple files or filenames, use double comma separated values (,,).** + +**Default options (if not specified):** + +- `-in`: `any` +- `-filters`: (none) +- `-out`: `mkv`, `x265` +- `-print`: `list` + +Description +----------- + +**mediacurator** is a Python command-line tool designed to manage a media database. It allows you to: + +- List all videos and their metadata, optionally filtered by specified criteria. +- Batch find, repair, or convert videos with encoding errors. +- Batch recode videos to modern codecs (e.g., x265, AV1) based on filters (e.g., container, codec, resolution). + +Options +------- + +list +==== + Search and list videos filtered by the user-provided parameters. + +convert +======= + Search and convert all videos filtered by the user-provided parameters. + +-del: +===== + Deletes the original videos after successful completion of operations (e.g., conversion or listing). **Use with caution**. + + See :doc:`warnings` + +-in: +==== + [**any**, avi, divx, flv, m4v, mkv, mp4, mpg, ogm, vid, webm, wmv] + + Filters videos by file format (container extensions). The default is `any`, meaning all formats are included. + +-filters: +========= + [fferror, old, lowres, hd, 720p, 1080p, uhd, mpeg, mpeg4, x264, wmv3, wmv] + + Filters videos based on specific criteria: + + - **fferror**: Select videos with encoding errors (see :doc:`errors`) + - **old**: Select videos using outdated codecs (anything except hevc or av1) + - **hd**: Select videos in HD (720p, 1080p, UHD) + - **lowres**: Select videos that are not in HD + - **uhd**: Select Ultra-HD videos (width or height >= 2160) + - **1080p**: Select Full-HD videos (1440 <= width < 2160 or 1080 <= height < 2160) + - **720p**: Select HD videos (1280 <= width < 1440 or 720 <= height < 1080) + - **sd**: Select standard-definition videos (480 <= height < 720) + - **subsd**: Select substandard-definition videos (height < 480) + - **mpeg, mpeg4, x264, wmv3, wmv, vob**: Filter by video codec + +-out: +===== + [**mkv**/mp4, x265/av1] + + Specifies the output format for video conversions: + + - **mkv**: (**Default**) Package the output video in a `Matroska `_ container. + - **mp4**: Package the output video in an MP4 container. + - **x265** or **hevc**: (**Default**) Encode the video using `x265 `_ (HEVC). + - **av1**: Encode the video using `AOMedia Video 1 `_ (AV1). + +-print: +======= + [**list**, formated, verbose] + + Specifies how the output should be displayed: + + - **list**: (**Default**) Prints video info in a concise, single-line format. + + .. image:: ../_static/Screenshot-print_list-single.png + :width: 600 + :alt: List videos (single-line output) + + - **formated**: Prints video info in a more readable format with line breaks. + + .. image:: ../_static/Screenshot-print_formatted-single.png + :width: 400 + :alt: List videos (formatted output) + + - **verbose**: Prints the FFmpeg output during conversions. + +-dirs: +====== + ["/mnt/media/",,"/mnt/media2/"] + + Specifies directories to scan, separated by **double commas** (,,). + +-files: +======= + ["/mnt/media/video.avi",,"/mnt/media2/video2.mp4"] + + Specifies individual video files to process, separated by **double commas** (,,). + +Examples +-------- + +.. code-block:: bash + + # This command lists all videos in the specified directories that use old codecs and + # formats the output. + mediacurator list -filters:old -print:formated -dirs:"/mnt/media/",,"/mnt/media2/" + + # This command converts all MPEG4 videos found in the specified directories to AV1 format + # in MP4 containers and deletes the originals. + mediacurator convert -del -filters:mpeg4 -out:av1,mp4 -dirs:"/mnt/media/",,"/mnt/media2/" + + # This command converts AVI or MPG videos, displays detailed output during conversion, and + # deletes originals. + mediacurator convert -del -in:avi,mpg -print:formated,verbose -dirs:"/mnt/media/",,"/mnt/media2/" + +For more examples, see :doc:`use_cases` + +See Also +-------- + +- `FFmpeg `_ + +Glossary +-------- + +- **Codec**: A program or device that compresses and decompresses digital media. +- **Container**: A file format that holds video, audio, and metadata. +- **UHD**: Ultra High Definition, refers to video resolutions of 3840x2160 pixels or higher. + +Error Handling +-------------- + +Common issues users might encounter include: + +- **Encoding Errors**: If videos have encoding errors, they can be filtered using the `-filters fferror` option. +- **Unsupported Formats**: Ensure that input formats specified in `-in` are supported by mediacurator. + +Author +------ + +Fabrice Quenneville diff --git a/docsource/source/legacy_usage/quickstart.rst b/docsource/source/legacy_usage/quickstart.rst new file mode 100644 index 0000000..83cefaa --- /dev/null +++ b/docsource/source/legacy_usage/quickstart.rst @@ -0,0 +1,40 @@ +========== +Quickstart +========== + +.. 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. + +.. code-block:: bash + + mediacurator [list,convert] [-del] + [-in:any,avi,mkv,wmv,mpg,mp4,m4v,flv,vid,divx,ogm,webm] + [-filters:fferror,old,lowres,hd,720p,1080p,uhd,mpeg,mpeg4,x264,wmv3,wmv] + [-out:mkv/mp4,x265/av1] + [-print:list,formated,verbose] + [-dirs/-files:"/mnt/media/",,"/mnt/media2/"] + +**for multiple files or filenames use double comma separated values ",,"** + +default options are: + +.. code-block:: bash + + -in:any + -filters: + -out:mkv,x265 + -print:list + +Examples: + +.. code-block:: bash + + # List all videos with old codec in formated format + mediacurator list -filters:old -print:formated -dirs:/mnt/media/ >> ../medlist.txt + # Convert all videos with the codec mpeg4 in a mp4 using the av1 video codec and the delete the originals + mediacurator convert -del -filters:mpeg4 -out:av1,mp4 -dirs:"/mnt/media/Movies/" + # Convert any video with avi or mpg extensions, print formated text including ffmpeg's output and then delete the originals + mediacurator convert -del -in:avi,mpg -print:formated,verbose -dirs:/mnt/media/ + +More examples in :doc:`use_cases` \ No newline at end of file diff --git a/docsource/source/legacy_usage/use_cases.rst b/docsource/source/legacy_usage/use_cases.rst new file mode 100644 index 0000000..9fa3d82 --- /dev/null +++ b/docsource/source/legacy_usage/use_cases.rst @@ -0,0 +1,106 @@ +========= +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 `_ + +.. _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 `_ codecs + +.. code-block:: bash + + mediacurator list --delete -filters:wmv -dirs:"/mnt/media/",,"/mnt/media2/" + +List and delete all videos using `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 `_ 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 `_ 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/" + \ No newline at end of file diff --git a/docsource/source/legacy_usage/warnings.rst b/docsource/source/legacy_usage/warnings.rst new file mode 100644 index 0000000..d58bda3 --- /dev/null +++ b/docsource/source/legacy_usage/warnings.rst @@ -0,0 +1,67 @@ +======== +Warnings +======== + +.. 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. + +.. warning:: + + Before using the **delete feature**, we strongly recommend running several dry runs to get acquainted with `mediacurator`, as incorrect usage can cause irreversible damage to your media library. + +The `-del` flag will **permanently delete** files, so it is crucial to ensure that the command is executed correctly. Below are some examples of how the delete feature works. + +Example use Cases for the `-del` Flag +----------------------------------------- + +1. **Delete all non-HD (low-resolution) videos in a folder:** + +.. code-block:: bash + + mediacurator list -del -filters:lowres -dirs:"/mnt/media/" + +2. **Delete all substandard quality videos in a folder:** + +.. code-block:: bash + + mediacurator list -del -filters:subsd -dirs:"/mnt/media/" + +.. image:: ../_static/Legacy-Screenshot-delete.png + :width: 600 + :alt: Deleting videos + +3. **Delete all videos in a folder with encoding errors:** + +.. code-block:: bash + + mediacurator list -del -filters:fferror -dirs:"/mnt/media/" + +4. **Convert (repair) and then delete all videos in a folder with encoding errors:** + +.. code-block:: bash + + mediacurator convert -del -filters:fferror -dirs:"/mnt/media/" + +5. **Delete all videos in a folder:** + +.. code-block:: bash + + mediacurator list -del -filters:lowres -dirs:"/mnt/media/" + +Important Notes +--------------- + +- **Irreversibility**: All of these commands involve permanent deletion. Once a file is deleted using the `-del` flag, it cannot be recovered. +- **Run without `-del` first**: Always perform several dry runs by omitting the `-del` flag to ensure that the correct files are selected for deletion. Familiarizing yourself with the tool before using destructive commands is essential to avoid unintended consequences. +- **Specific File Selection**: If you're unsure about applying filters to an entire directory, you can use the `-files` option to target individual files for deletion or conversion, further reducing the risk of unintended deletions. +- **Backup Recommendation**: Before running any commands with the `-del` flag, it is a good practice to back up your media library or the specific directories being processed, especially if they contain valuable or irreplaceable files. + +Dry run example (without deletion) +---------------------------------- + +.. code-block:: bash + + mediacurator list -filters:lowres -dirs:"/mnt/media/" + +Make sure you carefully verify the output and files selected during the dry runs to prevent accidental data loss. diff --git a/docsource/source/usage/errors.rst b/docsource/source/usage/errors.rst index 77522a1..3b0e697 100644 --- a/docsource/source/usage/errors.rst +++ b/docsource/source/usage/errors.rst @@ -1,37 +1,37 @@ - ====== Errors ====== -FFmpeg can detect quite a few errors in the encoding of your source video's encoding. It can also be used to repair errors. +FFmpeg can detect quite a few errors in the encoding of your source video's encoding and can also be used to repair these errors. -Repairable encoding errors +Repairable Encoding Errors -------------------------- Here are some example errors that mediacurator will print and can possibly repair by re-encoding: -* "Referenced QT chapter track not found" -* "Error, header damaged or not MPEG-4 header" -* "Header missing" -* "SEI type" -* "no frame!" -* "Error while decoding MPEG audio frame." -* "big_values too big" +* **"Referenced QT chapter track not found"**: Indicates that the video references a chapter that doesn't exist. +* **"Error, header damaged or not MPEG-4 header"**: The file's header is corrupted or missing. +* **"Header missing"**: The file lacks the necessary header information for decoding. +* **"SEI type"**: Issues related to SEI (Supplemental Enhancement Information) data. +* **"no frame!"**: No video frames available for processing. +* **"Error while decoding MPEG audio frame."**: Issues decoding the audio stream. +* **"big_values too big"**: Indicates that certain values in the file are larger than expected. * ... -FFmpeg issues +FFmpeg Issues ------------- -While using FFmpeg depending on your version you may also face other errors like segfaults. mediacurator will also print information when that occurs and move on to the next video after cleaning up after failure. +While using FFmpeg, you may encounter other errors (such as segfaults) depending on your version. Mediacurator will also print information when that occurs and will move on to the next video after cleaning up any failures. -If that happens there are a few steps you can take: +If you experience these errors, consider the following steps: +* **Update FFmpeg**: Ensure you are using the latest version by downloading it from `ffmpeg.org `_, as many distributions provide outdated versions in their repositories. +* **Run with Verbose Option**: Execute mediacurator with the verbose print option, which will display the raw FFmpeg output for better troubleshooting. +* **Retry**: In my experience, some errors do not necessarily recur... -* `Update FFmpeg `_ to its latest version as it is a very active project and most distributions serve old versions in their repositories -* Run mediacurator with the verbose print option wich will print the raw FFmpeg output -* Try again: In my experience some errors don't necessarly recur... - -Other bugs +Other Bugs ---------- -If you face other bugs, issues or want to suggest features feel free to open a bug report on `GitHub `_ \ No newline at end of file +If you encounter other bugs, issues, or would like to suggest features, feel free to open a bug report on `GitHub `_. + +For further assistance, you can reach out through the GitHub repository or the project’s support channels. diff --git a/docsource/source/usage/installation.rst b/docsource/source/usage/installation.rst index c6fbf9c..ac5ea94 100644 --- a/docsource/source/usage/installation.rst +++ b/docsource/source/usage/installation.rst @@ -2,17 +2,40 @@ Installation ============ -This package has only been tested on GNU/Linux & Windows and requires FFMPEG installed. For now it will be distributed on `GitHub `_ +This package has been tested on GNU/Linux (e.g., Debian, Ubuntu, Fedora) and Windows, and requires FFmpeg to be installed. For now, it will be distributed on `GitHub `_. Install FFmpeg -------------- -`Download FFmpeg `_ +To install FFmpeg, you can follow the instructions for your platform: + +- **On Debian and Ubuntu**: + .. code-block:: bash + + sudo apt update + sudo apt install ffmpeg + +- **On Fedora**: + .. code-block:: bash + + sudo dnf install ffmpeg + +- **On Windows**: + - Download the latest build from `FFmpeg `_. + - Follow the installation instructions provided on the site. + +To verify your FFmpeg installation, you can run: + +.. code-block:: bash + + ffmpeg -version + Install from PyPi ----------------- +You can install the `mediacurator` package directly from PyPi using the following command: + .. code-block:: bash - :linenos: pip install mediacurator diff --git a/docsource/source/usage/manual.rst b/docsource/source/usage/manual.rst index bb82509..0200c7f 100644 --- a/docsource/source/usage/manual.rst +++ b/docsource/source/usage/manual.rst @@ -12,134 +12,183 @@ Synopsis .. code-block:: bash - mediacurator [list,convert] [-del] - [-in:any,avi,mkv,wmv,mpg,mp4,m4v,flv,vid,divx,ogm,webm] - [-filters:fferror,old,lowres,hd,720p,1080p,uhd,mpeg,mpeg4,x264,wmv3,wmv,vob] - [-out:mkv/mp4,x265/av1] - [-print:list,formated,verbose] - [-dirs/-files:"/mnt/media/",,"/mnt/media2/"] + mediacurator [options] + mediacurator [list convert] [-del/--delete] + [-i/--inputs any 3gp asf avi divx dv f4v flv gif m2ts m4v mkv mov mp4 mpeg mpg mts ogm ogv rm swf ts vid vob webm wmv] + [-fl/--filters fferror old lowres hd 720p 1080p uhd mpeg mpeg4 x264 wmv3 wmv] + [-o/--outputs mkv/mp4 x265/av1] + [-p/--printop list formatted verbose] + [-d/--dirs "/mnt/media/" "/mnt/media2/"] + [-f/--files "file1.ext" "file2.ext"] -**for multiple files or filenames use double comma separated values ",,"** +**Available commands:** +- `list`: List all videos with specified filters. +- `convert`: Convert videos to specified formats. -default options are: +**Options:** -.. code-block:: bash +- `-del` or `--delete`: Delete found results after successful operations. **Use with caution**. +- `-i ` or `--inputs `: Specify input file formats (default: `any`). +- `-fl ` or `--filters `: Apply filters to the selection of videos. +- `-o ` or `--outputs `: Specify output formats (default: `mkv`, `x265`). +- `-p ` or `--printop `: Set print options (default: `list`). +- `-f ` or `--files `: Specify files to process. +- `-d ` or `--dirs `: Specify directories to process. - -in:any - -filters: - -out:mkv,x265 - -print:list +**For multiple files or filenames, use space-separated values ( ).** + +**Default options (if not specified):** + +- `-i/--inputs`: `any` +- `-fl/--filters`: (none) +- `-o/--outputs`: `mkv`, `x265` +- `-p/--printop`: `list` Description ----------- -mediacurator is a Python command line tool to manage a media database. +**mediacurator** is a Python command-line tool designed to manage a media database. It allows you to: -* List all the video's and their information with or without filters -* Batch find and repair/convert videos with encoding errors -* Batch recode videos to more modern codecs (x265 / AV1) based on filters: extentions, codecs, resolutions ... +- List all videos and their metadata, optionally filtered by specified criteria. +- Batch find, repair, or convert videos with encoding errors. +- Batch recode videos to modern codecs (e.g., x265, AV1) based on filters (e.g., container, codec, resolution). Options ------- list ==== -Search and list videos filtered by the parameters passed by the user. + Search and list videos filtered by the user-provided parameters. convert ======= -Search and convert all videos filtered by the parameters passed by the user. + Search and convert all videos filtered by the user-provided parameters. --del: -===== -Delete all original videos once selected operations have been done succefully. +--delete +======== + Short form: `-del` -See :doc:`warnings` + Deletes the original videos after successful completion of operations (e.g., conversion or listing). **Use with caution**. --in: -==== -[**any**,avi,mkv,wmv,mpg,mp4,m4v,flv,vid,divx,ogm] + See :doc:`warnings` -Search all videos of the selected container **extensions** in the directories. By default it will include any file format. +--inputs +======== + Short form: `-i` --filters: + [**any**, 3gp, asf, avi, divx, dv, f4v, flv, gif, m2ts, m4v, mkv, mov, mp4, mpeg, mpg, mts, ogm, ogv, rm, swf, ts, vid, vob, webm, wmv] + + Filters videos by file format (container extensions). The default is `any`, meaning all formats are included. + +--filters ========= -[fferror,old,lowres,hd,720p,1080p,uhd,mpeg,mpeg4,x264,wmv3,wmv] + Short form: `-fl` -Filter the selected videos for parameters: + [fferror, old, lowres, hd, 720p, 1080p, uhd, mpeg, mpeg4, x264, wmv3, wmv] -* fferror: Select all videos with encoding errors (See :doc:`errors`) -* old: Select all videos using old codecs (Everything except hevc or av1) -* hd: 720p, 1080p, uhd -* lowres: Everything not hd -* uhd: if width >= 2160 or height >= 2160 -* 1080p: if less than uhd and width >= 1440 or height >= 1080 -* 720p: if less than 1080p and width >= 1280 or height >= 720: -* sd: if less than 720p and if height >= 480 -* subsd: Substandard definitions: Everything under 480p -* mpeg,mpeg4,x264,wmv3,wmv,vob: Filter for videos encoded in the requested video codec + Filters videos based on specific criteria: --out: -===== -[**mkv**/mp4,x265/av1] + - **fferror**: Select videos with encoding errors (see :doc:`errors`) + - **old**: Select videos using outdated codecs (anything except hevc or av1) + - **hd**: Select videos in HD (720p, 1080p, UHD) + - **lowres**: Select videos that are not in HD + - **uhd**: Select Ultra-HD videos (width or height >= 2160) + - **1080p**: Select Full-HD videos (1440 <= width < 2160 or 1080 <= height < 2160) + - **720p**: Select HD videos (1280 <= width < 1440 or 720 <= height < 1080) + - **sd**: Select standard-definition videos (480 <= height < 720) + - **subsd**: Select substandard-definition videos (height < 480) + - **mpeg, mpeg4, x264, wmv3, wmv, vob**: Filter by video codec -Select the outputs for the video conversions +--outputs +========= + Short form: `-o` -* mkv: (**Default**) Package the resulting video in a `Matroska `_ container. -* mp4: Package the resulting video in a container. -* x265/hevc: (**Default**) Encode the video using the `x265 `_ compression format. -* av1: Encode the video using the `AOMedia Video 1 `_ compression format. This will be used as default once the developpers at FFmpeg move it out of `experimental `_ . + [**mkv**/mp4, x265/av1] --print: -======= -[**list**,formated,verbose] + Specifies the output format for video conversions: -* list: (**Default**) Print the information about the videos on a single line + - **mkv**: (**Default**) Package the output video in a `Matroska `_ container. + - **mp4**: Package the output video in an MP4 container. + - **x265** or **hevc**: (**Default**) Encode the video using `x265 `_ (HEVC). + - **av1**: Encode the video using `AOMedia Video 1 `_ (AV1). -.. image:: ../_static/Screenshot-print_list-single.png - :width: 600 - :alt: Deleting videos +--printop +========= + Short form: `-p` -* formated: Print the information in an aerated format + [**list**, formatted, verbose] -.. image:: ../_static/Screenshot-print_formated-single.png - :width: 400 - :alt: Deleting videos + Specifies how the output should be displayed: -* verbose: Print the FFmpeg output during the video conversions + - **list**: (**Default**) Prints video info in a concise, single-line format. --dirs: + .. image:: ../_static/Screenshot-print_list-single.png + :width: 600 + :alt: List videos (single-line output) + + - **formatted**: Prints video info in a more readable format with line breaks. + + .. image:: ../_static/Screenshot-print_formatted-single.png + :width: 400 + :alt: List videos (formatted output) + + - **verbose**: Prints the FFmpeg output during conversions. + +--dirs ====== -["/mnt/media/",,"/mnt/media2/"] + Short form: `-d` -The directories to scan as a **double comma** separated values list. + ["/mnt/media/", "/mnt/media2/"] + Specifies directories to scan, separated by spaces. --files: +--files ======= -["/mnt/media/video.avi",,"/mnt/media2/video2.mp4"] + Short form: `-f` -Specific videos to include as a **double comma** separated values list. + ["/mnt/media/video.avi", "/mnt/media2/video2.mp4"] + + Specifies individual video files to process, separated by spaces. Examples -------- .. code-block:: bash - # List all videos with old codec in formated format - mediacurator list -filters:old -print:formated -dirs:/mnt/media/ >> ../medlist.txt - # Convert all videos with the codec mpeg4 in a mp4 using the av1 video codec and the delete the originals - mediacurator convert -del -filters:mpeg4 -out:av1,mp4 -dirs:"/mnt/media/Movies/" - # Convert any video with avi or mpg extensions, print formated text including ffmpeg's output and then delete the originals - mediacurator convert -del -in:avi,mpg -print:formated,verbose -dirs:/mnt/media/ + # This command lists all videos in the specified directories that use old codecs and + # formats the output. + mediacurator list --filters old --printop formatted --dirs "/mnt/media/" "/mnt/media2/" + + # This command converts all MPEG4 videos found in the specified directories to AV1 format + # in MP4 containers and deletes the originals. + mediacurator convert --delete --filters mpeg4 --outputs av1 mp4 --dirs "/mnt/media/" "/mnt/media2/" + + # This command converts AVI or MPG videos, displays detailed output during conversion, and + # deletes originals. + mediacurator convert --delete --inputs avi mpg --printop formatted verbose --dirs "/mnt/media/" "/mnt/media2/" -More examples in :doc:`use_cases` +For more examples, see :doc:`use_cases` See Also -------- -`FFmpeg `_ +- `FFmpeg `_ + +Glossary +-------- + +- **Codec**: A program or device that compresses and decompresses digital media. +- **Container**: A file format that holds video, audio, and metadata. +- **UHD**: Ultra High Definition, refers to video resolutions of 3840x2160 pixels or higher. + +Error Handling +-------------- + +Common issues users might encounter include: + +- **Encoding Errors**: If videos have encoding errors, they can be filtered using the `--filters fferror` option. +- **Unsupported Formats**: Ensure that input formats specified in `--inputs` are supported by mediacurator. Author ------ diff --git a/docsource/source/usage/quickstart.rst b/docsource/source/usage/quickstart.rst index 86cf42c..c4424dc 100644 --- a/docsource/source/usage/quickstart.rst +++ b/docsource/source/usage/quickstart.rst @@ -2,35 +2,56 @@ Quickstart ========== -.. code-block:: bash - - mediacurator [list,convert] [-del] - [-in:any,avi,mkv,wmv,mpg,mp4,m4v,flv,vid,divx,ogm,webm] - [-filters:fferror,old,lowres,hd,720p,1080p,uhd,mpeg,mpeg4,x264,wmv3,wmv] - [-out:mkv/mp4,x265/av1] - [-print:list,formated,verbose] - [-dirs/-files:"/mnt/media/",,"/mnt/media2/"] - -**for multiple files or filenames use double comma separated values ",,"** - -default options are: +To use `mediacurator`, execute the following command structure: .. code-block:: bash - -in:any - -filters: - -out:mkv,x265 - -print:list + mediacurator [options] -Examples: + mediacurator [list convert] [-del/--delete] + [-i/--inputs any 3gp asf avi divx dv f4v flv gif m2ts m4v mkv mov mp4 mpeg mpg mts ogm ogv rm swf ts vid vob webm wmv] + [-fl/--filters fferror old lowres hd 720p 1080p uhd mpeg mpeg4 x264 wmv3 wmv] + [-o/--outputs mkv/mp4 x265/av1] + [-p/--printop list formatted verbose] + [-d/--dirs "/mnt/media/" "/mnt/media2/"] + [-f/--files "file1.ext" "file2.ext"] + +**Available commands:** +- `list`: List all videos with specified filters. +- `convert`: Convert videos to specified formats. + +**Options:** + +- `-del` or `--delete`: Delete found results after successful operations. +- `-i ` or `--inputs `: Specify input file formats (default: `any`). +- `-fl ` or `--filters `: Apply filters to the selection of videos. +- `-o ` or `--outputs `: Specify output formats (default: `mkv`, `x265`). +- `-p ` or `--printop `: Set print options (default: `list`). +- `-f ` or `--files `: Specify files to process. +- `-d ` or `--dirs `: Specify directories to process. + +**For multiple files or filenames, use space-separated values ( ).** + +**Default options:** + +- `-i/--inputs any` +- `-fl/--filters` +- `-o/--outputs mkv x265` +- `-p/--printop list` + +**Examples:** + +The following examples demonstrate how to use `mediacurator` with the options listed above: .. code-block:: bash - # List all videos with old codec in formated format - mediacurator list -filters:old -print:formated -dirs:/mnt/media/ >> ../medlist.txt - # Convert all videos with the codec mpeg4 in a mp4 using the av1 video codec and the delete the originals - mediacurator convert -del -filters:mpeg4 -out:av1,mp4 -dirs:"/mnt/media/Movies/" - # Convert any video with avi or mpg extensions, print formated text including ffmpeg's output and then delete the originals - mediacurator convert -del -in:avi,mpg -print:formated,verbose -dirs:/mnt/media/ + # List all videos with an old codec in formatted format + mediacurator list --filters old --printop formatted --dirs /mnt/media/ >> ../medlist.txt -More examples in :doc:`use_cases` \ No newline at end of file + # Convert all videos with the MPEG4 codec to MP4 using the AV1 codec and delete the originals + mediacurator convert --delete --filters mpeg4 --outputs av1,mp4 --dirs "/mnt/media/Movies/" + + # Convert any video with AVI or MPG extensions, print formatted text including FFmpeg's output, and then delete the originals + mediacurator convert --delete --inputs avi,mpg --printop formatted,verbose --dirs /mnt/media/ + +For more examples, see :doc:`use_cases`. diff --git a/docsource/source/usage/use_cases.rst b/docsource/source/usage/use_cases.rst index 7e22b57..0e39f15 100644 --- a/docsource/source/usage/use_cases.rst +++ b/docsource/source/usage/use_cases.rst @@ -17,18 +17,17 @@ The main reasons to use mediacurator would be the following: Print information ----------------- -List all videos with old codec in formated format +List all videos with old codec in formatted output .. code-block:: bash - mediacurator list -filters:old -dirs:/mnt/media/ + mediacurator list --filters old --printop formatted --dirs "/mnt/media/" "/mnt/media2/" -List all videos with substandard definitions with a formated output +List all videos with substandard definitions with a formatted output .. code-block:: bash - mediacurator list -filters:subsd -print:formated -dirs:/mnt/media/ - + mediacurator list --filters subsd --printop formatted --dirs "/mnt/media/" "/mnt/media2/" .. _purge: @@ -41,21 +40,19 @@ List and delete all videos using the `Windows Media Video `_ +List and delete all videos using `Audio Video Interleave `_ .. code-block:: bash - mediacurator list -del -in:avi -dirs:/mnt/media/ + mediacurator list --delete --inputs avi --dirs "/mnt/media/" "/mnt/media2/" List and delete any videos with encoding errors .. code-block:: bash - mediacurator list -del -filters:fferror -dirs:/mnt/media/ - - + mediacurator list --delete --filters fferror --dirs "/mnt/media/" "/mnt/media2/" .. _fferror: @@ -66,20 +63,19 @@ List all videos with encoding errors .. code-block:: bash - mediacurator list -filters:fferror -dirs:/mnt/media/ + mediacurator list --filters fferror --dirs "/mnt/media/" "/mnt/media2/" List and delete any videos with encoding errors .. code-block:: bash - mediacurator list -del -filters:fferror -dirs:/mnt/media/ + mediacurator list --delete --filters fferror --dirs "/mnt/media/" "/mnt/media2/" -Convert all videos with encoding errors to `High Efficiency Video Coding `_ and the delete the originals +Convert all videos with encoding errors to `High Efficiency Video Coding `_ and delete the originals .. code-block:: bash - mediacurator convert -del -filters:fferror -dirs:"/mnt/media/Movies/" - + mediacurator convert --delete --filters fferror --dirs "/mnt/media/" "/mnt/media2/" .. _convert: @@ -90,16 +86,16 @@ Convert all videos with old codecs to `High Efficiency Video Coding > ../medlist.txt - mediacurator convert -del -in:any -filters:mpeg4 -out:x265,mkv -dirs:"/mnt/media/Movies/" - mediacurator convert -del -in:avi,mpg -dirs:/mnt/media/ + * List all the videos and their information with or without filters + * Batch find and repair/convert videos with encoding errors + * Batch recode videos to more modern codecs (x265 / AV1) based on filters: extensions, codecs, resolutions... + + Examples: + mediacurator list --filters old --printop formatted --dirs "/mnt/media/" "/mnt/media2/" + mediacurator convert --delete --filters mpeg4 --outputs av1 mp4 --dirs "/mnt/media/" "/mnt/media2/" + mediacurator convert --delete --inputs avi mpg --printop formatted verbose --dirs "/mnt/media/" "/mnt/media2/" ''' -import sys - # Normal import try: - from mediacurator.library.video import Video from mediacurator.library.medialibrary import MediaLibrary - from mediacurator.library.tools import detect_ffmpeg, user_confirm, load_arguments + from mediacurator.library.tools import check_ffmpeg, load_arguments # Allow local import for development purposes except ModuleNotFoundError: - from library.video import Video from library.medialibrary import MediaLibrary - from library.tools import detect_ffmpeg, user_confirm, load_arguments + from library.tools import check_ffmpeg, load_arguments # Import colorama for colored output import colorama @@ -28,174 +26,52 @@ import colorama colorama.init() # Define color codes for colored output -ccyan = colorama.Fore.CYAN -cblue = colorama.Fore.BLUE -cgreen = colorama.Fore.GREEN cred = colorama.Fore.RED creset = colorama.Fore.RESET def main(): ''' - mediacurator's main function + Main function for mediacurator CLI tool. - Returns: + Handles command execution based on user input. ''' print(f"{colorama.Style.BRIGHT}") - # confirm that the command has enough parameters - if len(sys.argv) < 2: - print( - f"{cred}ERROR: Command not understood, please see documentation.{creset}" - ) + # Check if ffmpeg is installed + check_ffmpeg() - # confirm that ffmpeg in indeed installed - ffmpeg_version = detect_ffmpeg() - if not ffmpeg_version: - print(f"{cred}No ffmpeg version detected{creset}") - exit() - print(f"{cblue}ffmpeg version detected: {ffmpeg_version}{creset}") - - # Get/load command parameters + # Load command-line arguments arguments = load_arguments() + formatted = "formatted" in arguments.printop or "verbose" in arguments.printop - # Loading the media library - if len(arguments["files"]) > 0: - medialibrary = MediaLibrary(files=arguments["files"], - inputs=arguments["inputs"], - filters=arguments["filters"]) - elif len(arguments["directories"]) > 0: - medialibrary = MediaLibrary(directories=arguments["directories"], - inputs=arguments["inputs"], - filters=arguments["filters"]) - else: - print(f"{cred}ERROR: No files or directories selected.{creset}") + try: + # Initialize MediaLibrary with user-provided arguments + medialibrary = MediaLibrary(files=arguments.files, + directories=arguments.dirs, + inputs=arguments.inputs, + filters=arguments.filters, + verbose='verbose' in arguments.printop) + print(medialibrary) # Optionally display the state of the MediaLibrary + except ValueError as e: + # Handle initialization errors + print(f"{cred}ERROR: {str(e)}{creset}") return - # Actions - if sys.argv[1] == "list": - # Pulling list of marked videos / original keys for the medialibrary.videos dictionary - keylist = [ - filepath for filepath in medialibrary.videos - if medialibrary.videos[filepath].operate - ] - keylist.sort() + # Execute command based on the user's input + if arguments.command == "list": + medialibrary.list_videos(formatted, delete=arguments.delete) - for filepath in keylist: - if medialibrary.videos[filepath].operate: - if "formated" in arguments[ - "printop"] or "verbose" in arguments["printop"]: - if medialibrary.videos[filepath].error: - print( - f"{cred}{medialibrary.videos[filepath].fprint()}{creset}" - ) - else: - print(medialibrary.videos[filepath].fprint()) - else: - if medialibrary.videos[filepath].error: - print(f"{cred}{medialibrary.videos[filepath]}{creset}") - else: - print(medialibrary.videos[filepath]) + elif arguments.command == "test": + medialibrary.test_videos(formatted, delete=arguments.delete) - # if marked for deletion delete and unwatch the video - if "-del" in sys.argv: - medialibrary.unwatch(filepath, delete=True) - elif sys.argv[1] == "test": - # Pulling list of marked videos / original keys for the medialibrary.videos dictionary - keylist = [ - filepath for filepath in medialibrary.videos - if medialibrary.videos[filepath].operate - ] - keylist.sort() - - for filepath in keylist: - if medialibrary.videos[filepath].operate: - if "formated" in arguments[ - "printop"] or "verbose" in arguments["printop"]: - if medialibrary.videos[filepath].error: - print( - f"{cred}{medialibrary.videos[filepath].fprint()}{creset}" - ) - else: - print(medialibrary.videos[filepath].fprint()) - else: - if medialibrary.videos[filepath].error: - print(f"{cred}{medialibrary.videos[filepath]}{creset}") - else: - print(medialibrary.videos[filepath]) - - # if marked for deletion delete and unwatch the video - if "-del" in sys.argv: - medialibrary.unwatch(filepath, delete=True) - - elif sys.argv[1] == "convert": - counter = 0 - - # Pulling list of marked videos / original keys for the medialibrary.videos dictionary - keylist = [ - filepath for filepath in medialibrary.videos - if medialibrary.videos[filepath].operate - ] - keylist.sort() - - for filepath in keylist: - counter += 1 - # Setting required variables - if "av1" in arguments["outputs"]: - vcodec = "av1" - else: - vcodec = "x265" - - # Verbosing - print( - f"{cgreen}\n****** Starting conversion {counter} of {len(keylist)}: '{ccyan}{medialibrary.videos[filepath].filename_origin}{cgreen}' from {ccyan}{medialibrary.videos[filepath].codec}{cgreen} to {ccyan}{vcodec}{cgreen}...{creset}" - ) - print(f"{ccyan}Original file:{creset}") - if "formated" in arguments["printop"] or "verbose" in arguments[ - "printop"]: - print(medialibrary.videos[filepath].fprint()) - else: - print(medialibrary.videos[filepath]) - - print(f"{cgreen}Converting please wait...{creset}", end="\r") - - # Converting - if medialibrary.videos[filepath].convert( - verbose="verbose" in arguments["printop"]): - # Mark the job as done - medialibrary.videos[filepath].operate = False - - # Scan the new video - newfpath = medialibrary.videos[ - filepath].path + medialibrary.videos[filepath].filename_new - - medialibrary.videos[newfpath] = Video(newfpath, - verbose="verbose" - in arguments["printop"]) - - # Verbose - print( - f"{cgreen}Successfully converted '{medialibrary.videos[filepath].filename_origin}'{ccyan}({medialibrary.videos[filepath].filesize}mb){cgreen} to '{medialibrary.videos[newfpath].filename_origin}'{ccyan}({medialibrary.videos[newfpath].filesize}mb){cgreen}, {ccyan}new file:{creset}" - ) - - if "formated" in arguments[ - "printop"] or "verbose" in arguments["printop"]: - if medialibrary.videos[newfpath].error: - print( - f"{cred}{medialibrary.videos[newfpath].fprint()}{creset}" - ) - else: - print(medialibrary.videos[newfpath].fprint()) - else: - if medialibrary.videos[newfpath].error: - print(f"{cred}{medialibrary.videos[newfpath]}{creset}") - else: - print(medialibrary.videos[newfpath]) - - # if marked for deletion delete and unwatch the video - if "-del" in sys.argv: - medialibrary.unwatch(filepath, delete=True) + elif arguments.command == "convert": + vcodec = "av1" if "av1" in arguments.outputs else "x265" + medialibrary.convert_videos(vcodec, + formatted=formatted, + verbose="verbose" in arguments.printop, + delete=arguments.delete) if __name__ == '__main__': diff --git a/requirements.txt b/requirements.txt index 5e66508..da0e2de 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ pathlib colorama +argcomplete \ No newline at end of file diff --git a/setup.py b/setup.py index 22ecfa3..a17473c 100755 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ with open("README.md", "r", encoding="utf-8") as fh: setuptools.setup( name="mediacurator", - version="0.0.13", + version="1.0.1", author="Fabrice Quenneville", author_email="fab@fabq.ca", url="https://github.com/fabquenneville/mediacurator", @@ -25,8 +25,15 @@ setuptools.setup( classifiers=[ "Topic :: Multimedia :: Video :: Conversion", "Development Status :: 5 - Production/Stable", + "Intended Audience :: End Users/Desktop", "Natural Language :: English", - "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", "Environment :: Console", @@ -36,12 +43,12 @@ setuptools.setup( }, keywords=[ "codecs", "filters", "video", "x265", "av1", "media-database", - "python-command", "hevc" + "python-command", "hevc", "multimedia", "video-processing" ], - install_requires=["pathlib", "colorama"], + install_requires=["pathlib", "colorama", "argcomplete"], license='GPL-3.0', + license_files=('LICENSE', ), python_requires='>=3.6', - test_suite='nose.collector', - tests_require=['nose'], + platforms='any', zip_safe=True, )