Skip to main content

Multimedia library converter

WARNING!! The original multimedia files will be replaced with the converted versions so, you may prefer to check that the result will be what you expect with some test files first. Btw, the replacement is atomic so it won't get corrupted in case of error or forced exit.

Easy and efficiently, analyze a whole multimedia library to make sure that everything match a desired format and convert what doesn't to make it match. The scans are cached to greately decrease resume/re-scan times. Nvidia hardware acceleration is supported too.

Target format by extension

  • .mp3: A.format: mp3, A.bitrate: < 128.1kbps
  • .mp4: A.format: acc, A.bitrate: < 128.1kbps, V.format: h264, B.bitrate: < 600kbps

Note: If a video stream from a .mp4 file needs to be converted to reduce his bit_rate, his frame rate will be limited to 30fps and his height/width resolution to 1280 to keep a nice image quality.

Requisites

* it basically works anywhere (arm, x86, linux, windows, ...)

Installation

Using pip:

$ pip install mconv

Usage

To convert multimedia files recursively at current path:

$ python -m mconv .

See help with:

$ python -m mconv -h
usage: mconv [-h] [-t M] [-j N] [-n] path

Multimedia library converter

positional arguments:
  path            Library path

optional arguments:
  -h, --help      show this help message and exit
  -t M, --tier M  Subgroups of tasks to process based on CPU demand: 1 (Low) - 3 (High).
  -j N, --jobs N  Number of paralell jobs
  -n, --nvidia    Use nvidia hardware when necessary

Tiers details and his default Jobs value:

  • 1 - Tasks: library scan, format reading and cache update. Jobs: cpu_cores * 2
  • 2 - Tasks: process audio streams. Jobs: cpu_cores
  • 3 - Tasks: process video streams. Jobs: 1

* If a video file needs video and audio streem conversion, it's tier 3 but if only needs audio conversion, it's tier 2.

* Default Tier value is 123 (all).

* When multiple Tiers are selected, default Jobs value is the minimum of them.

Tips and tricks

  • Don't process all Tiers in the same execution or you won't be able to take advantage of all your cores efficiently. On a single machine, it's better to execute each Tier separated. In the future, this may be the default behaviour when multiple Tiers are defined.
  • Once Tier 1 was executed, Tier 2 and Tier 3 can be executed safely at the same time (also on different machines with a NAS).
  • Maximum Jobs with Nvidia hardware aceleration depends on GPU model. See "Max # of concurrent sessions" on "Encoder" at https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new
  • If a video can't be converted using Nvidia hardware acceleration, try without it, it may work...
  • It's safe to delete .tmp folder created at library path when no Tier 2 or 3 are running.
  • Use an external tool/script to bulk rename audio/video extensions to .mp3/.mp4 to convert them with mconv.

Metadata

Release files for mconv 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mconv 1.1.2
File Size Uploaded Provenance Actions
mconv-1.1.2.tar.gz 6.6 kB Without provenance Details for mconv-1.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mconv 1.1.2
File Interpreter ABI Platform Actions
mconv-1.1.2-py3-none-any.whl Python 3 none any Details for mconv-1.1.2-py3-none-any.whl

Total release size: 14.6 kB

Release files / mconv-1.1.2.tar.gz

Download URL mconv-1.1.2.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0d8b6ac31dbf4cdcd34ee1fc13cf747bf4b41b7767a9551fc30d2c331d82b3ae
BLAKE2b-256 checksum
How to use checksums
0b6bc2ce5f767578407fdc0a07735fce8edc05e08be4a65059eed12174b3d651
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.2 CPython/3.9.1

Release files / mconv-1.1.2-py3-none-any.whl

Download URL mconv-1.1.2-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1cd61d517f0e5714683b112cd3b6d5ce8f6ea43f6e6d641a12744125849db5f4
BLAKE2b-256 checksum
How to use checksums
f72db73e4274fd0fcff6cb2505f2371941bdcc213e4f472f0d07bbbecd3988c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.2 CPython/3.9.1

Security for mconv 1.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page