How to remove tag spam and set language in several MKV files at once

Interesting.

I just downloaded the latest version of MKVToolNix (42.0.0 portable) and mkvpropedit.exe from that package is not preserving timestamps for me.

In the meantime, I did find that the Linux approach can be achieved in Windows by using the old CoreUtils for Windows package, and I figure I might as well share what I’ve come up with.

Steps (that avoid having to install the whole package):

  1. Download the CoreUtils binaries .zip
  2. Download the CoreUtils dependencies .zip
  3. Extract touch.exe from the binaries .zip
  4. Extract the two .dll files from the dependencies .zip
  5. Put the .exe and the .dll files into a single location
  6. Create a dummy .txt file (in my case, _TimestampTransfer.txt) in the same folder as your .mkv files
  7. Place a .bat script along the lines of the following in the same folder as your .mkv files:
@echo off
cd /d "%~dp0"
for /r %%i in (*.mkv) do (
  echo Processing "%%i"
  "C:\Path\To\touch.exe" -r "%%i" "_TimestampTransfer.txt"
  "C:\Path\To\mkvpropedit.exe" "%%i" --tags all:"" --delete title --delete-attachment mime-type:image/jpeg --delete-attachment mime-type:image/pjpeg --delete-attachment mime-type:image/png --delete-attachment mime-type:text/plain --edit track:v1 --delete name
  "C:\Path\To\touch.exe" -r "_TimestampTransfer.txt" "%%i"
  echo.
)

pause

This script was customized for my needs, based on what I found in my .mkv files. It:
  1. --tags all:"" - removes any tags
  2. --delete title - deletes any title in the general info section of the file
  3. --delete-attachment - deletes any .jpg, .png, and .txt attachments
  4. --edit track:v1 --delete name - deletes any nested title in the video stream itself
  5. for /r %%i in (*.mkv) do ( - the /r tells the script to recurse down in to subfolders and processes any .mkv files it finds there

For #4, I found that I had these “nested titles” in a number of my video files and that Plex would read them if they were there and there was no title in the general info of the file.

Cheers,
Nathan