Help Tagging MP4 Metadata from jpg.JSON File

Started by SamoT, June 20, 2024, 09:34:15 AM

Previous topic - Next topic

SamoT

Thank you Phil for creating such a great tool. I've been trying to use ExifTool to tag my MP4 files with specific system dates from a JSON file, but I'm having trouble and could use some guidance.

I need to update the following metadata for my MP4 files using values from a corresponding jpg.JSON file:
* FileModifyDate
* FileAccessDate
* FileInodeChangeDate
* Location

Each MP4 file has an associated JSON file named YYYYmmDD_HHMMSS.jpg.json.

Running the command exiftool -time:all -g1 -a -s example.MP4 returns:

---- System ----
FileModifyDate                  : 1979:12:31 23:00:00+01:00
FileAccessDate                  : 2024:06:20 14:35:10+02:00
FileInodeChangeDate             : 2024:06:20 00:03:05+02:00
---- QuickTime ----
CreateDate                      : 2020:04:06 16:44:28
ModifyDate                      : 2020:04:06 16:44:28
---- Track1 ----
TrackCreateDate                 : 2020:04:06 16:44:28
TrackModifyDate                 : 2020:04:06 16:44:28
MediaCreateDate                 : 2020:04:06 16:44:28
MediaModifyDate                 : 2020:04:06 16:44:28

Could someone please help me understand how to use ExifTool to update the FileModifyDate, FileAccessDate, FileInodeChangeDate and location based on the values from the associated JSON files?

Thanks in advance for your assistance!

StarGeek

You need to first figure out what tag in the JSON file you want to copy from. Run exiftool on the JSON file to list all the tags and look for an appropriate tag
exiftool -G1 -a -s file.json

The command you would use would be something like
exiftool -ext mp4 -TagsFromFile %d%F.json "-VIDTAG1<JSONTAG" "-VIDTAG2<JSONTAG" ... /path/to/files/

Where you would replace the "VIDTAG"s with the tags you want to write to and replace "JSONTAG" with the tag name from the JSON file you want to copy from.

Quote from: SamoT on June 20, 2024, 09:34:15 AMI need to update the following metadata for my MP4 files using values from a corresponding jpg.JSON file:
...
* FileAccessDate
* FileInodeChangeDate

Exiftool can't write either of these and in the case of FileAccessDate, there's no point in writing it. It will be updated every time the file is touched in any way. Even simply viewing the FileAccessDate (without using the -fast option at 3+) changes it.
C:\>exiftool -G1 -a -s -FileAccessDate y:\!temp\Test4.jpg
[System]        FileAccessDate                  : 2024:06:19 17:17:56-07:00

C:\>exiftool -G1 -a -s -FileAccessDate y:\!temp\Test4.jpg
[System]        FileAccessDate                  : 2024:06:20 09:51:48-07:00
* 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).