Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

muxtools-styx

muxtools-styx is a small, local-only policy layer for muxtools. It can clean up one mux, combine a new target with selected tracks from a donor, inspect media and parsed filename metadata, or preflight and process an episode directory sequentially.

Python 3.12 or newer and MKVToolNix/FFmpeg are required. Binary wheels are published for Linux x86_64/ARM64, Windows x86_64/ARM64, and macOS ARM64.

CLI

muxtools-styx mux target.mkv -o finished.mkv
muxtools-styx mux target.mkv --donor previous.mkv --fill-audio --keep-subs-missing-languages
muxtools-styx batch downloads/ --donor-dir previous/ --out-dir muxed --dry-run
muxtools-styx --json inspect '[Group] Show - 03 [1080p CR].mkv'

The important source-policy flags are:

  • --keep-video: use donor video instead of target video.
  • --keep-audio: append every donor audio track.
  • --fill-audio: append donor audio languages absent from the target, plus matching forced/sign tracks. It cannot be combined with --keep-audio.
  • --keep-subs: append every donor subtitle.
  • --keep-subs-missing-languages: append donor subtitle languages absent from the target.
  • --keep-non-english: append non-English donor subtitles.
  • --discard-new-subs: remove target subtitles before donor subtitle policy is applied.
  • --best-audio: retain one Japanese candidate using the deliberately narrow web-audio preference documented in the source.
  • --remove-unnecessary: retain only configured audio/subtitle languages.

--audio-sync and --sub-sync are independent donor offsets in milliseconds. --restyle-subs applies the Styx Gandhi-family cleanup to selected ASS tracks. --fix-tags repairs technical metadata and flags; --normalize-track-names separately normalizes user-facing audio/subtitle titles. --tpp is currently a documented no-op and emits one warning.

A donor-free mux using only --fix-tags, --normalize-track-names, or both edits an MKV in place with mkvpropedit when -o is omitted or points to the input file. Any other policy, or a distinct output path, uses the normal remux path.

--supplemental-info TEXT supplies extra target filename metadata for source provenance when the filename itself has no recognized service. --donor-supplemental-info TEXT does the same for a donor. A recognized source in the actual filename takes precedence.

Temporary muxtools work directories are removed after a successful mux. Pass --no-clean-work-dirs to retain extracted and transformed files for inspection.

In JSON mode normal diagnostics are written to stderr. Successful mux and batch results are stable, small objects suitable for Styx-Downloader:

{"output":"/absolute/path/to/result.mkv"}

Styx-Downloader should resolve its own %...% metadata before invocation and may leave muxtools $...$ tokens in --out-name. The deferred $crc32$ token is rejected because its final filename cannot be collision-checked during preflight.

Python API

The caller owns the active muxtools.Setup; the operation owns inspection, selection, transformations, and the final mux.

from pathlib import Path

from muxtools import Setup
from muxtools_styx import MuxOptions, TrackOptions, process_mux

Setup(
    episode="03",
    config_file="",
    show_name="Sousou no Frieren",
    out_dir="muxed",
    out_name="[Group] $show$ - $ep$ [$res$]",
)

output = process_mux(
    Path("target.mkv"),
    donor=Path("previous.mkv"),
    options=MuxOptions(tracks=TrackOptions(fill_audio=True, keep_subs_missing_languages=True)),
)

Batch matching uses normalized season/episode keys, applies offsets to the donor side, rejects duplicates and unsafe episode ranges, completes preflight before muxing, and runs accepted files sequentially because muxtools.Setup is process-wide state.

Development

Clone with submodules, or initialize them before building:

git submodule update --init --recursive
uv sync
uv run ruff format
uv run ruff check .
uv run pyrefly check
uv run pytest
uv build

Versions come from Git tags using the same versioningit scheme as muxtools: a clean v0.3.0 tag builds as 0.3.0, subsequent commits as 0.4.0.devN+gHASH, and dirty builds add .dirty (or use 0.4.0+dirty at the tag). Clone with full history for version detection. Builds without Git metadata or sdist metadata fall back to 0.0.0+unknown. The generated muxtools_styx._version module exposes __version__ and __version_tuple__, also available from muxtools_styx.

