When we work with multimedia files that we download from the internet we see that they may contain metadata, which in some cases are helpful but in others they are simple spam. On many occasions I wanted to delete these metadata to leave the files clean, so I write this tutorial on
how to delete metadata with FFmpeg or ExifTool
This tutorial should work for any type of file and as we will use FFmpeg or ExifTool,
the instructions we will give here will be valid for both Windows and Linux
. When working with audio files in Windows, I recommend using the Mp3tag program directly.
First of all, we must know that
metadata is nothing more than information that is added to multimedia containers
to be able to classify them efficiently. Video files with extension .mp4, .mkv, .mov, .wmv, etc ... may contain metadata.
How to delete metadata with ExifTool.
Personally, the method I like most to remove metadata from multimedia files is to use the free ExifTool application. First of all we must have the program installed, for this we can follow the tutorial on
how to install ExifTool on Linux Ubuntu or Windows
Once installed, we execute the following command from the console (note that
there is a blank space
exiftool -all= input.mp4
As you can see, it is a simple and fast method, but in case of problems we provide you with a second method to erase the metadata using FFmpeg.
How to delete metadata with FFmpeg.
Obviously we will need the FFmpeg application installed in our operating system. In the case of
Ubuntu or CentOS you can follow this tutorial
and in the case of Windows you can download it directly from
FFmpeg works in console mode, so we will have to execute commands to eliminate the metadata.
The command shown below works with recent versions of FFmpeg, if you have an old version, start by updating the program.
Command to delete metadata with FFmpeg from the console:
ffmpeg -i input.mp4 -map 0 -map_metadata -1 -c copy output.mp4
This command does not perform any recoding of the data, so
the audio or video quality is not modified at any time
and is quite fast. We must also bear in mind that during this operation it is advisable to keep the same multimedia container, that is, if we work with an
file it is preferable that the output container is