A professional Python library to mux different anime versions into a single MKV file.
Project description
animux
animux is a powerful command-line tool for muxing multiple language versions of anime episodes into a single, high-quality MKV file. It intelligently scans your directories, handles mkvmerge via Docker, and can even fetch and synchronize subtitles for a complete viewing experience.
Features
- Automatic File Discovery: Recursively scans for and groups episode files based on common naming conventions (e.g.,
... (German Dub).mp4). - Seamless Muxing: Uses
mkvtoolnixwithin a Docker container to ensure a clean and reliable muxing process. - Smart Subtitle Handling: If a Japanese audio track is detected,
animuxwill:- Search for and download the best-matching subtitles using
subliminal. - Perfectly synchronize the subtitles to the audio track with
ffsubsync.
- Search for and download the best-matching subtitles using
- Efficient Cleanup: After muxing, you'll be prompted to delete the original source files and
.trickplayfolders to save space. - Rich Console Output: Provides clear, colored, and informative feedback on the entire process.
Prerequisites
Before you begin, ensure you have the following installed on your system:
- Python 3.8+
- Docker: The
mkvtoolnixDocker image is used for muxing. The tool will attempt to pull the image if it's not found locally. - FFmpeg: Required by
ffsubsyncfor subtitle synchronization.
Installation
You can install animux directly from this repository. For development, it's recommended to use an editable install.
-
Clone the repository:
git clone https://github.com/your-username/animux.git cd animux
-
Install the package:
pip install -e .
The
-eflag makes the installation editable, so any changes you make to the source code will be immediately effective.
Usage
The primary command for animux is straightforward. Simply point it to the directory containing your episode files.
animux --dir /path/to/your/series
Options
--dir: (Required) The target directory to scan for episode files.-y,--yes: (Optional) If this flag is provided, the cleanup prompt will be skipped, and source files will be automatically deleted after muxing.
Example
Suppose you have a directory structure like this:
/media/hdd/series/
├── My Awesome Anime - 01 - (German Dub).mp4
├── My Awesome Anime - 01 - (German Sub).mp4
└── My Awesome Anime - 01 - (English Dub).mp4
You would run:
animux --dir /media/hdd/series
The tool will then:
- Identify the three files as belonging to "My Awesome Anime - 01".
- Mux them into a single
My Awesome Anime - 01.mkv. - Since a "Sub" version is present, it will search for and sync German subtitles.
- Finally, it will ask if you want to delete the original
.mp4files.
Project details
Release history Release notifications | RSS feed
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 animux-0.1.0.tar.gz.
File metadata
- Download URL: animux-0.1.0.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78b0004cc7c0870fffa1aa3745983fb07f16c8366c629538a81fef67df0f48eb
|
|
| MD5 |
8b54d633fffa6046793bfb168a49772e
|
|
| BLAKE2b-256 |
6201eb05118d1af4be3cd0a2775bc878cd83fee0a1559aac74a2b208456d220e
|
Provenance
The following attestation bundles were made for animux-0.1.0.tar.gz:
Publisher:
publish.yml on Yezun-hikari/AniWorld-Downloader_Mux-Tool
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
animux-0.1.0.tar.gz -
Subject digest:
78b0004cc7c0870fffa1aa3745983fb07f16c8366c629538a81fef67df0f48eb - Sigstore transparency entry: 781784801
- Sigstore integration time:
-
Permalink:
Yezun-hikari/AniWorld-Downloader_Mux-Tool@1fc28fd888bbb2c68f77be2c04fe281611442284 -
Branch / Tag:
refs/tags/v.1.0.0e - Owner: https://github.com/Yezun-hikari
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1fc28fd888bbb2c68f77be2c04fe281611442284 -
Trigger Event:
push
-
Statement type:
File details
Details for the file animux-0.1.0-py3-none-any.whl.
File metadata
- Download URL: animux-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b430d91a827bd3d12301299f46da69576cc644e2fb4a3b2129d82cc8ba9f15e
|
|
| MD5 |
f7e695dd5a563686cd44a9cfcb3ba9d8
|
|
| BLAKE2b-256 |
4874cb8d9c9489e80620d0c6bc7341f7100cac6e5a2cbef49ef6e4853b86700e
|
Provenance
The following attestation bundles were made for animux-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Yezun-hikari/AniWorld-Downloader_Mux-Tool
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
animux-0.1.0-py3-none-any.whl -
Subject digest:
0b430d91a827bd3d12301299f46da69576cc644e2fb4a3b2129d82cc8ba9f15e - Sigstore transparency entry: 781784809
- Sigstore integration time:
-
Permalink:
Yezun-hikari/AniWorld-Downloader_Mux-Tool@1fc28fd888bbb2c68f77be2c04fe281611442284 -
Branch / Tag:
refs/tags/v.1.0.0e - Owner: https://github.com/Yezun-hikari
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1fc28fd888bbb2c68f77be2c04fe281611442284 -
Trigger Event:
push
-
Statement type: