Does anyone know how to remove all metadata from an MKV file?

Occaisionally I will obtain a publicly available video file as .mkv that contains metadata. I would like to be able to remove all of the metadata contained in the file (encoder, title, comments, video source, etc.).

Using mkvtoolnix I’ve been successfull at removing the MKV title metadata using the command: mkvpropedit.exe" "%%i" -d title

However the files will still contain other metadata. Easiest way to see it is by using VLC Media Player > Tools > Codec Information > Metadata

Is there a way to remove all metadata contained withing the mkv file?

this is an excerpt from my script which handles all my mkv cleaning in-place

rm -f temp.mkv
mkvmerge -o temp.mkv -M -S --no-global-tags --disable-track-statistics-tags "$1"
if [ $? -ne 0 ]; then
  echo `date` Bad file: Error \($?\) \"$1\" >> $Logfile
  rm -f temp.mkv
else
  echo `date` "Keeping: " "$1" 
   mkvpropedit -s title="" temp.mkv
   mkvpropedit --edit track:a1 --set language=eng --edit track:v1 --set language=eng temp.mkv
   mkvpropedit --edit track:a1 -s name="" temp.mkv

   # Copy date/time stamp of original file to new file
   Orig="`stat -c '%y' "$1"`"
   mv -f temp.mkv "$1"
   touch touch -m -d "$Orig" "$1"
   rm -f temp.mkv
fi

Thank you! I’m trying this now, thanks again!

Can you please help me?
I can’t seem to get a console to paste in the code.

Kind regards

to paste in any code

```
paste code here
```

Looks like:

paste code here

This is the grave (back tick) character underneath the ~

mkvpropedit --tags all:"" --delete title
should remove all global tags.

To remove tag spam from the single audio, video and subtitle tracks, you’ll have to address those individually. (as far as I know)

see How to remove tag spam and set language in several MKV files at once
It also contains a script for Linux.