Author Topic: File remains unchanged after writing to tag.  (Read 4964 times)

jkohut

  • Newbie
  • *
  • Posts: 4
File remains unchanged after writing to tag.
« on: November 25, 2013, 01:30:15 PM »
Hello,
I'm very new to exiftool and was looking to add a few tag values to pdf files but it seems the file never is updated using exiftool. 

The pdf file does not have a Copyright value when I output the tags to the console, however the following code always results in the file being unchanged.

Code: [Select]
exiftool -Copyright="Notice: This material may be protected by copyright law (U.S. Code Title 17)" sn83016829-1911-05-06-01-00-0008.pdf
    0 image files updated
    1 image files unchanged

As far as I can tell Copyright is a valid tag with no value, what am I missing to update the file with this tag and value?

Thanks,
Jay

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16878
    • ExifTool Home Page
Re: File remains unchanged after writing to tag.
« Reply #1 on: November 25, 2013, 02:06:16 PM »
Hi Jay,

You have the correct command.  This should work.  Two questions:

1) what exiftool version is this?

2) what is the console output if you add -v2 to this command?

Also, I think you should be writing XMP:Rights instead of Copyright, but that doesn't explain the problem.

Better yet, if you could email me the PDF and the exact command you are using, then I can try to reproduce the problem. (philharvey66 at gmail.com)

- 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 ($).

jkohut

  • Newbie
  • *
  • Posts: 4
Re: File remains unchanged after writing to tag.
« Reply #2 on: November 25, 2013, 02:27:51 PM »
Hi Phil,
1) The version I am running on Unbuntu linux is:
exiftool -ver
7.89 [Warning: Library version is 9.27]


2) Adding the -v2 option to the end of the command produces,
exiftool -Copyright="Notice: This material may be protected by copyright law (U.S. Code Title 17)" -v2 sn83016829-1911-05-06-01-00-0008.pdf
Writing MIE-Doc:Copyright
Writing PNG:Copyright
Writing Ducky:Copyright if tag exists
Writing PostScript:Copyright
Writing Pentax:Copyright if tag exists
Writing XMP-xmpDM:Copyright if tag exists
Writing XMP-tiff:Copyright if tag exists
Writing XMP-pur:Copyright if tag exists
Writing XMP-prism:Copyright if tag exists
Writing XMP-pdf:Copyright if tag exists
Writing IFD0:Copyright
======== sn83016829-1911-05-06-01-00-0008.pdf
Rewriting sn83016829-1911-05-06-01-00-0008.pdf...
  Rewriting XMP
Nothing changed in sn83016829-1911-05-06-01-00-0008.pdf
    0 image files updated
    1 image files unchanged


I should be able to email you the file and the command.  I very much appreciate the help.

Thanks,
Jay

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16878
    • ExifTool Home Page
Re: File remains unchanged after writing to tag.
« Reply #3 on: November 25, 2013, 02:42:09 PM »
Wow, that's a wicked version sheer.  I suggest that you update both the libraries and the application to the same (recent) version.

I'm sort of surprised that it doesn't barf badly running a 4-year-old application with a newer set of libraries.  I guess that is a testament to the stability of the API.

- 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 ($).

jkohut

  • Newbie
  • *
  • Posts: 4
Re: File remains unchanged after writing to tag.
« Reply #4 on: November 25, 2013, 02:49:50 PM »
Hi Phil,
I upgraded the version to the latest and it still seems to have trouble actually updating the file. 

Below is the output of a version check followed by the attempt to update the Copyright tab.

emu-ucoi@duck[67] exiftool -ver
9.27
emu-ucoi@duck[68]  exiftool -Copyright="Notice: This material may be protected by copyright law (U.S. Code Title 17)" -v2 sn83016829-1911-05-06-01-00-0008.pdf
Writing MIE-Doc:Copyright
Writing PNG:Copyright
Writing Ducky:Copyright if tag exists
Writing PostScript:Copyright
Writing Pentax:Copyright if tag exists
Writing XMP-xmpDM:Copyright if tag exists
Writing XMP-tiff:Copyright if tag exists
Writing XMP-pur:Copyright if tag exists
Writing XMP-prism:Copyright if tag exists
Writing XMP-pdf:Copyright if tag exists
Writing IFD0:Copyright
======== sn83016829-1911-05-06-01-00-0008.pdf
Rewriting sn83016829-1911-05-06-01-00-0008.pdf...
  Rewriting XMP
Nothing changed in sn83016829-1911-05-06-01-00-0008.pdf
    0 image files updated
    1 image files unchanged


Thanks,
Jay

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16878
    • ExifTool Home Page
Re: File remains unchanged after writing to tag.
« Reply #5 on: November 25, 2013, 03:26:35 PM »
Hi Jay,

I got the file, thanks.  Your command should work with version 9.40 or later.  But the version you have now will work if you specify XMP:Copyright instead of just Copyright (or better, as I recommended, XMP:Rights).  Version 9.40 was changed so that XMP is now the default group for PDF files.  Before that, just specifying Copyright would try to write EXIF:Copyright, which results in nothing being written to a PDF file as you observed.

