Video capture with multiple IIDC cameras

Q: My QTKit Capture application uses multiple IIDC cameras to capture video with a frame size of 640x480 @ 30 fps, but I've found I can only capture with three cameras. Is this a known limitation?

A: The limitation you're encountering comes from the bandwidth each camera is using on the FireWire bus.

In general, the FireWire bus that IIDC cameras connect to can run at a maximum speed of 400Mb/sec.

The FireWire spec allows up to 80% of the total bandwidth to be used for isochronous traffic, like video. IIDC cameras can operate at different frame rates, different frame sizes and can also produce different flavors of YUV data -- YUV 4:1:1 and YUV 4:2:2. Depending on these factors the amount of bandwidth consumed will vary.

Note: You can also connect IIDC cameras to an 800Mb/sec FireWire bus but they will operate at slower speeds.

Multiple IIDC streams can be active simultaneously. The number of active streams is only limited by the number of cameras present and the amount of FireWire bus bandwidth available. If there is insufficient bandwidth for a given setting (pixel format / frame size / frame rate), QuickTime will attempt to use a smaller frame size. If that fails, it will try a slower frame rate.

The solution is to work with smaller frame sizes, lower frame rates or to add an additional FireWire bus using a 3rd party PCI card giving you more bandwidth to play with.

See QA1586 QTKit Capture - Specifying Media Compression Settings to learn how to configure media compression settings (format, frame size, and so on) for the QTKit Capture QTCaptureMovieFileOutput object.

QTKit Capture will send you the QTCaptureSessionRuntimeErrorNotification when you are trying to record to multiple cameras simultaneously and you've exceeded the bandwidth limitations. This will allow you to detect this condition (in the absence of any error code being returned). The notification user info dictionary QTCaptureSessionErrorKey entry contains an NSError object that describes the error that prevented the session from running properly.

Here's how to setup to receive this notification:

Listing 1: How to receive the QTCaptureSessionRuntimeErrorNotification notification.

// handle the QTCaptureSessionRuntimeErrorNotification

-(void)handleNotification:(NSNotification *)theNotification
{
    // your code to handle notification here
}

...

// setup to receive the QTCaptureSessionRuntimeErrorNotification

NSNotificationCenter *nc;
nc = [NSNotificationCenter defaultCenter];
[nc addObserver:self
        selector:@selector(handleNotification:)
        name:QTCaptureSessionRuntimeErrorNotification
        object:nil];

Video Capture with Sequence Grabber

The limitations described above also apply for Sequence Grabber, i.e. the number of active streams is limited by the number of cameras present and the amount of FireWire bus bandwidth available. The solution is to work with smaller frame sizes, lower frame rates or to add an additional FireWire bus using a 3rd party PCI card giving you more bandwidth to play with.

To configure the sequence grabber settings, use SGSettingsDialog, SGSetSettings and SGSetChannelSettings. See the Movie Creation Guide for additional information.

Note: For developers working with DV, simultaneous recording from multiple DV cameras is not supported. The current implementation of the DV Video Digitizer (QuickTime 7.5) only supports a single connection. This is a known limitation.

Document Revision History

Date Notes
2008-08-08 Updated for QTKit Capture.
2004-08-25 Discusses factors which influence the number of IIDC cameras that can simultaniously be used for capture.

Posted: 2008-08-08


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.