Delete all metadata except GPS and Date/Time Original for Mapillary.

Started by Damien33, April 01, 2021, 06:03:03 AM

Previous topic - Next topic

Damien33

Hello.

Thanks for this wonderfull tool, really helpful, I would like to contribute to Mapillary, but I wanna remove all metada except GPS and Date/Time Original infos.

I have exiftool.exe into C:\Windows\ but also into C:\Exiftool directory,
all images will be located in /seq01/ inside this /Exiftool/ directory.

C:\Exift> exiftool -a seq01/*.jpg to read/view all metadata from all .jpg in /seq01/

But the moment I want to remove all metadata except GPS and Date/Time Original infos I can't make it work.

Here is what I already tried:
exiftool -all= -tagsfromfile @ -exif:gps seq01/*.jpg  which isn't working obviously, and I don't know how to keep the Date/Time Original as well,

Please could you help me out ?

Thanks.


Phil Harvey

Quote from: Damien33 on April 01, 2021, 06:03:03 AM
Here is what I already tried:
exiftool -all= -tagsfromfile @ -exif:gps seq01/*.jpg  which isn't working obviously, and I don't know how to keep the Date/Time Original as well,

Close.  Try this:

exiftool -all= -tagsfromfile @ -gps:all -alldates -ext jpg seq01

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).


Hans-Martin

I want to keep IPTC data but want to delete all EXIF except Date Time Original. What should I command?

Phil Harvey

You could try this:

exiftool -exif:all= -tagsfromfile @ -datetimeoriginal FILE

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Hans-Martin

Thanks a ton for your quick reply Phil. It worked to some extend. In some images there is still the serial number of the camera left.
Also I would like to get rid off of the metadata fields that are being used by Fotostation such as Document History . I thought this would also be exif data? 

Hans-Martin


Phil Harvey

Use this command to see the general location of the metadata:

exiftool -a -G FILE

It looks like it is in more than just EXIF.

You can delete entire metadata groups or individual tags that you want to remove.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Hans-Martin

On top it says:  IPTCDigest is not current. XMP may be out of sync
What does this mean?

So Document History is located in the IPTC group. Also in the XMP group there is History. Both need to go away. How do I address them? Just by adding -tag history - tag document history? Or do I neeed to address the group too?

There is also technical data from the camera within the XMP group - I thought this was just Exif data? I wanna get rid of this too. Does this mean I have to address this tags individually instad of deleting the whole XMP group then because I want to keep relevant XMP tags?
The GPS is also stored in the XMP group.

Another point I noticed: ExifTool shows only the first three letters in the IPTC category tag while in frontend applications like PhotoMechanic, Fotostation and photoshop show the whole sentence. This is very frustrating.

 

Phil Harvey

Quote from: Hans-Martin on November 10, 2022, 12:04:40 PMOn top it says:  IPTCDigest is not current. XMP may be out of sync

See the notes for the IPTCDigest tag in the Photoshop tags documentation.

QuoteSo Document History is located in the IPTC group. Also in the XMP group there is History. Both need to go away. How do I address them?

exiftool -documenthistory= -history= FILE

QuoteThere is also technical data from the camera within the XMP group - I thought this was just Exif data? I wanna get rid of this too. Does this mean I have to address this tags individually instad of deleting the whole XMP group then because I want to keep relevant XMP tags?

OK, we're getting more particular here.  Use -G1 instead of -G in your command to see the specific XMP groups.  Also, you may want to add -s to see the tag names instead of descriptions.  I suspect you may get away with also deleting XMP-tiff and XMP-exif groups, like this:

exiftool -documenthistory= -history= -xmp-tiff:all= -xmp-exif:all= FILE

QuoteAnother point I noticed: ExifTool shows only the first three letters in the IPTC category tag while in frontend applications like PhotoMechanic, Fotostation and photoshop show the whole sentence.

IPTC:Category is just 3 characters.  XMP:Category is any string.  I think the other apps are probably showing the latter, which of course ExifTool can also display.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Hans-Martin

Quote from: Phil Harvey on November 10, 2022, 01:07:01 PM
QuoteAnother point I noticed: ExifTool shows only the first three letters in the IPTC category tag while in frontend applications like PhotoMechanic, Fotostation and photoshop show the whole sentence.

IPTC:Category is just 3 characters.  XMP:Category is any string.  I think the other apps are probably showing the latter, which of course ExifTool can also display.

- Phil

Well, I am getting inconsistent results here. I batch process a bunch of images with four words into the Category field using PhotoMechanic and Fotostation. When reading these images with Exiftool some show all four words and some only the first three letters. How can I make sure to get the four words visible in all the files?

Thanks so much for the other input. I will look into that later. 

Phil Harvey

Which Category tag are you looking at?  Use this command to see them all:

exiftool -a -G FILE

You can extract either specifically, with

exiftool -xmp:category FILE

or

exiftool -iptc:category FILE

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

Quote from: Phil Harvey on November 10, 2022, 01:07:01 PMexiftool -documenthistory= -history= -xmp-tiff:all= -xmp-exif:all= FILE

When it comes to the XMP history tags, I find that using -XMP-xmpMM= is a good option.  None of the tags in that group except PreservedFileName have much use outside of a DAM.  And those tags can quickly get very large.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Hans-Martin

Quote from: StarGeek on November 10, 2022, 06:33:56 PM
Quote from: Phil Harvey on November 10, 2022, 01:07:01 PMexiftool -documenthistory= -history= -xmp-tiff:all= -xmp-exif:all= FILE

When it comes to the XMP history tags, I find that using -XMP-xmpMM= is a good option.  None of the tags in that group except PreservedFileName have much use outside of a DAM.  And those tags can quickly get very large.

Unfortunately I can't get -XMP -xmpMM to work.

What I'm trying to achieve is to get rid of all camera data inluding GPS and keep "datetimeoriginal". Plus the XMP history data needs to vanish too due to data protection reasons, since there are user names in there.
I use exiftool -exif:all= -tagsfromfile @ -datetimeoriginal FILE which does not delete the XMP camera data. So I tried -xmp -exif:all which does nothing. How shall I proceed?

Hans-Martin

So I tried this: -xmp:documenthistory= "FILE"

and got this: Warning: Sorry, xmp:DocumentHistory doesn't exist or isn't writable. Nothing to do.

So is Document History  indeed a not writeable tag? Or is my approach wrong?

Phil Harvey

...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).