Sunday, September 22, 2013

Getting the total shutter actuation count from a Canon DSLR

Given enough use, the shutter mechanism on digital SLR cameras (or any camera with a shutter) will eventually fail.  How many pictures can you take before that happens?  Browsing the data at the Camera Shutter Life Database suggests that the actual number of actuations prior to camera death is highly variable, but you should expect tens of thousands, upward to one hundred thousand or more photos out of most DSLRs.

As far as I know, all DSLR cameras keep an internal count of their total number of shutter actuations.   This number can be of interest to the camera owner for a variety of reasons.  Perhaps you're just curious how many photos you've taken since you acquired a camera.  Or maybe you'd like to see if your camera is reaching its life expectancy and it might be time to look for a replacement.  If you are shopping for a used camera body, the shutter actuation count is a bit like the mileage on a used car – it gives you a sense for how heavily the camera has been used.

Recently, I was curious about how to get this information out of a Canon DSLR body.  I discovered that there is a lot of conflicting, and sometimes flat-out wrong, information about this floating around on the Web.  So when I found a working solution, I thought it'd be worth sharing.  Now, if you have a Nikon DSLR, getting the shutter actuation count is easy.  Nikon cameras are nice enough to add this information to the EXIF data of every JPEG image they generate.  All you have to do is inspect the EXIF data!

Despite numerous postings online claiming that Canon cameras also do this, they do not (at least, none that I know of).  With some searching, you can find links to several freeware programs (mostly Windows-only) or websites that claim to be able to extract this information from Canon cameras.  I haven't tried any of them, though, because once again, GNU/Linux and open-source software came to the rescue with an incredibly simple solution.  I must acknowledge this forum thread because it pointed me to the solution I'll describe below.

First, you need to have the program gphoto2 installed.  If you run Debian or a Debian-based Linux distribution, such as Ubuntu, installing gphoto2 is as simple as opening a terminal window and running this command.

sudo apt-get install gphoto2

Then, connect your camera to your computer's USB port and turn on the camera.  Back at the terminal window, run this command.

gphoto2 --get-config /main/status/shuttercounter

If everything worked correctly, you should get output similar to the following.

Label: Shutter Counter                                
Type: TEXT
Current: 11892

The number at the end is the total number of shutter actuations. It couldn't be much easier than that!