Jump to content

AudioRemover – remove foreign-language audio tracks


Recommended Posts

Posted

Hi all,

The audio twin of SubRemover: AudioRemover removes the audio tracks in languages you don't want from your video files and leaves everything else alone. Video and subtitles are copied as-is, with no re-encoding. It can also fix wrong language tags, pick the best-quality track as the default, and clean site and release-group ads out of track names.

🆕 Latest version: 0.5.1 – what changed is under Revisions at the bottom.

✅ What it does

  • Choose the languages to keep: every other audio track is removed.
  • Never leaves a video without sound: when no main track is in a language you keep (a foreign film with only its own language), every track stays.
  • Test mode is on by default: nothing is changed; it only logs what it would do.
  • Backups: the original is kept next to the video or copied to a folder you choose. Old backups can be deleted after a number of days.
  • Undo: Restore originals from backups puts the originals back.
  • Safety check: every new file is checked against the original before it replaces it. If anything doesn't match, the original stays.

⚙️ Options

  • Keep audio with no language set, and optionally always keep the first audio track
  • Remove commentary tracks and audio description tracks, even in languages you keep (only while a main track stays)
  • Set the default audio track: the default moves off removed, commentary and audio description tracks. Or choose a Default audio language.
  • Default to the best-quality track: between tracks in the same language, the one with the most channels wins (5.1 over a stereo copy), then lossless, then the higher bitrate
  • Clean up track names: takes ads like English - SomeSite.com out of track names, so Emby's audio and subtitle menus show the language and format instead. The list of what's removed is editable (websites like *.com, words, or regular expressions), with Check and Reset buttons.
  • Suggested text: every run collects text that keeps turning up in track names across different films and shows (release group tags and the like) into an editable box. Pick what to add; text you add is cleaned out of the videos it was found in. Language labels like English (United States) or pt-BR are never suggested.

🎧 Listening with Whisper (optional)

  • When a video has two or more audio tracks and none is tagged with a language you keep, Whisper (a free speech model that runs offline on your server) listens to short clips of each track and names the language spoken.
  • Act on what it hears: a "Finnish" track that's really English is kept and its tag corrected.
  • Extra safe: before a tag is changed, the next bigger Whisper model listens to 10 more clips, and at least 7 must agree, each 90% sure.
  • Check and retag a lone track: a video's only track, tagged with a language you don't keep, gets its tag corrected when it's really your language.
  • Tag tracks that have no language: two or more untagged tracks (often a stereo and a 5.1 copy) get the language Whisper hears, so Emby shows "English" instead of "Unknown".
  • whisper.cpp and the model you choose (Base, 141 MB, recommended) are downloaded the first time they're needed, from fixed addresses, and checked against their checksums.

🖥️ Easy to use

  • Its own settings page with Run now, Stop, run status and a log viewer. Open any run log in a new window or download it.
  • A Help section at the bottom of the settings page explains every setting.
  • Process new videos as they're added: when Emby adds videos, AudioRemover waits until none have arrived for a few minutes, then checks just those in one run.
  • An entry in the server sidebar under Advanced (can be turned off)
  • Limits for testing: Max videos per run, and Only process paths containing to try it on a single title (several titles separated with ;)
  • Every run log starts with your settings and ends with totals of what was (or would be) done.
  • Works alongside SubRemover: the two never rewrite the same file at the same time.

📥 Install

  1. Download Emby.AudioRemover.dll from the GitHub Releases page (take the newest one):
    https://github.com/Snake98bm/Emby.AudioRemover/releases
  2. Stop Emby Server and copy the DLL into Emby's plugins folder:
    • Windows: %AppData%\Emby-Server\programdata\plugins
    • Linux: /var/lib/emby/plugins
    • Docker (emby/embyserver or linuxserver/emby): /config/plugins inside the container. On the host, that's the plugins folder inside the folder you mapped to /config, e.g. /docker/emby/config/plugins. Stop the container (docker stop emby), copy the DLL there, and make sure it has the same owner as the other files in that folder (your PUID/PGID).
      Or copy it straight into the container: docker cp Emby.AudioRemover.dll emby:/config/plugins/
      (Replace emby with your container's name.)
  3. Start Emby (Docker: docker start emby) and press Ctrl+F5 in your browser.
  4. Go to Settings → Plugins → AudioRemover. Pick your libraries and the languages to keep, and leave Test mode on.
  5. Click Run now, then read the run log at the bottom of the page.
  6. When the log looks right, turn Test mode off, set Max videos to change per run to a few, and run it again. Check those files in Emby before letting it do the rest.

Updating: same as installing. Stop Emby, replace the DLL, start Emby and press Ctrl+F5. Your settings carry over.

🧪 Tested on

  • Emby Server 4.10.2 on Windows, with full-library test runs
  • The build and tests also pass on Linux, but I haven't run it on a real Linux or Docker server yet. The ready-made Whisper download is for Windows; on Linux, whisper.cpp is installed by hand. Feedback welcome!

📝 Revisions

  • 0.5.1 – New: Suggested text, built up by every run, with Where they were found, and Clean names where added suggestions were found. Language labels, native language names, format words and commentary names are never suggested. A line in the list also matches words joined by _. Whisper's status shows the date of its latest check. The Help section no longer shows repeated entries after an update.
  • 0.5.0 – First public release: language filtering, default audio and best-quality default, Whisper listening (act on it, extra safe, lone-track retag, tagging untagged tracks), track name clean-up, restore, and processing new videos as they're added.

Source code, issues and the MIT license are on GitHub:
https://github.com/Snake98bm/Emby.AudioRemover

Its twin for subtitles, SubRemover (removes unwanted embedded subtitle tracks), is here:
SubRemover – remove unwanted embedded subtitle tracks (new plugin, SubKiller replacement)

⚠️ Please keep Test mode on for your first run and keep backups on. If something looks wrong in the log, post it here or open an issue on GitHub.

Emby.AudioRemover.dll

Posted

Saving for future need.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...