edsdkcanon-sdk

High speed (burst) shooting with EDSDK


I'm trying to do high speed shooting with the EOS 40D. When hand-operated with drive mode set to "high speed continuous" in the UI, this camera sustains about 6 fps.

How can I replicate this using the EDSDK?

The code below selects "high speed continuous" drive mode (0x4) and sends kEdsCameraCommand_TakePicture as fast as possible. After each shot the camera remains "busy" for around 1 second. This is the same speed as single-frame shooting. I tested every available drive mode and while some are slower, none are faster than 1 fps.

Note that the EOS 40D does not support kEdsCameraCommand_PressShutterButton. Using it gives EDS_ERR_INVALID_PARAMETER. The EDSDK document says: "This command is supported by the EOS 50D or EOS 5D Mark II or later cameras" so 40D is too old.

printf("============= Testing drive mode %08X\n", drive_mode);

result = EdsSetPropertyData(m_CameraRef, kEdsPropID_DriveMode, 0, sizeof(EdsUInt32), &drive_mode);
assert(result == EDS_ERR_OK);

EdsUInt32 new_drive_mode;
result = EdsGetPropertyData(m_CameraRef, kEdsPropID_DriveMode, 0, sizeof(EdsUInt32), &new_drive_mode);
assert(result == EDS_ERR_OK);
assert(new_drive_mode == drive_mode);

int n_captured = 0;
for (int i = 0; i < count; i++)
{
    do
    {
        result = EdsSendCommand(m_CameraRef, kEdsCameraCommand_TakePicture, 3);
        printf("  %d", result);
        Wait(1); // Process Windows messages for a few ms
    } while (result == EDS_ERR_DEVICE_BUSY);
    printf("\n");
    if (result == EDS_ERR_OK)
        n_captured++;
    else
        printf(" Burst capture error code for frame %d: %d!\n", i, result);
}
printf(" Burst capture end!\n");

Typical output looks like:

============= Testing drive mode 00000004
  0
  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129
  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129
  129  129  129  129  129  129  129  129  129  129  0
  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129
  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129  129
  129  129  129  129  129  129  129  129  129  129  129  0
 Burst capture end!

Code 129 is EDS_ERR_DEVICE_BUSY.


Solution

  • It's not possible with a 40D because, as you already noted, the PressShutterButton command is not supported.

    You may be able to speed it up a little bit with the TakePicture command by setting SaveTo to Host and take a photo as soon as you get the DownloadReady object event.
    You need to save the pointers from that event and when you are done, download all images.
    Beware that the buffer size is limited though and depending on image quality (jpg/raw, large/small size) may only fit three or four images.

    Alternatively, use a faster CF card so when you save the images on the camera, it's ready again sooner.