Anitomy is a pinned Git submodule under subprojects/anitomy and is bound directly through nanobind. The binding preserves ordered elements, duplicates, UTF-8 values, and byte positions; Styx-specific interpretation remains in Python.

Metadata

Release files for muxtools-styx 0.3.0b3

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

Source distribution (sdist)

Source distribution for muxtools-styx 0.3.0b3
File Size Uploaded Provenance
muxtools_styx-0.3.0b3.tar.gz 89.4 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for muxtools-styx 0.3.0b3
File
muxtools_styx-0.3.0b3-cp312-abi3-win_arm64.whl CPython 3.12 abi3 Windows ARM64 Details
muxtools_styx-0.3.0b3-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details
muxtools_styx-0.3.0b3-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 abi3 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
muxtools_styx-0.3.0b3-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.12 abi3 Linux glibc 2.26+ ARM64, Linux glibc 2.28+ ARM64 Details
muxtools_styx-0.3.0b3-cp312-abi3-macosx_12_0_arm64.whl CPython 3.12 abi3 macOS 12.0+ ARM64 Details

Total release size: 1.5 MB

Release files / muxtools_styx-0.3.0b3.tar.gz

Download URL muxtools_styx-0.3.0b3.tar.gz
Size 89.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a911b39e5284237283e6d7b6b3bc7c14170b88048ef0c443504da57bfcde6f91
BLAKE2b-256 checksum
How to use checksums
7a5677846d6effec8e4ab1f24464c399aee5b14532d5c1ecf6a2efa9c357b857
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release files / muxtools_styx-0.3.0b3-cp312-abi3-win_arm64.whl

Download URL muxtools_styx-0.3.0b3-cp312-abi3-win_arm64.whl
Size 528.2 kB
Tags CPython 3.12 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
e928bbe9966c181705e8289971ef866c24a4847a92d70e3d7e55cd5ac0b09183
BLAKE2b-256 checksum
How to use checksums
f01e44a968ae2ff9f1f068bfd7999440ae9f5376da2f811d914948402d7ba731
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release files / muxtools_styx-0.3.0b3-cp312-abi3-win_amd64.whl

Download URL muxtools_styx-0.3.0b3-cp312-abi3-win_amd64.whl
Size 361.1 kB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
acbc9afcabc42f7bb0ef87b752a7054c16dba8e3cba9c15f27b1558539b39d99
BLAKE2b-256 checksum
How to use checksums
9a921d41837f29c543201a95ed8a85144d9e354466c2896c4e612135490b6498
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release files / muxtools_styx-0.3.0b3-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL muxtools_styx-0.3.0b3-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 200.9 kB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
d1037d8e785a6f04ad08f50c8f25a1ca3228906e3ea59a368b1a97f2793fc00a
BLAKE2b-256 checksum
How to use checksums
44d08d2b4dea66710321e605d446aabab9966c5c6d5fa1d9bf451a1f660d937f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release files / muxtools_styx-0.3.0b3-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL muxtools_styx-0.3.0b3-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 188.4 kB
Tags CPython 3.12 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
e5593e9cf87658c2c57e400ddb791bea70e693f0fc2dad79260ab7877a0dc7e0
BLAKE2b-256 checksum
How to use checksums
4bad725806ee7c84d2b8733e599a9988b829f020758c6dd25814516f4701951f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release files / muxtools_styx-0.3.0b3-cp312-abi3-macosx_12_0_arm64.whl

Download URL muxtools_styx-0.3.0b3-cp312-abi3-macosx_12_0_arm64.whl
Size 145.9 kB
Tags CPython 3.12 abi3 macOS 12.0+ ARM64
SHA-256 checksum
How to use checksums
f150ad1a958eeec20bcf296688cc214340715e6f600b25775d1c0ebd377cc800
BLAKE2b-256 checksum
How to use checksums
f436b6844a1e6d63697aaa2a6ea9191244c21867dcaf48e5f03f98cafa137d17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Security for muxtools-styx 0.3.0b3

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.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for muxtools_styx-0.3.0b3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

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