I hope this makes sense.

- 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 ($).

jkohut

  • Newbie
  • *
  • Posts: 4
Re: File remains unchanged after writing to tag.
« Reply #6 on: November 25, 2013, 04:02:25 PM »
Hi Phil,
That worked!  Thank you for your help in this.

-- Jay

frairep

  • Newbie
  • *
  • Posts: 9
Re: File remains unchanged after writing to tag.
« Reply #7 on: July 15, 2020, 04:05:41 AM »
HI Phil!

I'm not sure if it is correct to reopen this topic, but as it is the same problem seems OK.

I browsed the topic and checked the recommendations but still got the problem.

C:\Users\Picassa_OSMC\Documents>exiftool -ver
12.01



C:\Users\Picassa_OSMC\Documents>exiftool -keywords z:\A_imprimir\Familiar_0a\IMG_3409.jpg
Keywords                        : Micaela Fraire


C:\Users\Picassa_OSMC\Documents>exiftool  -keywords= z:\A_imprimir\Familiar_3\IMG_3409.jpg -v2
Deleting PDF:Keywords
Deleting MIE-Doc:Keywords
Deleting PostScript:Keywords
Deleting Keys:Keywords
Deleting XMP-acdsee:Keywords
Deleting XMP-pdf:Keywords
Deleting XMP-xmp:Keywords
Deleting IPTC:Keywords
======== z:/A_imprimir/Familiar_3/IMG_3409.jpg
Rewriting z:/A_imprimir/Familiar_3/IMG_3409.jpg...
  Editing tags in: APP1 APP13 IPTC Keys MIE-Doc PDF Photoshop PostScript XMP
  Creating tags in:
JPEG APP1 (17324 bytes):
JPEG APP1 (6837 bytes):
  Rewriting XMP
    [XMP rewritten with no changes]
JPEG APP2 (3158 bytes):
JPEG APP13 (16598 bytes):
  Rewriting Photoshop
  Rewriting IPTC
JPEG APP14 (12 bytes):
JPEG DQT (130 bytes):
JPEG DRI (2 bytes):
JPEG SOF0:
JPEG DHT (192 bytes):
JPEG SOS
Nothing changed in z:/A_imprimir/Familiar_3/IMG_3409.jpg
    0 image files updated
    1 image files unchanged


And

C:\Users\Picassa_OSMC\Documents>exiftool  -XMP-acdsee:Keywords= z:\A_imprimir\Familiar_3\IMG_3409.jpg -v2
Deleting XMP-acdsee:Keywords
======== z:/A_imprimir/Familiar_3/IMG_3409.jpg
Rewriting z:/A_imprimir/Familiar_3/IMG_3409.jpg...
  Editing tags in: APP1 XMP
  Creating tags in:
JPEG APP1 (17324 bytes):
JPEG APP1 (6837 bytes):
  Rewriting XMP
    [XMP rewritten with no changes]
JPEG APP2 (3158 bytes):
JPEG APP13 (16598 bytes):
JPEG APP14 (12 bytes):
JPEG DQT (130 bytes):
JPEG DRI (2 bytes):
JPEG SOF0:
JPEG DHT (192 bytes):
JPEG SOS
Nothing changed in z:/A_imprimir/Familiar_3/IMG_3409.jpg
    0 image files updated
    1 image files unchanged


C:\Users\Picassa_OSMC\Documents>exiftool -XMP-acdsee:keywords z:\A_imprimir\Familiar_0a\IMG_3409.jpg
Keywords                        : Micaela Fraire


Can you show me the error?

Many thanks!!!

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16878
    • ExifTool Home Page
Re: File remains unchanged after writing to tag.
« Reply #8 on: July 15, 2020, 06:32:36 AM »
Where are the Keywords stored?:

exiftool -G1 -keywords 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

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3948
Re: File remains unchanged after writing to tag.
« Reply #9 on: July 15, 2020, 11:59:36 AM »
The last command specifically requests -XMP-acdsee:keywords, so at least one copy is stored there, though seeing all locations would be helpful, so maybe
exiftool -G1 -a FILE

Also, maybe run a validate to see if there's a structural problem
exiftool -a -s -validate -warning FILE
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

frairep

  • Newbie
  • *
  • Posts: 9
Re: File remains unchanged after writing to tag.
« Reply #10 on: July 15, 2020, 03:41:04 PM »
Here you have the info.


C:\Users\Picassa_OSMC\Documents>exiftool -G1 -keywords  z:\A_imprimir\Familiar_0a\IMG_3409.jpg
[XMP-acdsee]    Keywords                        : Micaela Fraire

C:\Users\Picassa_OSMC\Documents>exiftool -a -s -validate -warning z:\A_imprimir\Familiar_0a\IMG_3409.jpg
Validate                        : 1 Warning (minor)
Warning                         : [minor] Odd offset for IFD0 tag 0x0132 ModifyDate


This should work!


