Multimedia library maintainer
Project description
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
- python3
- ffmpeg (https://ffmpeg.org/download.html)
* 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 * 22- Tasks: process audio streams. Jobs:cpu_cores3- 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
1was executed, Tier2and Tier3can 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
.tmpfolder created at library path when no Tier2or3are running. - Use an external tool/script to bulk rename audio/video extensions to
.mp3/.mp4to convert them withmconv.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mconv-1.1.2.tar.gz.
File metadata
- Download URL: mconv-1.1.2.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d8b6ac31dbf4cdcd34ee1fc13cf747bf4b41b7767a9551fc30d2c331d82b3ae
|
|
| MD5 |
386023f5a727afcf816055a95b08bd65
|
|
| BLAKE2b-256 |
0b6bc2ce5f767578407fdc0a07735fce8edc05e08be4a65059eed12174b3d651
|
File details
Details for the file mconv-1.1.2-py3-none-any.whl.
File metadata
- Download URL: mconv-1.1.2-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1cd61d517f0e5714683b112cd3b6d5ce8f6ea43f6e6d641a12744125849db5f4
|
|
| MD5 |
78a7065c9c82a2dedc936dc9ecfe13d5
|
|
| BLAKE2b-256 |
f72db73e4274fd0fcff6cb2505f2371941bdcc213e4f472f0d07bbbecd3988c7
|