News:

If this site goes down it is because of the crappy DreamHost web hosting: They will disable your "unlimited traffic" web server if a single bot hammers the site with a moderate load.  If necessary, an alternate ExifTool forum page is available at https://sourceforge.net/p/exiftool/discussion/

Main Menu

Recent posts

#1
Hello, 

This is probably something simple I am missing, but I am at a loss currently. 

I have a command that works when run from the command line directly -
"C:\Program Files\Hugin\bin\exiftool" "-filename<CreateDate" -d %Y%m%d_%H%M%S%%-c.pano.%%le DJI_0025.JPG -a
But when placed in this bat file, it fails -
REM Rename the output to the date it was captured to help clarify the filename.
"C:\Program Files\Hugin\bin\exiftool" "-filename<CreateDate" -d %Y%m%d_%H%M%S%%-c.pano.%%le DJI_0025.JPG -a
REM This does not work for some reason?
Pause

Here is what happens on the command line -
D:\Photo Location Testing\Rename Test>renameTest2.bat

D:\Photo Location Testing\Rename Test>REM Rename the output to the date it was captured to help clarify the filename.

D:\Photo Location Testing\Rename Test>"C:\Program Files\Hugin\bin\exiftool" "-filename<CreateDate" -d mHS%-c.pano.%le DJI_0025.JPG -a -m
Warning: New file name is empty - DJI_0025.JPG
    0 image files updated
    1 image files unchanged

D:\Photo Location Testing\Rename Test>REM This does not work for some reason?

D:\Photo Location Testing\Rename Test>Pause
Press any key to continue . . .

D:\Photo Location Testing\Rename Test>"C:\Program Files\Hugin\bin\exiftool" "-filename<CreateDate" -d %Y%m%d_%H%M%S%%-c.pano.%%le DJI_0025.JPG -a
Warning: [minor] Possibly incorrect maker notes offsets (fix by 1783?) - DJI_0025.JPG
Warning: [minor] Suspicious MakerNotes offset for tag 0x0025 - DJI_0025.JPG
    1 image files updated

The bat file also fails when run as admin.

I found an old post related to a similar error where Maker Notes Errors were mentioned, but this does not seem to apply to my case. 

Any pointers for me to look into?

Thank you!

#2
I believe I have stumbled upon (a) solution:

Although what I'm doing is somewhat specific to Swift, the end result seemed to be to use -if $SomeTag -SomeOtherTag<${SomeTag} (... then add my additional text)
#3
Developers / EXIFTOOL for Android, iOS and ...
Last post by nonlin - Today at 03:43:26 PM
Hello,

I'll start off by stating my main goal as to avoid an XY problem from brewing.

My goal is to insert custom metadata at specific timestamps for an MP4 file.
I've already implemented a sidecar solution but doing research to see if I can get all done with just an mp4 file.

This would entail being able to read/write this metadata per timestamp to an MP4 which led me to EXIFTOOL (ET).

I did manage a test with ET in which I made a custom XMP file, saved it to an MP4 and had EXIFTOOL read it back. This should be enough to get me by the issue is I need at the very least C++ access to EXIFTOOL and the ability to distribute the tool packaged in our apps/plugins (which may open another can of worms) on Windows, Android and iOS.

In general if this community knows of solutions to the problem that I'm seeking that are open source I'm all ears/eyes.

I'll be continue my research but thought I'd make a beacon to see if folks long committed to tasks like this before me can get me up to speed. 
#4
I'm trying to figure out how (or even if it's possible) to take the contents of a tag – ImageSize, for example – and prefix that with some other string characters.

Essentially I'm trying to use the a file's tag value as a variable, adding additional text to it, then putting the results into some other tag... all in one line.

Is that possible?

Thanks
#5
Metadata / Re: Exposure Value calculation
Last post by blue-j - Today at 01:12:40 PM
#6
Metadata / Re: Exposure Value calculation
Last post by blue-j - Today at 12:54:06 PM
EV = log2(F Number^2/Shutter Speed)

