Fixing Photo and Video File Metadata with ExifTool
Summary: Every video or picture file we capture carries information about its media, which is normally called metadata or Exif. But besides the characteristics of the media, , other personal information is also embedded in the file, such as the time it was created, GPS location of where it was created, camera model with which it was created, etc. In this article, you’ll learn how to view and edit your media files' metadata with the ExifTool software. We will also cover a scenario where we try to fix photo metadata with ExifTool if it becomes damaged somehow. Stay tuned!
File metadata is the information embedded into media files and documents typically hidden from user view and stored in the files as tags. For example, cameras add data about the manufacturer and its settings in a section outside the image data. Smartphones also do the same, adding extra tags such as GPS data to show exactly where the photo was captured.
Metadata is useful in many ways, especially when searching or representing data. But the purpose it is used for can differ from person to person; for example, photographers use this data to inspect various elements of a photo or video, such as the camera make, model, ISO, aperture, etc… In contrast, home users make use of it to remember when they captured certain precious moments.
Naturally, when you upload such media files on the internet, you’re sharing personally identifiable data in the form of this metadata. So, for safety measures, you should always check and modify the metadata of your files before you post them online. There are several ways to edit photo metadata, but you can easily edit or fix photo and video Metadata using ExifTool.
What is ExifTool?
First released in 2003, Exiftool is a command-line utility program. Technically, it is an open-source Perl library written by Phil Harvey. And, given the vast collection of file formats and types of metadata it supports, Exiftool is a great solution for Meta tag modification. You can easily edit, delete or add metadata in a media file with this tool, even without prior technical knowledge. You can also write your own logic or copyright tags and set different conditions across entire libraries of images without using any sort of shell scripting.
Here’s a quick overview of some features of Exiftool:
- Powerful, fast, flexible, and customizable metadata editor that supports a variety of file formats.
- It can easily read metadata information like-
- EXIF, GPS, IPTC, XMP, JFIF, MakerNotes, GeoTIFF, ICC Profile, Photoshop IRB, FlashPix, AFCP, ID3, etc.,
- And write information like-
- EXIF, GPS, IPTC, XMP, JFIF, MakerNotes, ICC Profile, Photoshop IRB, AFCP, etc.
Further, it can also-
- Read timed metadata (e.g., GPS track) from MOV/MP4/M2TS/AVI videos.
- Geotag images from GPS track log files (with time drift correction)
- Generate track logs from Geotagged images in different formats.
- Copy Meta information between files of different formats.
- Delete meta-information individually, in groups, and even altogether.
- Create binary-format metadata (MIE, EXV) files for metadata backup.
- Automatically back up the original image when writing a file.
- Process media files based on the value of any Meta information.
- Add custom user-defined tags in media files.
We can list endless more uses of this tool, but today, let’s stick to the ones mentioned above since they are primarily related to metadata.
Moving on, let’s learn how to edit video metadata or remove it with ExifTool.
How to edit or fix photo and video Metadata using ExifTool
The following image will help you understand what file metadata looks like in ExifTool.
To edit a video file’s metadata, first, download the ExifTool tool from its official website. The software will be downloaded in the form of a zip file. Move it to a convenient folder and extract the contents by right-clicking on it and selecting the Extract All option. The extracted file will consist of an executable named ExifTool(-k).exe. Next, you have to right-click on that file and select the “Send to > Desktop” option to create a shortcut for it on your computer’s desktop.
After setting up the software, you have to drag the thumbnail of the file you wish to edit from the directory in which it is stored to the desktop shortcut for ExifTool, as shown in the next screenshot.
Note: The first time you try to do this, your system will interrupt you with a warning pop-up. Please don’t be alarmed. Click More Info in the pop-up, followed by Run anyway in the next window. The tool will run and provide you with a list of the file’s metadata in a CMD window.
After this, the warning window will not appear, and the tool will run perfectly to give you information about your media files. Now to edit the metadata, follow the below-mentioned steps according to the operation you wish to perform.
1. Install the “Metadata removal” option
- Open the folder where you extracted ExifTool and copy the executable file.
- In the same folder, paste the file to create its copy.
- Now right-click the copied file and select the Rename option to edit its name. Set the new name to ExifTool(-all=).exe
- Make a desktop shortcut just like before.
- Then make a new folder on the Desktop with a name like “Remove EXIF.”
- Drag the new shortcut [ExifTool(-all=).exe] into this folder.
- Finally, you can drag the thumbnail of the photo over to the ExifTool.
Now you can read and edit the metadata of any media file on your system.
2. List Metadata tags and groups
One of the easiest tasks to do with the ExifTool is listing tags and tag groups. ExifTool supports nearly 23,000 tags, and that’s why navigating them is a skill in itself.
To check all the tags that ExifTool understands, you have to run it with the list parameter. This parameter will show every tag which can be interpreted when reading a file’s metadata.
3. Filter tag listings
Running the command “Exiftool list” produces a lot of output, often even more than you need. So to narrow down the range, you can add a letter to the list parameter as shown below in the table.
By changing the list parameter, you can filter the list of tags and groups that ExifTool supports for reading and writing a file.
4. Including and excluding specific tags
By default, ExifTool shows you all of the tags it can understand from a file. Generally, you don’t need to see all the tags but only look for certain ones. You can specify certain tags or even exclude them using – and –.
For showing a specific tag, use – followed by the tag name as shown below:
ExifTool -FileName .\TestPic.jpg
Alternatively, if you want to exclude a specific tag from being displayed, you can use — before the tag name as shown below:
ExifTool –FileName .\TestPic.jpg
The first command using -Filename will only show the filename; however, the second command using –Filename will show everything except the filename.
5. Changing Metadata tags
If you want to modify the metadata set to a file, you can easily do that using the ExifTool by changing tags.
Whenever you modify or delete a tag, ExifTool creates a copy of the original file and a new tag with that value. It creates a new file with the same name, and the name of the original file is appended with _original.
Here’s an example of changing metadata on photos.
If you want to see the FileName tag on TestPic.jpg, the ExifTool command would be:
ExifTool -FileName TestPic.jpg
To change the FileName tag to NewTestPic.jpg, the command would be:
ExifTool -FileName=NewTestPic.jpg TestPic.jpg
The format of <tag name=<new value> is the same for any writable tag. You can check the ExifTool documentation on its website for a list of writable tags that you can change in a file’s metadata.
Also, you can reverse any changes made to the Meta tags by deleting the copied file created by ExifTool and removing _the original from the original one. You can also apply the built-in -restore_original flag to revert a change, or -delete_original if you are done with the changes and are satisfied with the new metadata.
These are some basic functions you can perform with the ExifTool while reading and writing file metadata. In addition, you can perform other tasks using this tool, such as removing metadata tags, overwriting existing tags, copying files from one tag to another, adding metadata tags, and much more. And, this is how you can fix photo and video Metadata using ExifTool.
What happens if you accidentally corrupt a media file while editing metadata?
When trying to Fix photo and video Metadata using ExifTool, you can accidentally cause corruption of the media file. Yes, sometimes a few necessary sections of metadata changes unintentionally, which can damage the original file’s format. In such a case, your file will become corrupted, and you will not be able to open it.
You can use a photo repair tool to fix the damaged sections of the file. There are multiple applications available online that can help you repair corrupted photos, but we recommend Stellar Repair for Photo as the best option for this. This software can repair photos shot with any kind of camera and saved on any digital storage device. It supports all Mac & Windows HDDs, SSDs, USB flash drives, SD cards, memory sticks, and other storage devices used in cameras, drones, CCTV, Android phones, etc.
Here are the steps to repair corrupted photos with Stellar Repair for Photo:
- Download the software from its official website and launch it on your PC.
- Click on the Add File option in the center of the screen and browse to add all the files you wish to repair.
- After selecting the files, click Repair to start the repair process. You will need to wait until the process is completed.
- Once your files are repaired, you can preview them and save them to the desired location on your PC.
To wrap it up
Hope this article was able to help you understand ExifTool and Fix photo and video Metadata using ExifTool. EfixTool is a powerful application to edit the metadata of your files, especially the images and videos. You can also explore this tool’s other features by visiting an active user forum of its website where Phil Harvey himself regularly answers questions.
Q. What does the ExifTool do?
Ans. Exiftool is an open-source application used for reading and writing the image, audio, video, and document metadata.
Q. What is metadata?
Ans. Metadata is the collection of information about a file, such as creation date and time, file size, location, device, etc.
Q. Can we also extract metadata with ExifTool?
Ans. Yes, we can save the content to a text document or CSV using a command line.
Best Selling Products
Stellar Data Recovery Professional for Windows
Stellar Data Recovery has the right Windows Recovery tool for all your data recoveryRead More
Stellar Data Recovery Professional for Mac
Stellar Data Recovery for Mac program performs safe..
Stellar Photo Recovery
A comprehensive photo recovery software to restore photos, music & video files
Stellar Repair for Video
Powerful video repair tool for repairing corrupt or damaged MOV and other video files