Shuttercount found in Sony files

Started by Allan Olesen, April 17, 2013, 11:25:34 AM

Previous topic - Next topic

Allan Olesen

Members of the mi-fo.de and dyxum.com forums has found a shutter count in Sony files. It appears to be un-resettable by user.

Discussion in these four threads.
http://www.mi-fo.de/forum/index.php?showtopic=33239
http://www.mi-fo.de/forum/index.php?s=163ac69844bfce230b4657ea05857498&showtopic=33239&pid=296150&st=15&#entry296150
http://www.dyxum.com/dforum/the-alpha-shutter-count-tool_topic97489_page1.html
http://www.dyxum.com/dforum/a900-a850-with-65k-shutter-actuations-anyone_topic97410_post1161065.html#1161065

Unfortunately, the fields seem different for different camera models. For my own a77 (and apparantly the a99), the count is found in these 3 bytes in the output from 'exiftool -u -U -v  filename', with lowest order first:
| | | | Sony_Tag9050_0x0032 = 110
| | | | Sony_Tag9050_0x0033 = 66
| | | | Sony_Tag9050_0x0034 = 0

Resulting in 110 + 66*256 = 17006 actuations.

(I guess it is a 32-bit counter with the highest order byte in 0x0035, but I have no intention to take 16 million shots to test that.)

The threads mentioned above contain byte addresses for several other Sony models.

Phil Harvey

#1
Hi Allan,

Thanks!  I'll look into this and add the ability to extract this information.

- Phil

Edit: Looking at my comments in Sony.pm, I had already noticed that Tag9050 0x32 increments for each image.  Great to have this identified as a shutter count.

Edit2:  This isn't ShutterCount, but instead an ImageCount.  See the post by Guy (Borut) here.
...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 ($).

Allan Olesen

QuoteEdit2:  This isn't ShutterCount, but instead an ImageCount.  See the post by Guy (Borut) here.
To be precise, it is an exposure counter. It counts the actual number of exposures used for in-camera HDR and panorama. But it doesn't count the double action of the shutter for each exposure when using the SLT cameras with the electronic front curtain shutter disabled.

Phil Harvey

Thanks Allan,

I think your description is consistent with the ExifTool Sony tags documentation:

ImageCount - total number of image exposures made by the camera

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

Flowsen

Old thread... but unfortunately something seems to be confusing.

Do you have a proof that 0x0032 is a int32u and not a int16u?
I am confused because I have two Sony ILCE-7R both with approx ~70-90k images taken. What I do see that both, Sony_Tag9050_0x0032 &  Sony_Tag9050_0x0033 count as explained.
But it seems that once Sony_Tag9050_0x0034 should be written to 1 it acutally stays 0. So after 255 + 255*256 = 65535 the imagecount starts from 0 again!

This results in my two cameras having ~5k and ~30k as imagecount instead of ~70k and ~90k...

Anyone ever tested a value above 65535 to have a proof that 0x0032 is a int32u. Or maybe its a special behaviour with Sony ILCE-7R?

I am happy to share images from both cameras to investigate in this problem. Anyone?


Phil Harvey

Quote from: Flowsen on February 10, 2017, 06:05:12 AM
Old thread... but unfortunately something seems to be confusing.

Do you have a proof that 0x0032 is a int32u and not a int16u?
I am confused because I have two Sony ILCE-7R both with approx ~70-90k images taken. What I do see that both, Sony_Tag9050_0x0032 &  Sony_Tag9050_0x0033 count as explained.
But it seems that once Sony_Tag9050_0x0034 should be written to 1 it acutally stays 0. So after 255 + 255*256 = 65535 the imagecount starts from 0 again!

There is a note in the code for 0x0032:

        # this seems to be valid for the A37,A57,A65,A77,A99, and possibly the NEX-5N/7
        # but I haven't seen a count over 65536, so the Format is not confirmed - PH


But I don't understand what you are saying:

Does tag 0x0032 count as expected past 65536?  What is tag 0x0033?  What is tag 0x0034?  What version of ExifTool are you using?

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

Flowsen

Thanks for your reply Phil...

I must have missed the note, sorry.
Tag 0x0032 does not count past 65536...

