Strip unused languages from mkv files en mass
Project description
Nudebomb
Nudebomb recursively strips MKV (Matroska) files of unwanted audio and subtitle tracks, keeping only the languages you specify.
Installation
Requirements
- MKVToolNix — provides the
mkvmergebinary. Available via Homebrew, apt, or your favorite package manager.
Install
pip install nudebomb
Or with uv:
uv tool install nudebomb
Quick Start
Strip all non-English tracks from a directory tree:
nudebomb -rl eng /mnt/movies
Keep English and French, recurse, and use timestamps to skip already-processed files:
nudebomb -rtl eng,fra /mnt/movies
Dry run on a single file to preview what would be stripped:
nudebomb -dvvl eng movie.mkv
Stripping languages except eng, und.
Searching for MKV files to process:
Checking movie.mkv
audio: 1 eng
audio: 2 eng
audio: 3 eng
subtitles: 4 eng
subtitles: 5 eng
Already stripped movie.mkv
done.
Usage
nudebomb [options] path [path ...]
Paths can be individual MKV files or directories. Use -r to recurse into
directories.
Configuration
Nudebomb is configured through three layers, each overriding the previous:
- YAML config file —
~/.config/nudebomb/config.yaml - Environment variables
- Command-line arguments
Config File
nudebomb:
languages:
- eng
- und
recurse: true
timestamps: true
media_type: movie
tmdb_api_key: your-api-key-here
tvdb_api_key: your-api-key-here
All command-line options have config file equivalents. Use -c to specify an
alternate config file path.
Environment Variables
Prefix with NUDEBOMB_NUDEBOMB__. List items are enumerated:
export NUDEBOMB_NUDEBOMB__RECURSE=True
export NUDEBOMB_NUDEBOMB__LANGUAGES__0=eng
export NUDEBOMB_NUDEBOMB__LANGUAGES__1=fra
export NUDEBOMB_NUDEBOMB__TMDB_API_KEY=your-api-key-here
Lang Files
Lang files let you specify additional languages to keep on a per-directory basis. This is useful when your collection spans multiple languages — you want most content to keep English, but a specific show to also keep Japanese.
How They Work
Place a file named lang, langs, .lang, or .langs in any directory. The
file contains a comma-separated list of ISO 639 language codes:
jpn
Nudebomb walks up the directory tree from each MKV file, collecting languages
from every lang file it finds. The final set of languages to keep is the union
of --languages, all lang file languages from the current directory up to the
top-level path, and any online lookup results.
Example
/mnt/tv/
.lang # contains: eng
GI Robot/
Season 1/
episode.mkv # keeps: eng, und
Anime Show/
.lang # contains: jpn
Season 1/
episode.mkv # keeps: eng, jpn, und
Online Language Lookup
When no lang files contribute additional languages for a file, nudebomb can look up the original language of the media from online databases and add it to the languages to keep. This requires an API key.
TMDB (The Movie Database)
Works for both movies and TV series. Get an API key at themoviedb.org.
nudebomb -rl eng --tmdb-api-key YOUR_KEY --media-type movie /mnt/movies
TVDB (TheTVDB)
Specialized for TV series. Get an API key at
thetvdb.com. When both keys are
configured and --media-type tv is set, TVDB is tried first for TV content.
nudebomb -rl eng --tvdb-api-key YOUR_KEY --media-type tv /mnt/tv
Filename Parsing
Nudebomb parses media filenames to extract titles, years, and database IDs. For best results, use standard naming conventions:
- Movies:
Movie Title (2024).mkvorMovie.Title.2024.BluRay.mkv - TV:
Show Name S01E02.mkvorShow.Name.1x02.mkv
You can embed database IDs in curly braces for exact matching:
{tmdb-696}— TMDB ID{imdb-tt022345}— IMDB ID (looked up via TMDB){tvdb-5780}— TVDB ID
Example: {tvdb-1234} S01E01.mkv
Caching
Lookup results are cached in ~/.cache/nudebomb/ to avoid redundant API calls.
Cache entries with a found language never expire. Entries where no language was
found expire after --cache-expiry-days (default: 30) and are re-queried.
Dot Color Key
When running at default verbosity, nudebomb prints single characters to indicate progress:
| Char | Meaning |
|---|---|
. |
MKV skipped (ignored, already stripped, or cache hit) |
. (green) |
Skipped because timestamp unchanged |
O |
Online lookup succeeded |
x |
Online lookup returned no result |
X |
Online lookup error or rate limited |
Use -vv for full text descriptions instead of dots.
Development
Source code is hosted at GitHub.
Inspiration
Nudebomb is a radical fork of mkvstrip. It adds recursion, lang files, timestamps, online language lookup, and more configuration options.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nudebomb-1.3.1.tar.gz.
File metadata
- Download URL: nudebomb-1.3.1.tar.gz
- Upload date:
- Size: 5.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35e5289dcfea89159599a65a89b0ea1483fb9a2a768647ae1cc5081af53b17d8
|
|
| MD5 |
4cfb5c2f1c196f4c38daa96209f4824b
|
|
| BLAKE2b-256 |
b31df04c22e074f027dab66abd3705525b3e594ccd5c9ab42d6a7f45c8319c9c
|
File details
Details for the file nudebomb-1.3.1-py3-none-any.whl.
File metadata
- Download URL: nudebomb-1.3.1-py3-none-any.whl
- Upload date:
- Size: 40.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c286504b112c54e5b76be6f116e348b1366bb511439b3b6dd6947115b1c2fb6
|
|
| MD5 |
9f89495ac19a9b97554812e656584efa
|
|
| BLAKE2b-256 |
d836d67ac0c04bfeea6e6280abd370d6d3c34c3c38570968c537bf1c7097b00f
|