LV = 2 x log2(F Number) - log2(Shutter Speed) - log2(ISO / 100)

EV is a common metric now for people I think?  I was thinking of presenting both.

It seems EV is also normalized to a 100 ISO.

I am no expert (I'll probably say this for the rest of my life)!  I don't claim to understand this distinction in practical terms.

- J
#7
Metadata / Re: Cannot strip GPS EXIF data...
Last post by Alastair Gordon - Today at 12:22:48 PM
Many thanks, Phil and StarGeek. I certainly appreciate your timely responses. Just to be clear, the ONLY type of image files I am dealing with are .jpg. I guess that means that I am not dealing with a .XMP sidecar file, is that correct?

Also, when I use the following eval in my PHP code for a different part of the website, I capture all the EXIF data from the same .jpg files and everything works perfectly:

eval('$exif=' . `exiftool -php $origFile`);

But in the following code, I am attempting to strip GPS/location data and overwrite the original .jpg file (fear not, I have a backup):

eval(`exiftool -gps:all= -overwrite_original $origJPG`);
eval(`exiftool -location:all= -overwrite_original $origJPG`);

where $origJPG is the full path to the file, starting with https://domain.com/. It also doesn't work if the path is within the same directory (htdocs) as the PHP code with the eval statements.

The problem is that the original file is never overwritten and no new files appear following execution of either (or both) of these eval commands. I know I am doing something wrong, either in the eval statements or in the surrounding PHP script. But I am baffled!

#8
Metadata / Re: Cannot strip GPS EXIF data...
Last post by StarGeek - Today at 11:18:30 AM
Quote from: Alastair Gordon on Today at 09:03:58 AMThanks, StarGeek, but I still do not know the code I need to simply strip the gps data and then write the modified content, either to the same jpg file, or to another file.

Sorry for not clairfying.  The command you listed would be the correct command for removing the EXIF GPS tags

Example:
C:\>exiftool -G1 -a -s -gps* y:\!temp\Test4.jpg
[GPS]          GPSVersionID                    : 2.3.0.0
[GPS]          GPSLatitudeRef                  : North
[GPS]          GPSLatitude                    : 40 deg 41' 21.12"
[GPS]          GPSLongitudeRef                : West
[GPS]          GPSLongitude                    : 74 deg 2' 40.20"
[Composite]    GPSLatitude                    : 40 deg 41' 21.12" N
[Composite]    GPSLongitude                    : 74 deg 2' 40.20" W
[Composite]    GPSPosition                    : 40 deg 41' 21.12" N, 74 deg 2' 40.20" W

C:\>exiftool -P -overwrite_original -gps:all= y:\!temp\Test4.jpg
    1 image files updated

C:\>exiftool -G1 -a -s -gps* y:\!temp\Test4.jpg

C:\>

Phil's example is more complete.  But neither of these will edit data in a XMP sidecar file unless you explicitly name that file, i.e.  use exiftool -location:all= file.NEF will not edit the file.XMP sidecar, which would be the most likely location in the case of RAW file types.

All of these commands create backup files.  Add the -overwrite_original option to suppress this.

If you want to leave the original file alone and create a new copy with the edited information, see the -o (-out) option.
#9
ExifTool GUI / Re: Delete Comment Tag in File
Last post by Phil Harvey - Today at 10:30:05 AM
I'm sure there is a way.  Maybe try entering "-comment=" in the ExifTool Direct box, then applying this to all files in a folder.

- Phil
#10
ExifTool GUI / Delete Comment Tag in File
Last post by Blueart - Today at 10:25:42 AM
Hello,
i'm newbie and use ExifToolGUI.
I use a software that inserts the TAG "Comment" on the photos.
Is it possible to delete this "Comment" in batch on all the photos in the folder?
Thanks
Fabio