-all= argument doesn't remove some QuickTime tags from video; how to remove all

Started by Brendan, June 03, 2024, 06:59:00 AM

Previous topic - Next topic

Brendan

Hi, posting in here in case I missed something about this while searching. As background, I am having trouble migrating from Google Photos to OneDrive where OneDrive does not correctly identify the date taken for some video files and lists them under the date of upload.

During my troubleshooting, I discovered the -all= argument doesn't strip the Quicktime:CreateDate tag from video files. I had assumed it would based on this thread (not sure if I should have put my question in there). The QT CreateDate tag corresponds to the "Media Created" field in Windows explorer, which ironically Windows has no trouble reading for any of my video files, unlike OneDrive.

I found a complicated (for me) fix to the solution here on MS answers. My read of this is that there might still be some residual metadata (or trailing data, though I have also used the -trailer= argument without success) that is causing this.

Until MS can make OneDrive's file handling capabilities at least equal to that of explorer (unlikely given that complaints about this very issue can be found going back years), I could really do with having a fix to this that I can automate with exiftool. Does anyone have any suggestions? Are there any other commands I can use to bulk remove all data, including the QuickTime stuff to make sure everything is gone?

Thanks for any help you can offer.
B

StarGeek

Using -All= deletes tags.  The problem is, most of the time stamps in video files cannot be deleted, they can only be blanked. The result is that in addition to -All=, you have to explicitly set them to nothing.

Try this to delete all deletable data and set all the time stamps to 0000:00:00 00:00:00
exiftool -All= -Time:All= /path/to/files/
* 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).

Brendan

Hi StarGeek,

Thank you for your reply, really appreciate it. The argument you provided did indeed successfully wipe the "Media Created" date from the video file and presumably any other similar timestamps. (I did not know those were considered timestamps and not tags, so good to know!)

Unfortunately it did not fix the issue and OneDrive still will not recognize the media creation date of the affected video files. I will wait to see if anyone else has any suggestions.

Thanks again,
B

StarGeek

Quote from: Brendan on June 03, 2024, 01:53:04 PM(I did not know those were considered timestamps and not tags, so good to know!)

They are tags.  I'm using time stamp in a generic way to cover any date/time tag. 
* 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).

Phil Harvey

Quote from: StarGeek on June 03, 2024, 10:19:01 AMTry this to delete all deletable data and set all the time stamps to 0000:00:00 00:00:00
exiftool -All= -Time:All= /path/to/files/

Smart.  I wouldn't have thought of this.  It works because this is a family 2 group so the tags are deleted individually, which causes the non-deletable tags to be blanked:

            4) Specifying "-GROUP:all=" deletes the entire group as a block
            only if a single family 0 or 1 group is specified.  Otherwise all
            deletable tags in the specified group(s) are removed individually


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

StarGeek

* 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).

Phil Harvey

Quote from: StarGeek on June 07, 2024, 11:26:51 AMI'm pretty sure I either got that from you or @wywh.

It could have been me, but this information wasn't preserved in my memory banks. ;)

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

Brendan

StarGeek,

Thanks for clarifying RE:tags and timestamps

Phil,
Thank you for chiming in. I did try running the "-GROUP:all=" argument on one of the affected files, but the result is "Warning: Not a deletable group: GROUP. Nothing to do." (I'm not sure if you were trying to suggest I do something with that, so just gave it a go.)


This post describes a process for generating a new file with no metadata, with the video/audio stream as-is, then using ExifTool to add the metadata back. Would this be fundamentally different to using "exiftool -All= -Time:All="? If yes, is there a way to achieve a similar level of deletion of metadata with ExifTool? Would appreciate anyone who could provide their thoughts there.

Thanks again,
Brendan

Phil Harvey

-Time:All is an example of the -GROUP:All syntax with the "Time" group.  The capital "GROUP" is meant to be any valid group name, like the family 2 group name "Time".

In MP4 videos, ExifTool will only delete metadata in the Keys, UserData and ItemList family 1 groups.

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

Brendan

Thank you very much, I think I understand the situation and possible causes better now. I will try to find a tool that can completely strip mp4 metadata and use ExifTool to add back what I need and see if that does it.

StarGeek

Quote from: Brendan on June 08, 2024, 11:24:10 AMThank you for chiming in. I did try running the "-GROUP:all=" argument on one of the affected files, but the result is "Warning: Not a deletable group: GROUP. Nothing to do."

You can find all the group names under the GetAllGroups function or exiftool will output the names with the -listg option.

QuoteThis post describes a process for generating a new file with no metadata, with the video/audio stream as-is, then using ExifTool to add the metadata back. Would this be fundamentally different to using "exiftool -All= -Time:All="?

There are tags that exiftool cannot remove from video files. For example, EXIF data and GPS tracks* are non-standard in video files and exiftool can't remove them or copy them. Most tags that are part of the streams can't be removed with exiftool.

Since ffmpeg is the open source gold standard for videos, it can be used to strip away all metadata better than exiftool. This is my version of the basic ffmpeg command to do so, which is similar but shorter than the one on your linked page. It is also a lossless operation, i.e. it does not re-encode the file.
ffmpeg -i input.mp4 -c copy -map 0 output.mp4

This command is also better in cases where there might be more than one stream of the same type. For example, if there are two audio streams, one in English and one in French, this command will copy both audio streams, whereas I think the one in your link will only copy the first stream of each type.

It can also be used change the format of a file, as long as the stream type is allowed in the destination container.  For example, to convert from MP4 to MKV, you would change change the output extension
ffmpeg -i input.mp4 -c copy -map 0 output.mkv

An alternative that I also use that has a GUI is AVIDemux. I have an example in this post that shows how I losslessly converted an AVI into an MP4. AVIDemux does not save any metadata when it writes a file.
* 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).