Skip to main content

A powerful TUI tool to interactively select and remux audio/subtitle tracks from video files

Project description

TrackRemux

TrackRemux is a powerful Terminal User Interface (TUI) tool designed to help you clean up your video library. It allows you to interactively specify audio and subtitle tracks from your video files and remux them into clean, optimized containers without re-encoding the video stream.

This whole project was vibe coded on a Friday evening out of necessity while organizing the media library on my NAS.

Media Browser

🚀 Purpose

Modern media often comes with a bloat of unnecessary tracks—commentary audio, multiple languages you don't speak, or dozens of subtitle formats. TrackRemux simplifies the process of removing this clutter.

This not only saves significant disk space but also prevents the confusion and inconvenience of managing tracks in media players (like those on Smart TVs or mobile devices) where selecting the right audio or subtitle stream can be cumbersome or even impossible.

Instead of wrestling with complex ffmpeg command-line arguments for every single file, TrackRemux provides a visual interface to:

  1. Scan directories for video files.
  2. Select exactly which tracks you want to keep.
  3. Remux the file efficiently (Direct Stream Copy).

✨ Features

  • Interactive TUI: Built with curses for a fast, keyboard-centric workflow.
  • Rich Meta-data Explorer:
    • Displays file sizes, track counts, and audio languages at a glance.
    • Visual Status Indicators: Instantly spot files that have already been converted (Green size) or are currently processing (Dim Yellow).
  • Deep Track Inspection:
    • View detailed info for every stream (Codec, Language, Bitrate, Channels).
    • Smart Matching: Automatically detects existing conversions and restores your previous track selections.
  • Preview Capabilities: Listen to audio tracks directly from the TUI (macOS afplay integration) to confirm contents before keeping them.
  • Safe Conversion:
    • Uses ffmpeg for robust processing.
    • Non-destructive: Creates new files (converted_filename) by default.
    • Real-time progress bar and size estimation.

� Visual Walkthrough

1. Launch & Directory Scan

Scan any folder to instantly see track counts and sizes. Launch

2. Intelligent Track Selection

Pick exactly what you need. Audio previews help distinguish between different dubs or commentaries. Selecting Tracks

3. Fast, Lossless Conversion

Watch the progress in real-time as ffmpeg remuxes your file at disk-IO speeds. Converting

4. Successful Completion

Final sizes and success messages are displayed directly in the TUI upon completion. Result

5. Efficient Storage

Remuxing is lossless and fast. You can see the significant size savings in your directory listing without any quality loss. Result Difference

�🛠️ Prerequisites

  • Python 3.10+
  • FFmpeg must be installed and accessible in your system PATH.
    • macOS: brew install ffmpeg

📦 Installation

  1. System Requirements:

    • Ensure ffmpeg is installed:
      • macOS: brew install ffmpeg
      • Linux: sudo apt install ffmpeg
    • Python 3.10+ (TrackRemux uses only the standard library for the app itself).
  2. Dev Setup (Optional): If you want to contribute, we use uv for dependency management:

    uv sync
    
  3. Run it directly:

    python3 trackremux.py /path/to/directory
    

🖥️ Usage

Run the tool by pointing it to a directory or a single video file.

Explorer Mode (Directory)

python3 trackremux.py /path/to/your/movies

Single File Mode

python3 trackremux.py "My Movie.mkv"

⌨️ Keyboard Controls

File Explorer

Key Action
↑ / ↓ Navigate file list
PgUp / PgDn Scroll pages
Enter Open selected file in Editor
M Toggle Mouse Support
Q Quit Application
N / S / T / A Sort by Name, Size, Tracks, Audio Size

Track Editor

Key Action
Space Toggle Track (Keep/Discard)
Enter Preview Track (Audio only)
L/R Arrows Seek in preview
↑ / ↓ Navigate Tracks
S Start Conversion / Save changes
Esc / Q Back to Explorer

🗺️ Roadmap

  • Batch Processing: Select multiple files to queue for sequential remuxing.
  • Track Reordering: Allow changing the order of audio and subtitle tracks in the final file.
  • Modern TUI: Consider migrating to Textual for better UI/UX and cross-terminal compatibility.
  • Custom Rules: Auto-selection of tracks based on preferred languages.

📝 License

MIT License. See LICENSE for more details.

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

trackremux-0.3.0.tar.gz (21.1 kB view details)

Uploaded Source

Built Distribution

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

trackremux-0.3.0-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

Details for the file trackremux-0.3.0.tar.gz.

File metadata

  • Download URL: trackremux-0.3.0.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for trackremux-0.3.0.tar.gz
Algorithm Hash digest
SHA256 02d9552aa30529fcf95c0afc05344b5facce97581d6506a710f871f0b8373405
MD5 b9f51e7370dc8405a53e4119487a6bb7
BLAKE2b-256 bb471283da868868ece11a5479e3b162001f20547b602ba72d8a1d3da61367c6

See more details on using hashes here.

File details

Details for the file trackremux-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: trackremux-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 23.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for trackremux-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d18381fc41e2bfdac44fe2bf08fd1e87b8a4175af91edd0a0895d6c028dba465
MD5 c9f0951146702c07c3887a4d79882ce3
BLAKE2b-256 da389fb8ff621c04cf4a9fa9467c0cc4d3f67e357cceacff76aca3a90a7dc0a5

See more details on using hashes here.

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