Skip to main content

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 mkvtoolnix within a Docker container to ensure a clean and reliable muxing process.
  • Smart Subtitle Handling: If a Japanese audio track is detected, animux will:
    • Search for and download the best-matching subtitles using subliminal.
    • Perfectly synchronize the subtitles to the audio track with ffsubsync.
  • Efficient Cleanup: After muxing, you'll be prompted to delete the original source files and .trickplay folders 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 mkvtoolnix Docker image is used for muxing. The tool will attempt to pull the image if it's not found locally.
  • FFmpeg: Required by ffsubsync for subtitle synchronization.

Installation

You can install animux directly from this repository. For development, it's recommended to use an editable install.

  1. Clone the repository:

    git clone https://github.com/your-username/animux.git
    cd animux
    
  2. Install the package:

    pip install -e .
    

    The -e flag 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:

  1. Identify the three files as belonging to "My Awesome Anime - 01".
  2. Mux them into a single My Awesome Anime - 01.mkv.
  3. Since a "Sub" version is present, it will search for and sync German subtitles.
  4. Finally, it will ask if you want to delete the original .mp4 files.

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

animux-0.1.1.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

animux-0.1.1-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file animux-0.1.1.tar.gz.

File metadata

  • Download URL: animux-0.1.1.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for animux-0.1.1.tar.gz
Algorithm Hash digest
SHA256 32c859f4528a40ef2ecd23cc3e06e7dbf8227754e904137811647b62fe650ce8
MD5 532c077efed8ad6490eecb3f5b598fa0
BLAKE2b-256 48e78e72436a561a22145cabb958ae9a0afeeb28b5635dcbe90277a72d0e0b19

See more details on using hashes here.

Provenance

The following attestation bundles were made for animux-0.1.1.tar.gz:

Publisher: publish.yml on Yezun-hikari/AniWorld-Downloader_Mux-Tool

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file animux-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: animux-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for animux-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 39ffded1436dbe45fa9fe39594ad8d3abc262ff1c557264f162fa8c456d547cf
MD5 20612a02791de9a0e085a04a2c0d5f90
BLAKE2b-256 e0acc62188d439788948fde21e572df0348906af166510d86a283bc11c148e4a

See more details on using hashes here.

Provenance

The following attestation bundles were made for animux-0.1.1-py3-none-any.whl:

Publisher: publish.yml on Yezun-hikari/AniWorld-Downloader_Mux-Tool

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page