Main Menu

Recent posts

#1
Newbies / Re: -all= argument doesn't rem...
Last post by StarGeek - Today at 10:19:01 AM
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/
#2
DOFS: First uint32 is a version.

Version 2 uses fixed-length values. I assume that, if you know the structure, then you know the purpose of each field. Having said that, I've worked out where the null-terminated strings are located: 0x10, 0x9c, 0x11c, 0x1a4, 0x1c4, 0x1e4, 0x224, 0x424, 0x78a. Most of these appear to be driver build versions, but I haven't worked out the purposes.

Version 3 uses a saner format. First comes the header:
  • uint32: version = 3
  • uint32: unknown, zero
  • uint32: length of DOFS
  • uint16: number of records

Then it loops over the records. Each record contains:
  • uint8: type (this is important for processing the value)
  • uint8: field name length (flen)
  • flen bytes: field name
  • uint16: value length (vlen)
  • vlen bytes: data, format is based on the type

The types for the data:
  • 0x0b: String (Usually null terminated, but not always. Do not assume null-terminated; vlen bytes)
  • 0x05: uint32 (vlen should be 4)
  • 0x09: float (vlen should be 4 bytes)
I have not seen any other types.
#3
The "exiftool" Application / Re: -directory AND -r
Last post by StarGeek - Today at 10:07:51 AM
As long as you are using the dot for the current directory, and you want to recreate the directory tree, add the %d variable to the end of your directory path

-directory=_untagged/%d

Short example using Testname
Y:\!temp\x>exiftool -r -ext jpg -Testname=_untagged/%d .
'./y/002.JPG' --> '_untagged/./y/002.JPG'
'./y/003.JPG' --> '_untagged/./y/003.JPG'
'./y/004.JPG' --> '_untagged/./y/004.JPG'
'./y/005.JPG' --> '_untagged/./y/005.JPG'
'./y/006.JPG' --> '_untagged/./y/006.JPG'
'./y/007.JPG' --> '_untagged/./y/007.JPG'

Here, files in directory ./y/ are moved to _untagged/./y/.  Since the dot stands for that current directory, _untagged/. is basically the same as _untagged/, so the final result will be _untagged/y/

If you used a full file path, for example if I tried to use
exiftool -r -ext jpg -Testname=_untagged Y:\!temp\x
I would have had to modify the %d to remove the top three directories (see the Advanced features part of the -w (-TextOut) option)
exiftool -r -ext jpg -Testname=_untagged/%:3d Y:\!temp\x

Example
C:\>exiftool -r -ext jpg -Testname=_untagged/%:3d Y:\!temp\x
'Y:/!temp/x/y/002.JPG' --> '_untagged/y/002.JPG'
'Y:/!temp/x/y/003.JPG' --> '_untagged/y/003.JPG'
'Y:/!temp/x/y/004.JPG' --> '_untagged/y/004.JPG'
'Y:/!temp/x/y/005.JPG' --> '_untagged/y/005.JPG'
'Y:/!temp/x/y/006.JPG' --> '_untagged/y/006.JPG'
'Y:/!temp/x/y/007.JPG' --> '_untagged/y/007.JPG'
#4
Newbies / -all= argument doesn't remove ...
Last post by Brendan - Today at 06:59:00 AM
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
#5
The "exiftool" Application / -directory AND -r
Last post by audiogalaxy - Today at 05:42:10 AM
Hallo I've tried this:

exiftool -if 'not ($Album and $Title and $Artist)' -directory=_untagged -r -ext mp3 -ext flac .
and if it works perfectly well when run ONLY in a folder with mp3 and flac without subdirectories (no recursion) , when it has to act in the subdirectories it creates the "collection" (_untagged) directory only in the root, making a mess, while I expected (but it's my problem, I guess) that the directory would be created at the point in the recursion where the file whose detection occurs is located.

Is there a need for some change in how something works ... or have you some suggestions on how can I make it work? :)
I mean... without using batch script and another recursion with no "-r".
#6
The "exiftool" Application / Re: trying to change original ...
Last post by StarGeek - June 02, 2024, 07:47:58 PM
Where is the problem?  Is exiftool returning an error?  Are you checking for change with exiftool or are you using some other program to look at the data?

Canon CR3 files are tricky, as they are based upon the MP4 format instead of the TIFF format like CR2 files. This means that some of the time stamps are saved as UTC. So if you are in a different time zone than where the image was taken, there might be a difference, depending upon the program.

Use this command to look at all the time stamps in the file
exiftool -time:all -G1 -a -s file.cr3
#7
The "exiftool" Application / trying to change original time...
Last post by cheendwa - June 02, 2024, 07:26:02 PM
I've tried to follow recommendations in other threads to change the original time to 6 hours earlier (forgot to change time zone setting).

I created a folder c:\tocorrect and created a batch file with the single instruction:

exiftool -DateTimeOriginal-="0:0:0 6:0:0"c:\tocorrect1

Am I missing something?
#8
The "exiftool" Application / Re: Change Lens Model
Last post by JorgeNelson.S - June 02, 2024, 07:17:34 PM
It worked perfectly, thank you very, very much.
#9
Newbies / Rename MP4 files based on shif...
Last post by John Derbyshire - June 02, 2024, 07:08:45 PM
Hi all, I'm trying to rename a folder full of MP4 files to reflect FileModifyDate but with the date/time shifted back 6 hours to reflect the different time zone at the time the footage was taken.

I know I can use the following to set the filenames based on the current value of FileModifyDate:

   exiftool '-FileName<FileModifyDate' -d '%y%m%d %H%M%S%%-c.%%e' .
   
But how do I shift the time, ideally without overwriting the current value of FileModifyDate (so that the rename process is repeatable)?
#10
The "exiftool" Application / Re: Change Lens Model
Last post by StarGeek - June 02, 2024, 07:07:26 PM
Tag names in the -if expression are prefixed by the $ symbol.

C:\>exiftool -G1 -a -s -LensModel y:\!temp\Test4.jpg
[ExifIFD]       LensModel                       : DT 0mm F0 SAM

C:\>exiftool -P -overwrite_original -if "$exif:lensmodel eq 'DT 0mm F0 SAM'" -exif:lensmodel="Canon EF 8-15mm f/4L FISHEYE USM" y:\!temp\Test4.jpg
    1 image files updated

C:\>exiftool -G1 -a -s -LensModel y:\!temp\Test4.jpg
[ExifIFD]       LensModel                       : Canon EF 8-15mm f/4L FISHEYE USM