Welcome to the MaikaMux Script! This powerful tool automates the process of muxing MKV files with subtitles, chapters, and fonts using mkvmerge. It's designed to be user-friendly and efficient. Made especially to mke life easier for anime subtitle enthusiasts. I started this project a long time ago, several fansub groups used it. It was written in C#, but due to the fact that I use different op systems, I decided to rewrite it to a more universal language.
- 🎞️ Automatically mux MKV files with matching subtitles, chapters, and fonts
- 🌈 Colorful and informative console output
- 📊 Real-time progress bar during muxing
- 🔧 Configurable settings via command-line arguments or config file
- 📁 Automatic creation of necessary folders (optional)
- 📝 Detailed logging of warnings and errors (optional)
- 🖥️ Cross-platform support (Windows, macOS, Linux)
- Python 3.6 or higher
- MKVToolNix (mkvmerge)
- Required Python modules: colorama
- Install Python from python.org
- Install MKVToolNix from mkvtoolnix.download
- Open Command Prompt and install required Python modules:
pip install colorama
- Download the
maika-mux.py
script from this repository
- Install Homebrew if not already installed:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install Python and MKVToolNix:
brew install python mkvtoolnix
- Install required Python modules:
pip3 install colorama
- Download the
maika-mux.py
script from this repository
- Install Python, pip, and MKVToolNix:
sudo apt-get update sudo apt-get install python3 python3-pip mkvtoolnix
- Install required Python modules:
pip3 install colorama
- Download the
maika-mux.py
script from this repository
Run the script in the directory containing your MKV files:
python maika-mux.py
You can specify one or more paths to MKV files or directories:
python maika-mux.py path/to/file.mkv path/to/directory
--overwrite
: Overwrite original files (default: True)--no-overwrite
: Do not overwrite original files--create-folders
: Create necessary folders (default: True)--no-create-folders
: Do not create folders--save-log
: Save mux log (default: True)--no-save-log
: Do not save mux log--config
: Edit configuration file
Example:
python maika-mux.py --no-overwrite --no-create-folders --no-save-log path/to/files
The script expects the following directory structure:
working_directory/
├── [Group] Series Name - 01 [WHATEVER](OR WHATVER)[HASH].mkv
├── subs/
│ ├── [Group] Series Name - 01.ass
│ └── [Group] Series Name - 01_2[Honorifics].ass
│ └── [Group] Series Name - 01_3.ass
├── chapters/
│ └── [Group] Series Name - 01.xml
└── fonts/
├── font1.ttf
└── font2.otf
The script creates a muxer_config.ini
file to store settings. You can edit this file directly or use the --config
option:
python maika-mux.py --config
Settings in the config file:
MKVMergePath
: Path to the mkvmerge executableOverwriteOriginal
: Whether to overwrite original files (True/False)CreateFolders
: Whether to create necessary folders if they don't exist (True/False)SaveMuxLog
: Whether to save muxing logs (True/False)
If enabled, warnings and errors are logged to mux.log.txt
in the same directory as the MKV file. The log format is as follows:
[YYYY-MM-DD HH:MM:SS]
WARNINGS FOR:
[filename.mkv]
Warning:
[filename.ass] | warning message
The following line will be skipped:
___________________________________________________
Dialogue: 0,0:00:00.00,0:00:00.00,Default,,0,0,0,,Example text
___________________________________________________
The console output uses colors for better readability:
- 🔵 Cyan: Muxing process headers
- 🟢 Green: Progress bar and success messages
- 🟡 Yellow: General information and warnings
- 🔴 Red: Errors and important file names
This script is released under the MIT License. See the LICENSE file for details.
This script uses MKVToolNix for muxing operations. Many thanks to the MKVToolNix team for their fantastic work!