C:\Users\Picassa_OSMC\Documents>exiftool  -XMP-acdsee:Keywords= z:\A_imprimir\Familiar_3\IMG_3409.jpg
    0 image files updated
    1 image files unchanged



But doesn´t   :(


frairep

  • Newbie
  • *
  • Posts: 9
Re: File remains unchanged after writing to tag.
« Reply #11 on: July 15, 2020, 03:44:55 PM »
I am running exiftool on a win10 machine, but the file is on an raspberry pi 2 with OSMC mounted via SAMBA.

Just in case it is relevant.

Regards!!

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16878
    • ExifTool Home Page
Re: File remains unchanged after writing to tag.
« Reply #12 on: July 15, 2020, 03:46:50 PM »
OK.  We will need a file for testing to be able to determine what is going on.  Can you attach it to a post here?

- 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 ($).

frairep

  • Newbie
  • *
  • Posts: 9
Re: File remains unchanged after writing to tag.
« Reply #13 on: July 15, 2020, 05:57:18 PM »
Sure!

Here you have the example picture I`ve been trying to modify.

By the way, after my lastest post I cheked if was possible to write files in the raspberry mounted disk from the WIN cmd, and was OK.
Just to be sure it wasn´t a permissions problem.

Regards!

frairep

  • Newbie
  • *
  • Posts: 9
Re: File remains unchanged after writing to tag.
« Reply #14 on: July 15, 2020, 06:22:35 PM »
The file is jpeg but fails security check:

Your attachment has failed security checks and cannot be uploaded. Please consult the forum administrator.

frairep

  • Newbie
  • *
  • Posts: 9
Re: File remains unchanged after writing to tag.
« Reply #15 on: July 15, 2020, 06:29:07 PM »
Trying...

Worked

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3948
Re: File remains unchanged after writing to tag.
« Reply #16 on: July 15, 2020, 08:18:52 PM »
I am running exiftool on a win10 machine, but the file is on an raspberry pi 2 with OSMC mounted via SAMBA.

Try moving the file off of the PI and then run the command.  There was no problem here removing the Keywords on my computer.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

frairep

  • Newbie
  • *
  • Posts: 9
Re: File remains unchanged after writing to tag.
« Reply #17 on: July 15, 2020, 08:43:40 PM »
 :'(

F...!

Worked.

I can´t beleive it. Why?

frairep

  • Newbie
  • *
  • Posts: 9
Re: File remains unchanged after writing to tag.
« Reply #18 on: July 15, 2020, 08:49:36 PM »
I´ve been using Picassa to write face regions on XMP section using the same mounting method and worked perfectly.

And manually edited some fields with exiftoolgui!!

Is it related to XMP:acdsee section?

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3948
Re: File remains unchanged after writing to tag.
« Reply #19 on: July 15, 2020, 08:51:00 PM »
Is it related to XMP:acdsee section?

I wouldn't think so.  No idea why there would be a problem on the command line vs the GUI.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

frairep

  • Newbie
  • *
  • Posts: 9
Re: File remains unchanged after writing to tag.
« Reply #20 on: July 16, 2020, 03:49:50 AM »
Look at this!
Today it worked!


C:\Users\Picassa_OSMC\Documents>exiftool  -XMP-acdsee:all z:\A_imprimir\Familiar_0a\IMG_3409.jpg
Categories                      : <Categories><Category Assigned="1">People<Category Assigned="1">Micaela Fraire</Category></Category></Categories>
Keywords                        : Micaela Fraire

C:\Users\Picassa_OSMC\Documents>exiftool  -XMP-acdsee:all= z:\A_imprimir\Familiar_0a\IMG_3409.jpg
    1 image files updated

C:\Users\Picassa_OSMC\Documents>exiftool  -XMP-acdsee:all z:\A_imprimir\Familiar_0a\IMG_3409.jpg

C:\Users\Picassa_OSMC\Documents>exiftool  -XMP-acdsee:all z:\A_imprimir\Familiar_0a\IMG_3410.jpg
Categories                      : <Categories><Category Assigned="1">People<Category Assigned="1">Micaela Fraire</Category></Category></Categories>
Keywords                        : Micaela Fraire

C:\Users\Picassa_OSMC\Documents>exiftool  -XMP-acdsee:keywords= z:\A_imprimir\Familiar_0a\IMG_3410.jpg
    1 image files updated

C:\Users\Picassa_OSMC\Documents>exiftool  -XMP-acdsee:keywords= z:\A_imprimir\Familiar_0a\IMG_3411.jpg
    1 image files updated

C:\Users\Picassa_OSMC\Documents>exiftool  -XMP-acdsee:all= z:\A_imprimir\Familiar_0a\IMG_3410.jpg
    1 image files updated

C:\Users\Picassa_OSMC\Documents>exiftool  -XMP-acdsee:all= z:\A_imprimir\Familiar_0a\IMG_3411.jpg
    1 image files updated


Looks like it was some kind off network problem ???

Nevertheless I got another workaround, a physical movement.
As is an external drive I would switch off the raspberry and mount it directly on the WIN machine (kind of surrender >:( ).

Thanks for your help and sorry for taking your time!