ModifyDate tag not able to be updated in Sony ARW file (Sony RX10 IV and others)

Started by elm, June 25, 2018, 02:03:43 PM

Previous topic - Next topic

elm

1. Operating System: Mac OS Sierra 10.12.3
2. Exiftool version: 11.03 (newest as of writing)
3. command: "exiftool -ModifyDate-=48 DIR", or any other suitable value, on Sony ARW file(s) from the Sony RX10 IV.
4. in terminal:
exiftool -DateTimeOriginal-=48 -CreateDate-=48 -FileModifyDate-=48 -ModifyDate-=48 -SonyDateTime-=48 /ELM/Delt
Warning: [minor] Entries in SubIFD were out of sequence. Fixed. - /ELM/Delt/2.ARW
Warning: [minor] Entries in SubIFD were out of sequence. Fixed. - /ELM/Delt/3.ARW
Warning: [minor] Entries in SubIFD were out of sequence. Fixed. - /ELM/Delt/4.ARW
    1 directories scanned
    6 image files updated


===
Now using exiftool and looking at the metadata, all values are shifted as expected, except that in the ARW files, the "ModifyDate" tag has not been updated (the JPG files gets edited as intended).
A short excerpt from "exiftool -s -G 4.ARW":
[EXIF]          ExifVersion                     : 0231
[EXIF]          DateTimeOriginal                : 2018:05:06 15:08:29
[EXIF]          CreateDate                      : 2018:05:06 15:08:29
[EXIF]          OffsetTime                      : -08:00
[EXIF]          OffsetTimeOriginal              : -08:00
[EXIF]          OffsetTimeDigitized             : -08:00
[EXIF]          ComponentsConfiguration         : Y, Cb, Cr, -
[EXIF]          CompressedBitsPerPixel          : 8
[EXIF]          BrightnessValue                 : 6.946875
[EXIF]          ExposureCompensation            : 0
[EXIF]          MaxApertureValue                : 4.0
[EXIF]          MeteringMode                    : Multi-segment
[EXIF]          LightSource                     : Unknown
[EXIF]          Flash                           : Off, Did not fire
[EXIF]          FocalLength                     : 62.4 mm
[EXIF]          UserComment                     :
[EXIF]          FlashpixVersion                 : 0100
[EXIF]          ColorSpace                      : sRGB
[EXIF]          ExifImageWidth                  : 5472
[EXIF]          ExifImageHeight                 : 3648
[EXIF]          InteropIndex                    : R98 - DCF basic file (sRGB)
[EXIF]          InteropVersion                  : 0100
[EXIF]          FileSource                      : Digital Camera
[EXIF]          SceneType                       : Directly photographed
[EXIF]          CustomRendered                  : Normal
[EXIF]          ExposureMode                    : Auto
[EXIF]          DigitalZoomRatio                : 1
[EXIF]          FocalLengthIn35mmFormat         : 170 mm
[EXIF]          SceneCaptureType                : Standard
[EXIF]          Contrast                        : Normal
[EXIF]          Saturation                      : Normal
[EXIF]          Sharpness                       : Normal
[EXIF]          LensInfo                        : 8.8-220mm f/2.4-4
[EXIF]          SubfileType                     : Reduced-resolution image
[EXIF]          ImageDescription                :
[EXIF]          Make                            : SONY
[EXIF]          Model                           : DSC-RX10M4
[EXIF]          Software                        : DSC-RX10M4 v1.00
[EXIF]          ModifyDate                      : 2018:05:08 15:08:29


In this ARW file, DateTimeOriginal and CreateDate are shifted as intended, but ModifyDate is not.
In the JPG file ModifyDate shifts as intended though.

I also tested in the windows application Geosetter (which uses exiftool, probably a version from a couple months ago), and doing a date change also left the ARW's ModifyDate tag unchanged while the other date tags changed as intended.


This link (https://www.dpreview.com/sample-galleries/1816870055/sony-cyber-shot-dsc-rx10-mark-iv-samples-gallery/1743087961), is to one of dpreview's sample images from the Sony RX10 IV, with JPG and ARW Raw file download links available for private use/testing.

In this link (https://www.dpreview.com/news/5980899251/sony-rx10-iii-lens-comparison) there are also some download links to pictures from the Sony RX10 III and Sony RX10 II. Checking with the ARW files and running that same command, I see as well that ModifyDate is not being changed correctly, while all the other tags in the command (DateTimeOriginal, CreateDate, FileModifyDate, and SonyDateTime) are being edited as intended.



Guessing it's a bug of sorts (since the exact same command worked on the JPG file for the "ModifyDate" tag, and not the ARW). Hopefully it can be remedied easily and won't be too troublesome.

Thanks for all the work on this project, Exiftool is sincerely awesome!

Cheers,

Elm
Consider the large picture.

StarGeek

Quote from: elm on June 25, 2018, 02:03:43 PM
Guessing it's a bug of sorts (since the exact same command worked on the JPG file for the "ModifyDate" tag, and not the ARW). Hopefully it can be remedied easily and won't be too troublesome.

This would be a bug with the camera firmware.  It seems to be writing an incorrect EXIF block, as shown by the "Warning: [minor] Entries in SubIFD were out of sequence.".  If you run exiftoool -warning -validate FILE, it shows that 5 EXIF tags are out of sequence.

You can fix the EXIF block by running this command from FAQ #20:
exiftool -exif:all= -tagsfromfile @ -exif:all -unsafe -thumbnailimage FileOrDir
As there isn't a problem with the MakerNotes, I removed the -F option.

After doing that, the ModifyDate can be altered correctly.


Minor nitpick, at least one of those "out of camera" images isn't directly out of the camera.  One of the two I downloaded had a HistorySoftwareAgent tag showing it had been processed by "Adobe Photoshop Camera Raw 10.4 (Macintosh)".

Bonus happy surprise, it appears to be writing all three of the newer EXIF timezone tags (OffsetTime, OffsetTimeOriginal, and OffsetTimeDigitized).
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Phil Harvey

Do NOT run StarGeeks command on an ARW file!! -- this is for JPEG files only!

The out-of-sequence SubIFD entries will be fixed automatically.

You need to add -ifd1:modifydate-=48 to also shift this tag.  By default, when you specify -modifydate, ExifTool writes IFD0:Modifydate.  For some unknown reason, Sony also duplicates this in IFD1.

- 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

My mistake.  I'll defer to Phil's expertise in this issue.  I tried to double check if there was any damage to sample images but I don't have any raw processing program on my computer at the moment.  Adobe Bridge showed the images fine but it's quite possible it was only showing the embedded jpeg previews and not processing the actual image.

Phil, would simply removing the ifd1:modifydate tag cause any problems?  Now that it's been pointed out to me that there is a second ModifyDate tag, I see that the posted command does alter the first one properly.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

elm

Thank you for the responses!

Interesting that Sony does that, guess everything was working as intended, and Sony was the weird one.

Adding ifd1:modifydate-=48 to the end did the trick, thank you very much! Learn something new all the time.

Cheers,

Elm
Consider the large picture.

Phil Harvey

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