Remove all attributes/properties of mkv movies

0

I have too many movies in some hierarchical data structure starting from a directory. I need to remove all their attribute/properties, because some of them have wrong information, and honestly I don't need it.

Typically, the way to do this "manually" (in Windows) is by going to the file's Properties, then Details tab, click on the link at the bottom, then either create a new copy with properties removed, or remove them manually; as shown in the following picture:

enter image description here

I know how to loop over all the files in my movies directory (in both Windows and Linux). So, my question is: Is there a Windows or Linux command prompt/terminal command that will remove these properties, given an mkv/mp4 file?

I expect something like:

mkvtoolnix --remove-all-attributes my-movie.mkv

The Quantum Physicist

Posted 2017-03-15T20:41:51.383

Reputation: 648

Answers

0

Did you think of ffmpeg? It is an excellent tool for manupulating video files. Have a look here and see whether it can accomplish what you are looking for.

ffmpeg -i in.mkv -map_metadata -1 -c:v copy -c:a copy out.mkv

This removes metadata and copies both the audio and video streams over to a new file.

Update:

Let's say you have other streams (e.g. subtitles) that you want to preserve, the command becomes (note that this will delete all streams' metadata):

ffmpeg -i in.mkv -map_metadata -1 -c copy -map 0 out.mkv

Let's say you want to suppress only one or more metadata, and not all:

ffmpeg -i in.mkv -metadata title='' -c copy -map 0 out.mkv

simlev

Posted 2017-03-15T20:41:51.383

Reputation: 3 184

The problem with ffmpeg is that it'll reencode the whole video... right? I just want to remove the attributes without reencoding anything at all. – The Quantum Physicist – 2017-03-16T13:50:56.697

Wrong! With the above parameters the audio and video streams are copied as-is and not reencoded. – simlev – 2017-03-16T13:54:05.263

I tested this solution. It removed embedded subtitles. This is the problem with ffmpeg. I need a way to subtract metadata, not rebuild everything from scratch and not include metadata. – The Quantum Physicist – 2017-03-16T18:14:07.673

From the image you posted it looked like you wanted "Subtitle" to be removed. In any case, it's just a tool: it simply does what you instruct it to do. – simlev – 2017-03-16T20:23:46.487