ExifTool Forum

General => Metadata => Topic started by: Gary on November 03, 2015, 12:22:48 AM

Title: Shutter Count on a Canon EOS 30D and Rebel Xti
Post by: Gary on November 03, 2015, 12:22:48 AM
Is it possible to determine the shutter count from an image from a Canon camera?
If not, then is there some other item that is unique to each photo on a given serial number camera?
I'm trying to find a way to generate a unique image filename for my filing system.
Title: Re: Shutter Count on a Canon EOS 30D and Rebel Xti
Post by: StarGeek on November 03, 2015, 02:29:12 AM
You might try running ExifTool on a image and check through the metadata.  Look for something like ShutterCount, FileIndex, or FileNumber.  I know my Nikon has a ShutterCount, but my friend's Canon had FileIndex.  Different cameras may have different tag names.
Title: Re: Shutter Count on a Canon EOS 30D and Rebel Xti
Post by: Phil Harvey on November 03, 2015, 07:27:08 AM
Hi Gary,

You could write a unique ID to each image:

exiftool "-imageuniqueid<newguid" -r DIR

Or if you want to generate a unique ID from existing information, you could use an MD5 checksum of the image data (so it is independent of any metadata changes).  This works on Mac/Linux for generating a unique MD5 hash for JPEG images:

exiftool -all= -o - FILE | md5

- Phil
Title: Re: Shutter Count on a Canon EOS 30D and Rebel Xti
Post by: Gary on November 03, 2015, 11:49:53 PM
Thanks to both of you for the suggestions. I'll try dumping the EXIF to see if the desired tag is there. It would be nice to able to find and use it, because when cobined with the body serial number, it gives you a timeline for all shots taken on that camera. If it isn't there, however, I may need to generate the suggested checksum and use it and the body serial number as the filename. One way or another, there must be a way to may filenames unique.
Title: Re: Shutter Count on a Canon EOS 30D and Rebel Xti
Post by: Phil Harvey on November 04, 2015, 07:39:33 AM
If all you care about is that the filename is unique, then NewGUID should do it.  But most times a more meaningful file name is preferred.

- Phil
Title: Re: Shutter Count on a Canon EOS 30D and Rebel Xti
Post by: Gary on November 04, 2015, 02:52:24 PM
Actually, I really do want something that is meaningful. However; a non-unique meaningful name would not be very useful.
Title: Re: Shutter Count on a Canon EOS 30D and Rebel Xti
Post by: StarGeek on November 04, 2015, 08:10:23 PM
I was archiving pictures for a small group of people and here's how I did it.  I would rename each picture according to the Exif Date/Time original and prefix them with the initials of the photographer who took the picture.  Basically, it was something like this to start with
exiftool -if "$SerialNumber eq '8675309XYZ'" "-filename<BKW_$Datetimeoriginal" -d "%Y-%m-%d_%H.%M.%S%%-c.%%e"

Of course, you could just use the Serial Number instead of initials.  That would be unique and reasonably meaningful.
Title: Re: Shutter Count on a Canon EOS 30D and Rebel Xti
Post by: Gary on November 04, 2015, 11:29:39 PM
Thank you. I'll give it a try.

Was actually hoping to use the body serial number and shutter count on my Canon EOS 30D, which would sort the photos nicely and be guaranteed unique. However; I don't think that the shutter count is accessible for my unit.

Right now, however, I'm having trouble getting the command line exiftool to do anything on one of my attached drives. The same commands seem to work fine on the internal drives under Windows 10 and other tools that use exiftool seem to have no trouble with the external drives.
Title: Re: Shutter Count on a Canon EOS 30D and Rebel Xti
Post by: StarGeek on November 05, 2015, 12:44:41 AM
Quote from: Gary on November 04, 2015, 11:29:39 PM
Right now, however, I'm having trouble getting the command line exiftool to do anything on one of my attached drives. The same commands seem to work fine on the internal drives under Windows 10 and other tools that use exiftool seem to have no trouble with the external drives.

That might be an account permission thing.  I had a similar problem when I upgraded to Win 8.  Try opening the command line as an admin and see if you have the same problem.  If it works, then google "take ownership external drive" and try some of the results to see if you can get the whole drive to work for you.

Title: Re: Shutter Count on a Canon EOS 30D and Rebel Xti
Post by: Gary on November 08, 2015, 10:57:50 AM
Thanks. I'll try that.