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.0b2

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.0b2
File Size Uploaded Provenance
muxtools_styx-0.3.0b2.tar.gz 85.7 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for muxtools-styx 0.3.0b2
File
muxtools_styx-0.3.0b2-cp312-abi3-win_arm64.whl CPython 3.12 abi3 Windows ARM64 Details
muxtools_styx-0.3.0b2-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details
muxtools_styx-0.3.0b2-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 abi3 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
muxtools_styx-0.3.0b2-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.0b2-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.0b2.tar.gz

Download URL muxtools_styx-0.3.0b2.tar.gz
Size 85.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e6aa67be55e40c6df520f1a706043e5a7174b51456a53a4b2532002961bf973d
BLAKE2b-256 checksum
How to use checksums
a5a5c2712bcf73e961e99abfa2462ea59761de9f5ab535cd86a8bc383324f10f
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 Sep 30, 2026.

Transparency log

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

Download URL muxtools_styx-0.3.0b2-cp312-abi3-win_arm64.whl
Size 523.4 kB
Tags CPython 3.12 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
62f12ee81577cde0428ea77363adf46460442d757618c981838c6c2f448b08c4
BLAKE2b-256 checksum
How to use checksums
3b9a8b59d86930e9f8e3846e37640618f89b1878a1875954dfdbdf49ee53e1f0
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 Sep 30, 2026.

Transparency log

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

Download URL muxtools_styx-0.3.0b2-cp312-abi3-win_amd64.whl
Size 357.0 kB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
3e5e61010b8d3ac8c32bb1a60420f92f4f95c33cbe9b2c82c5bbc366f2a23205
BLAKE2b-256 checksum
How to use checksums
acc9c8c84882ca2b1a34ec3c451386ed73b5689e3833b3dc6372927637e04ab9
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 Sep 30, 2026.

Transparency log

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

Download URL muxtools_styx-0.3.0b2-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 197.6 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
dd6af2659ba5cec62dd17d11cb47da306b3e2797bcd3c7041a661fa9fb9321cc
BLAKE2b-256 checksum
How to use checksums
aa4b46166a10f3a4d09d66becdaca0403d21438f8f7e0efdd294c8a24233e7f2
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 Sep 30, 2026.

Transparency log

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

Download URL muxtools_styx-0.3.0b2-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 185.1 kB
Tags CPython 3.12 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
53d7c269d5fbc29657d37f3e3612f95d185c4418fb3d4b99cdd2e76cfa840a36
BLAKE2b-256 checksum
How to use checksums
c44241a0e32cd7f6153744e2c9615f54de6c4cd315f63e069ade357a172bdc15
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 Sep 30, 2026.

Transparency log

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

Download URL muxtools_styx-0.3.0b2-cp312-abi3-macosx_12_0_arm64.whl
Size 140.3 kB
Tags CPython 3.12 abi3 macOS 12.0+ ARM64
SHA-256 checksum
How to use checksums
9048c678f9f8a1a345a404b9270fd2291b50c2c11a8b42274602505175088780
BLAKE2b-256 checksum
How to use checksums
1be2dce3e7b6df36b9ca7a68a7337841bbbe3a875422be8c45f3ba5b3900256b
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 Sep 30, 2026.

Transparency log

Security for muxtools-styx 0.3.0b2

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.0b2.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 Sep 30, 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