Slightly modifying the command line by @izx, I got this:
1 2 |
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):
1 |
-fflags +bitexact -flags:v +bitexact -flags:a +bitexact |
The easiest way to do this is to set -map_metadata
to use one of the input streams, rather than using global metadata. 99% of the time this should work. NOTE: I’m using avconv, because that’s in the Ubuntu 12.04 repositories; this will probably be drop-in compatible with ffmpeg, since their syntax always is in my experience.
1 |
avconv -i input.mp4 -map 0 -map_metadata 0:s:0 -c copy output.mp4 |
1 |
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" |
1 |
ffmpeg -hide_banner -i "$video" -map 0:v:0? -map 0:a? -map 0:s? -c copy -map_metadata:g -1 "$outputVideo" |