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):
- Download the CoreUtils binaries .zip
- Download the CoreUtils dependencies .zip
- Extract
touch.exefrom the binaries .zip - Extract the two
.dllfiles from the dependencies .zip - Put the .exe and the .dll files into a single location
- Create a dummy .txt file (in my case,
_TimestampTransfer.txt) in the same folder as your .mkv files - 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:
-
--tags all:""- removes any tags -
--delete title- deletes any title in the general info section of the file -
--delete-attachment- deletes any .jpg, .png, and .txt attachments -
--edit track:v1 --delete name- deletes any nested title in the video stream itself -
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