#cli #utility

bin+lib mux-media

A simple automated utility for muxing media (e.g. video, audio, subtitles).

12 releases

Uses new Rust 2024

0.15.0 Sep 27, 2025
0.14.3 Aug 18, 2025
0.13.6 Jul 24, 2025

#665 in Video

Download history 272/week @ 2025-08-09 180/week @ 2025-08-16 21/week @ 2025-08-23 1/week @ 2025-08-30 13/week @ 2025-09-13 135/week @ 2025-09-27 10/week @ 2025-10-04 5/week @ 2025-10-11 5/week @ 2025-10-18

1,108 downloads per month

GPL-3.0 license

1.5MB
35K SLoC

mux-media

A simple automated utility for muxing media (e.g. video, audio, subtitles).

Cargo Build & Test

Quick Start

Windows

  1. Download the full archive for your Windows system (mux-media-win64-full.zip).

  2. Unpack it.

  3. Run the unpacked mux-media.exe in a media directory.

Other Systems

  1. Install MKVToolNix.

  2. Download the archive for your system.

  3. Unpack it.

  4. Run the unpacked mux-media in a media directory.

Notices

  • Output muxed files are saved in the muxed subdirectory.

  • Input media files must share the same filename prefix. (eg., Death Note - 01.mkv and Death Note - 01.eng.aac)

  • Media is searched in:

    • the start directory
    • all its subdirectories up to the given depth (default: 16)

Advanced Use 🤓

Run mux-media -h to display help.

Custom settings can be specified:

  • via CLI arguments

  • by configuring a JSON file in a media directory.

Windows

  • The full version for Windows includes bundled mkvmerge, ffmpeg and ffprobe.

  • Use its system's versions by running mux-media --user-tools.

  • The non-full version for Windows requires manually installing MKVToolNix and FFmpeg (for custom containers or retiming).

Custom Output Containers

  • The default container is Matroska (.mkv).

  • Other supported containers: .avi, .mp4, .webm.

  • Install FFmpeg to use a custom container if you are use not using the full version.

  • Custom containers may require reencoding of unsupported tracks - use only if necessary, as this can significantly degrade quality.

Reencoding

  • By default, no reencoding is performed.

  • When using a custom container, reencoding is automatically performed if needed.

  • Use mux-media --reencode with a custom container to force reencoding.

Retiming

  • By default, retiming is performed only for Matroska linked videos.

  • Use mux-media --rm-segments .. to remove segments with name patterns (only Matroska with chapters).

  • Install FFmpeg to use it if you are use not using the full version.

Manual Build 🤓

  1. Install Rust

  2. Clone the repo:

git clone https://github.com/nujievik/mux-media
  1. Enter the project directory:
cd mux-media
  1. Build:
cargo build --release
  1. On success, the binary will be in target/release/mux-media

Features with_embedded_bins

Available only for Windows builds (x86_64-pc-windows). Embeds ffmpeg.exe, ffprobe.exe and mkvmerge.exe into the binary.

  1. Ensure that its are available in mux-media/assets/win64/:
  • Automatic (from system PATH):

    • Make sure its are available in your system's PATH.

    • The mux-media/build.rs script will automatically copy the required binaries from PATH.

  • Manually copy binaries to mux-media/assets/win64/.

  1. Follow steps 1–3 from Manual Build.

  2. Build with the feature:

cargo build --release --features with_embedded_bins
  1. On success, the binary will be in target/release/mux-media.

Alternative GUI Utilities

There are alternative utilities with user-friendly GUI interfaces, though they offer less automation:

Dependencies

~9–14MB
~229K SLoC