Strip metadata from all formats with FFmpeg

Solution 1:

Slightly modifying the command line by @izx, I got this:

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

The result is (again, checked with exiftool), a metadata record reduced from 81 to 52 lines. Note that you can't simply remove all metadata, some things will stay.

If you want to remove the newly added encoder field, add this to the command (before the output filename):

-fflags +bitexact -flags:v +bitexact -flags:a +bitexact

Thanks to @wisbucky for the hint.

However, I didn't get the creation date to change, which is strange because it seemed to work in the Ubuntu version. I posted on the FFmpeg mailing list, asking whether there were any updates or comments on that, but there was no answer.

Solution 2:

My solution to strip metadata, chapters, to change creation time and title. This way any metacontent should be different from the original file:

ffmpeg -y -i "test.mkv" -c copy -map_metadata -1 -metadata title="My Title" -metadata creation_time=2016-09-20T21:30:00 -map_chapters -1 "test.mkv"