ExifToolVersion = 10.41, my verbose output on the Tag_9050a looks like this:

  | | | + [Deciphered Tag9050a directory]
  | | | |       9035: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | | | |       9045: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | | | |       9055: 91 0a 24 14 39 19 00 00 00 00 00 00 00 00 00 00 [..$.9...........]
  | | | |       9065: 00 00 2b 0f 00 00 00 00 00 00 c8 0d 00 10 00 00 [..+.............]
  | | | |       9075: 00 00 c0 0f 00 01 00 00 00 00 01 00 2b 0f 00 00 [............+...]
  | | | |       9085: 00 0c 0c 1f 17 00 14 14 11 11 11 14 00 00 00 00 [................]
  | | | |       9095: 00 00 c8 0d 00 10 00 00 00 00 c0 0f 00 01 00 00 [................]
  | | | |       90a5: 00 00 08 00 04 00 00 00 7c 04 47 00 a4 ff c4 09 [........|.G.....]
  | | | |       90b5: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | | | |       90c5: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | | | |       90d5: 00 00 00 00 00 00 00 00 0a 02 00 00 00 00 00 00 [................]
  | | | |       90e5: 14 00 00 00 00 00 00 00 00 00 00 c0 ff ff 00 00 [................]
  | | | |       90f5: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | | | |       9105: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | | | |       9115: 00 00 00 00 9d 30 00 00 00 00 00 00 00 00 00 00 [.....0..........]
  | | | |       9125: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | | | |       9135: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | | | |       9145: 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 [................]
  | | | |       9155: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | | | |       9165: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | | | |       9175: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | | | |       9185: 00 00 02 00 25 00 02 00 00 00 28 05 00 00 71 00 [....%.....(...q.]
  | | | |       9195: 00 10 00 00 00 00 81 ff 00 81 ff 00 00 00 00 00 [................]
  | | | |       91a5: 00 00 00 00 00 22 65 07 00 00 8c 05 18 0b a4 10 [....."e.........]
  | | | |       91b5: 30 16 bc 1b 48 21 d4 26 60 2c ec 31 78 37 c0 da [0...H!.&`,.1x7..]
  | | | |       91c5: 00 00 c0 da 00 00 c0 da 00 00 c0 da 00 00 c0 da [................]
  | | | |       91d5: 00 00 c0 da 00 00 c0 da 00 00 c0 da 00 00 c0 da [................]
  | | | |       91e5: 00 00 c0 da 00 00 c0 da 00 00 00 00 00 00 00 00 [................]
  | | | |       91f5: 2b 0f 00 00 00 11 0f 66 2e 00 4d 47 42 3f 3b 38 [+......f..MGB?;8]
  | | | |       9205: 35 34 31 30 2f 2d 2c 2b 2a 29 28 28 27 27 26 26 [5410/-,+*)((''&&]
  | | | |       9215: 25 25 24 24 24 24 24 24 24 24 24 24 24 24 24 24 [%%$$$$$$$$$$$$$$]
  | | | |       9225: 24 24 24 0a 00 22 07 c0 0f 02 00 00 00 00 00 00 [$$$.."..........]
  | | | |       9235: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | | | |       9245: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | | | |       9255: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | | | |       9265: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | | | |       9275: 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 25 [...............%]
  | | | |       9285: 00 02 00 00 00 28 05 00 00 71 00 00 10 00 00 00 [.....(...q......]
  | | | |       9295: 00 81 ff 00 81 ff 00 00 00 00 00 00 00 00 00 00 [................]
  | | | |       92a5: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | | | |       92b5: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | | | |       92c5: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | | | |       92d5: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | | | |       92e5: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | | | |       92f5: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | | | |       9305: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | | | |       9315: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | | | |       9325: 00 00 00 10 00 00 00 00 10 00 10 81 13 00 0a 00 [................]
  | | | |       9335: 10 00 10 c8 0d 00 0a 00 10 00 10 a5 14 0f 09 00 [................]
  | | | |       9345: 10 00 10 81 13 00 0a 00 00 00 00 00 00 00 00 00 [................]
  | | | |       9355: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | | | |       9365: 00 c8 37 c8 37 c8 37 00 00 00 00 00 00 00 00 00 [..7.7.7.........]
  | | | |       9375: 00 ff 01 01 00 00 00 00 00 ff ff 00 00 00 00 00 [................]
  | | | |       9385: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | | | |       9395: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]
  | | | |       93a5: 00 00 00 00 00 00 00 00 00 00 00 10 ff ff ff ff [................]
  | | | |       93b5: ff ff ff ef ff ff ff ff ff fb ff ff ff 7f ff ff [................]
  | | | |       93c5: ff ff ff ff ff 7f ff ff ff ff ff ff ff ff ff ff [................]
  | | | |       93d5: ff ff ff ff ff ff fb ff ff ff ff ff ff df ff ff [................]
  | | | + [BinaryData directory, 944 bytes]
  | | | | FlashStatus = 0
  | | | | - Tag 0x0031 (1 bytes, int8u[1]):
  | | | |     9066: 00                                              [.]
  | | | | ImageCount = 3883
  | | | | - Tag 0x0032 (4 bytes, int32u[1]):
  | | | |     9067: 2b 0f 00 00                                     [+...]
  | | | | SonyExposureTime = 3528
  | | | | - Tag 0x003a (2 bytes, int16u[1]):
  | | | |     906f: c8 0d                                           [..]
  | | | | SonyFNumber = 4096
  | | | | - Tag 0x003c (2 bytes, int16u[1]):
  | | | |     9071: 00 10                                           [..]
  | | | | ReleaseMode2 = 0
  | | | | - Tag 0x003f (1 bytes, int8u[1]):
  | | | |     9074: 00                                              [.]
  | | | | ImageCount2 = 3883
  | | | | - Tag 0x004c (4 bytes, int32u[1]):
  | | | |     9081: 2b 0f 00 00                                     [+...]
  | | | | SonyDateTime2 = .....
  | | | | - Tag 0x0051 (6 bytes, undef[6]):
  | | | |     9086: 0c 0c 1f 17 00 14                               [......]
  | | | | ReleaseMode2 = 0
  | | | | - Tag 0x0067 (1 bytes, int8u[1]):
  | | | |     909c: 00                                              [.]
  | | | | InternalSerialNumber = 164 255 196 9
  | | | | - Tag 0x007c (4 bytes, int8u[4]):
  | | | |     90b1: a4 ff c4 09                                     [....]
  | | | | LensMount = 0
  | | | | - Tag 0x0105 (1 bytes, int8u[1]):
  | | | |     913a: 00                                              [.]
  | | | | LensFormat = 0
  | | | | - Tag 0x0106 (1 bytes, int8u[1]):
  | | | |     913b: 00                                              [.]
  | | | | LensSpecFeatures =
  | | | | - Tag 0x0116 (2 bytes, undef[2]):
  | | | |     914b: 00 00                                           [..]


I am for sure that this camera has above 65536 counts, so it looks like that it just discards or at least does not store anything in the 3rd and 4th byte of tag 0x0032. As already mentioned, reaching 65535 it seems to start counting from zero.

Phil Harvey

Thanks.  Pity.  I'll make a note about this in the documentation and change the format to int16u.

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

Flowsen

btw, ImageCount1 and ImageCount2 are identical in my case.
On http://shuttercounter.com/ I found ImageCount3 which in my case always returns 56000 for my ~70-90k cameras and for new cameras ImageCount3 shows the exact number of images.
I bet shuttercounter.com uses your exiftool but in my exif version I cant find ImageCount3, can you tell me what ImageCount3 stands for and how this value is calculated? Might there be a relation between ImageCount1 and ImageCount3 values?

Phil Harvey

It is likely that shuttercounter.com is using an older version of ExifTool.  Sony models store a number of counters in various locations, and the decoding changes as new models are introduced.

- 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

Quote from: Flowsen on February 10, 2017, 08:48:24 AM
I bet shuttercounter.com uses your exiftool

It does.  Exiftool is mentioned on the "About" page.
* 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).

JosR

Quote from: Phil Harvey on February 10, 2017, 08:37:21 AM
Thanks.  Pity.  I'll make a note about this in the documentation and change the format to int16u.

- Phil
Hi Phil,

Sorry, but I think that is a bit too drastic:
I don't know what is going on with the ILCE-7R, but for the SLT-A99V in the same Tag9050a it is definitely int32u:
I have a sequence of SLT-A99V images giving (InternalSerialNumber, DateTimeOriginal, ImageCount, ImageCount3, Filename):

0808a22a65   2013:10:09 13:20:15   31971   31970   31189727032_3a42001cc2_o.jpg
0808a22a65   2014:01:15 09:58:42   41794   41793   30192420341_7167fb48dc_o.jpg
0808a22a65   2014:02:12 11:34:50   42864   42863   32202002441_06c97a231d_o.jpg
0808a22a65   2014:05:28 08:57:47   48735   48734   30848597383_b8c768ecc2_o.jpg
0808a22a65   2014:06:16 19:09:36   49944   49943   31425570762_767d931d02_o.jpg
0808a22a65   2014:07:06 14:12:43   50672   50671   30526129693_b0c66ea015_o.jpg
0808a22a65   2014:08:15 06:45:32   51895   51894   31512380672_c2f9c821ac_o.jpg
0808a22a65   2015:01:02 12:39:21   63139   63138   30511307024_99a9413403_o.jpg
0808a22a65   2015:02:25 11:14:36   66676   66675   31328944023_09575d0763_o.jpg
0808a22a65   2015:04:02 18:03:01   68888   68887   30730795344_38c884eca9_o.jpg
0808a22a65   2015:05:06 10:59:26   71568   71567   32226964075_5f6dca1a03_o.jpg
0808a22a65   2016:03:09 08:43:42   89417   89416   30582440703_e1bda2fb30_o.jpg
0808a22a65   2016:08:16 05:52:17   92438   92437   31200002520_8e2eab31fa_o.jpg
0808a22a65   2016:11:09 12:27:10   93441   93440   32188671136_75f9b335cd_o.jpg
0808a22a65   2016:12:07 09:53:56   93627   93626   31482237725_69b276f0fe_o.jpg
0808a22a65   2016:12:07 11:11:29   93740   93739   31111152690_760bbbe653_o.jpg
0808a22a65   2017:01:18 10:48:52   93874   93873   32058919910_2bcca759ea_o.jpg

Changing ImageCount to int16u breaks this.

Also for my own DSLR-A850 I have seen the count pass 65535, although that is admittedly in a different Tag.

Nevertheless, I hope you can revert it back to int32u, and mention the odd ILCE-7R behaviour as comment.

Regards,
Jos

Phil Harvey

Hi Jos,

Thanks for the input.  I'll change back to int32u, but the old code was actually only using 24 of these bits (the upper byte was masked off) -- I'll revert back to the old version with a note to indicate this.

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