Capturing video from multiple devices simultaneously using QTKit

       I have three cameras in my iMac,one is iSight(FaceTime HD Camera (Built-in),the other two are  USB Camera。And my System version is Mac OS X 10.7.3 (11D2001),SDKs:Mac OS X 10.7 (11E52)
       My QTKit Capture application uses multiple cameras to capture video with a frame size of 640x480 @ 30 fps simultaneously, but I've found I can only capture with one or two cameras at the same time and it is dependent on different USB port。 Is this a known limitation?

Fallowing is what I have done:
_captureDevices = [[NSArray alloc] initWithArray:
                       [QTCaptureDevice inputDevicesWithMediaType:QTMediaTypeVideo]];
    _captureDeviceCount = _captureDevices.count;
    NSLog(@"Find video devices :%d" ,_captureDeviceCount);
    _CaptureSessions = [[NSMutableArray alloc] initWithCapacity:_captureDeviceCount];
    _captureDeviceInputs = [[NSMutableArray alloc] initWithCapacity:_captureDeviceCount];
    _captureDecompressedVideoOutput =[[NSMutableArray alloc] initWithCapacity:_captureDeviceCount];
    _CaptureMovieFileOutputs = [[NSMutableArray alloc] initWithCapacity:_captureDeviceCount];
// Create the capture session
    for (int i = 0; i < _captureDeviceCount; i++)
        [_CaptureSessions addObject:[[QTCaptureSession alloc] init]];
        [_CaptureMovieFileOutputs addObject:[[QTCaptureMovieFileOutput alloc] init]];
         [_captureDecompressedVideoOutput addObject:[[QTCaptureDecompressedVideoOutput alloc] init]];
  for (int idex = 0; idex < _captureDeviceCount; idex++)
// Connect inputs and outputs to the session
      BOOL success = NO;
      NSError *error;
// Find a video device 
    QTCaptureDevice *tempCaptureDevice =  (QTCaptureDevice*)[_captureDevices objectAtIndex:idex];
    char tempDeviceNameUniqueID[1024] = "";
    char tempCaptureDeviceName[1024] = "";
    [[tempCaptureDevice localizedDisplayName]
     getCString:tempCaptureDeviceName maxLength:1024
     encoding:NSUTF8StringEncoding];
    [[tempCaptureDevice uniqueID]
     getCString:tempDeviceNameUniqueID maxLength:1024
     encoding:NSUTF8StringEncoding];
     NSLog(@"\nCaptureDevice: %d \nDeviceName: %s  \nUniqueID :%s\n" , idex ,tempCaptureDeviceName, tempDeviceNameUniqueID);
    success = [tempCaptureDevice open:&error];
    if (error != Nil)
        NSLog(@"CaptureDevice open:&error!");
    if (!success)
        tempCaptureDevice = nil;
        // Handle error
    if (tempCaptureDevice)
       //Add the video device to the session as a device input
                    [_captureDeviceInputs addObject:[[QTCaptureDeviceInput alloc] initWithDevice:tempCaptureDevice]];
                    success = [ [_CaptureSessions objectAtIndex:idex] addInput:[_captureDeviceInputs objectAtIndex : idex] error:&error];
        if (!success)
            // Handle error
            NSLog(@"mCaptureSession addInput error!");
// Create the movie depress output and add it to the session
        success = [ [_CaptureSessions objectAtIndex:idex] addOutput: [_captureDecompressedVideoOutput objectAtIndex:idex] error:&error];
        if (!success)
            // Handle error
            NSLog(@" Handle error");
        int _frameWidth = 640;
        int _frameHeight = 480;
        int _frameRate = 30;
        [ [_captureDecompressedVideoOutput objectAtIndex:idex]
         setMinimumVideoFrameInterval:(NSTimeInterval)1/(float)_frameRate];
        NSDictionary* captureDictionary = [NSDictionary dictionaryWithObjectsAndKeys:
                                           [NSNumber numberWithDouble:_frameWidth], (id)kCVPixelBufferWidthKey,
                                           [NSNumber numberWithDouble:_frameHeight], (id)kCVPixelBufferHeightKey,
                                           [NSNumber numberWithUnsignedInt:kCVPixelFormatType_32ARGB, nil];
        [ [_captureDecompressedVideoOutput objectAtIndex:idex] performSelectorOnMainThread:@selector(setPixelBufferAttributes:) withObject:captureDictionary waitUntilDone:NO];
// start runing the Sessions
        [ [_CaptureSessions objectAtIndex:idex] startRunning];
}// end of   for (int idex = 0; idex < _captureDeviceCount; idex++)
Message was edited by: 08064140
Message was edited by: 08064140
Message was edited by: 08064140

Similar Messages

  • "CLOSED":How to plan inventory from multiple orgs simultaneously using MRP?

    Hello everybody,
    How to plan inventory from multiple organizations simultaneously using SCP?
    My customer found that in supply chain planning (MRP) system always plans in single manufacturing organization, say, ATC, firstly. If set in organization item master, the source type as 'Inventory' and the source organization as another trading organization name, say, ANX. if there is insufficient inventory in ATC, SCP-MRP would plan in ANX, disregard of the inventory exist in ANX for the item.
    But for some items, there are both inventory in ATC and ANX and we want plan BOTH their inventory simultaneously instad of firstly ATC and then ANX.
    Is there any standard function in Oracle that can do so? I found that the sourcing rule cannot help in this case.
    A simple test case is described in
    https://gtcr.oracle.com/gtcr-dir/gtcr_4607/5580425.992/Alternative_to_plan_multi-org_MRP.doc
    Thanks
    Catalina
    Message was edited by:
    user447176

    Catalina,
    Net the inventory simultaneously? Its not quite clear what your client wants.
    Even in the old SCP, you can use sourcing rules to first net inventory in org1 and then net the inventory in org 2 via a transfer from rule. The key point is it is always incremental based on where you place teh demand and then you provide source to fill that demand.
    One restriction that ASCP still has up to 11.5.10 is that you can only have sourcing rules going in one direction. This means that you can't have a rule that sources ORG1 from ORG2 for item A, then have the revers in ORG2 sourcing from ORG1. That won't work, ASCP will randomly ignore one of the rules.
    The best choice may be to use GOP with a sourcing split % so that yo do consider the inventory in both orgs when demanding the order, but it would still be done by checking ORG1 then ORG2.
    Hope this helps.
    Kevin Creel

  • I would like to create a movie with with video from multiple windows playing simultaneously

    I would like to make a movie that shows multiple videos playing at the same time but in separate windows (kind of like the intro to the Brady Bunch?).  How can this be done?

    Thank you for using the Apple Support Communities
    I would suggest using Apple's Pages which allows support for imbedding videos from the device's camera roll. Pages also allows for sharing via email, Air Drop, and Messages.

  • When using Firefox Sync on multiple devices, I used to be able to 'send' a tab from one computer to another. Is this still possible? If so, how?

    When using Firefox Sync on multiple devices, I used to be able to 'send' a tab from one computer to another. Is this still possible? If so, how?
    I don't mean the ability to see what tabs are open on another device (I know how to do this). But if I am at work and find something that I want to read at home, it would be helpful to 'send' the tab to my home PC so that when I return home, it will automatically open that tab for me.

    Can anyone help?

  • Can you capture video from the internet, using premiere pro cc?

    trying to capture video from the internet, using premiere pro cc, is that possible?
    also - it keeps saying "video capture offline" - any solutions for that?

    I am going to go out on a limb and say that while it may be against the YouTube terms of service to download or scrape a video off of their service, there are times that I really don't care since it is for my personal use. Providing myself or my wife with entertainment that she can watch or listen to on her smartphone while on an airplane, or in a car traveling down the road, just doesn't bother my moral compass. Doesn't make it twitch in the least.
    Perhaps I am wrong. Perhaps I shouldn't do it. Tough. I do, and will continue to do so until the Google police come knocking on my door.
    This is pretty much the same argument that they tried to kill the VCR with. The simple act of time shifting was something that was considered wrong, and illegal, until people came to their senses.
    As for the editing capability, you might be surprised at the ways it is possible to download video that works just fine for what I use it for. Premiere Pro has no problems allowing me to edit out the parts I don't like, or just aren't funny, and the quality really doesn't suffer much at all.
    Now, with the exception of something I did for my two year old Great Niece, I have never used any video that I have downloaded for anything except a tutorial, or in her case, a Sesame Street song I used when I shot video of me reading her the Sesame Street book that I purchased.
    Would it be wrong to post downloaded video, intact or edited, for public consumption? Sure it would. No question about it.
    But please do not assume that everyone downloading video from the Internet is doing so for nefarious purposes, and I promise not to assume everyone is a perfect angel and is following all the rules.

  • How to cpture video from mobile device using MMAPI?

    Dear freinds
    Q1:-
    I am working on a project that require capture image from mobile device (Cell Phone) but in J2ME Wireless Toolkit their is no any code example to do this .
    Q2:-
    Is this possible that i cn plug web cam to capture image from emulator
    if yes than please replay me with code example

    Well i am pretty certain i need to develop a java code which would allow the same. But i was looking forward if anyone knows about any API which have certain interfaces exposed which would support this type of communication. Like you can get code sniplets for SMSC which allows SMS to be sent from application to any mobile phone i was thinking might be some help would also be available for the reverse.
    Or if there are any tutorials available on net which might be of some help then please share.
    Thanks

  • Capture Video from Panasonic AG-HMC40

    I am having trouble capturing video from my camera - Panasonic AG-HMC40 HD camera
    I keep getting a message:  Capture Device Offline.
    I am able to capture from iMovie and Final Cut X....
    Does anyone know the correct capture settings?

    You don't have to capture. You ingest.
    IE: Copy files from your camera memory card onto your hard drive using the media browser.
    See extract from Adobe Help below:
    Import assets from file-based sources with Media Browser
    You can import assets into Premiere Pro directly from tapeless media. However, it is more efficient to transfer tapeless media contents to a hard disk before importing. Also, playback performance is much better from a dedicated internal hard drive or RAID than from a camera or memory card reader.
    Use the Media Browser, instead of File > Import, to import files from tapeless sources. The Media Browser assembles the relevant files into coherent clips, and does not import irrelevant non-media files sometimes found in the folders of tapeless media.
    (Optional) Transfer the entire contents of one or more P2 cards, Sony Compact Flash cards, XDCAM media, XDCAM EX SxS cards, hard disk camcorders, DVDs, or AVCHD media to a hard disk. For information about transferring these media, see About transferring files.
    Note:  For XDCAM EX, copy the entire BPAV folder and its contents, not just one MP4 file at a time. 
    If the Media Browser is not already open, select Window > Media Browser. Note:  You can dock or group the Media Browser like any other panel in Premiere Pro.
    Browse to the folder containing the media files. The Media Browser shows a thumbnail or icon (depending on the format) and shot name for each shot in the folder. The Media Browser automatically aggregates spanned clips and shot metadata from the subfolders into single clips for any of these formats. The Media Browser shows different sets of metadata for different formats.
    (Optional) To preview a shot before importing it, double-click the shot in the Media Browser.  Premiere Pro plays the clip in the Source Monitor without importing it into the Project panel.
    Either select File > Import From Browser, drag clips from the Media Browser into the Project panel, or drag clips from the Media Browser into a timeline.
    The asset or assets are imported into the Project panel as whole clips.

  • Trouble capturing video from VHS via Analogue to DV converter

    I use Final Cut Express 1.0.1 and I've always been able to capture video from VHS via a Director's Cut analogue to DV converter box. Today it keeps freezing on me. I've tried force quit, logged off and back on again and even re-started the computer. I've got plenty of space on my two hard drives (125GB free on main drive and 85.42GB on my scratch disk).
    I'm sure I've set the rest up correctly (composite cable from VHS to DV convertor box set to output and connected to input slots on box, and DV box set to capture). The box is correctly connected to the Mac.
    I've also logged on using another user's account to see if the same problem occurs, and it does. I believe this means that dumping the my preference file won't help, but please correct me if I'm wrong. Any ideas how to stop this freezing on me would be much appreciated.
    Thanks
    Karen

    Last bit of help from Martin may have some mileage in it as far as excluding hidden problems with the drive you are capturing too.
    Have been reading into the requirements for the hard disc and it does make it clear having a separate one like you have is almost a requirement because of the work it does. Would it be worth trying a small capture to your system disc. If it helps that is how I am working at the moment so it doesn't appear to be instant fireworks if you do use this one but give it some thought first...
    On the firewire port side of things I have seen some unexplained connection issues on this front which were cured by shutting things down, unplugging and then beginning again. Take it System Profile didn't yield anything?
    Now I got back in front of my Mac it appears Quicktime Pro will allow capture from an attached device but appreciate you may not have the Pro bit, iMovie should be as good a test.
    Nick.

  • Capturing Video from a VCR

    I am trying to convert some home videos on VCR. I love PS Elements 8 so I bought Premier Elements 8. I connected my VCR to a PC USB
    via  a Terratec Grabster 250. The Capture window in Premier Elements appears to have identified the video source (Grabster Series, capture) but I got no picture of the video playing on the VCR. If I press "Capture" no footage is captured. I  have Core Duo 2x2.4GHz with 2GB Ram. So I took this up with Adobe Support and this is the reply I got:
    I am sorry to inform you that you can only capture videos using
    Firewire  cable  as usb cable is not supported in Premiere Elements 8,
    if  this option is not available in your VCR, you can not capture videos
    from  VCR to computer.
    What?! The software is not written to support the industry's leading bus connection?!! That's just ridiculous. I suppose when ripping HD it may be that USB 2.0 is too slow but I'm trying to convert ancient VCRs using a composite video source!
    Has anyone an idea if I can convert my Grabster's USB output to feed into the lonely solitary Firewire socket on my PC?

    Hello Wounded.
    I am using PE v7.  I sold my PE v8 because it was not working properly and incompatible with some devices/software already on my PC.  But to your issue using your VCR with PE.
    With PE v3 and not v7 I have a VCR connected to my PC via RCA cables.  To export my VCR video's to PE I capture the VCR video to the capture software that came with my PC, SONIC.  Once captured, I close SONIC and open PE.
    I click on Get Media, then click File/Folder, then select the captured file.  PE will convert the file into the acceptable format to edit with PE.  The quality is not the best but it is good.
    To help increase the quality of these conversions I purchased Dazzle (a Pinnacle product) which connects my VCR to my PC via USB.  I have noticed a big difference in the quality, which is very good.
    If you have another editing software on your computer try what I've outlined above.
    Hope it helps.
    Let me know how it goes.
    ciao for now.

  • Suggestions for capturing video from HD source needed

    I'm wanting to capture video from my PS3 (using component or HDMI) and I have no idea what device is good. I'm not looking to spend a large sum of money but it has to be a USB or Firewire external device as I don't have a Mac Pro tower to install PCI cards... yet.
    I was looking at the Hauppauge HD PVR. Noticed it's not compatible with Mac's but saw if I purchase the elgato EyeTV software that it would work. I'm worried about compatibility and skeptical of trusting two products from two companies to work together without issue.
    So I was hoping people on here would have some suggestions.
    Thanks!

    Hope its not too late of a reply but the Hauppauge HD PVR is awesome! (that is, if you don't pick up a defective unit).
    I currently use one myself for capturing xbox 360 gaming clips on my hackintosh and have just figured out what the best settings are for native editing in FCP. You can read my reply in this thread for details:
    http://discussions.apple.com/click.jspa?searchID=-1&messageID=9485446
    I've found 2 apps (one of which is EyeTV 3) that allow you to capture to a Mac via USB2 cable. There's EyeTV 3 and then there's HDPVR Capture which can be found here:
    http://www.steventoth.net/blog/products/hdpvr-capture/
    I used HDPVR Capture first then got my hands on EyeTV 3 and I'll tell ya that EyeTV 3 has better export options. HDVPR-C outputs to M2TS or MP4. MP4 can be problematic when editing in FCP as I found out. But with EyeTV 3 you can export into a 100% native format for Final Cut Pro editing. HDPVR is cool though for a quick app to capture your clips. There's a free trial version that will only capture up to 2min. of footage.
    Btw, if you go with EyeTV 3 make sure you perform a software update after you install it because it doesn't support the Hauppauge HD PVR right off the bat in version 3.0 ..you need version 3.1.1 which you get free when you check for updates.
    hope this helps!

  • Selecting microphone when capturing video from the webcam

    Using Final Cut Pro X
    I want to capture video from my webcam into Final Cut.  I have a USB microphone (Yeti) with which I want to record the audio.  I cannot find an option to select my input source for audio when capturing this footage.  Final Cut seems to default to my microphone on my webcam, which causes echoing and noise. I can select the USB mic when doing a voiceover, but when I capture video I cannot find an option to select my input.  I've made my USB mic my default device in Sys Prefs, but that doesn't work.  Any other ideas?
    Options
    1.  Figure out how to change the default input for webcam capture in Final Cut
    OR
    2.  Use another program.  I've also tried to do the same in both QuickTime and iMovie, and they both capture audio only from the webcam as well.
    Everything I've found online talks about voiceover.  I don't want that.  I want to capture video with it.
    Suggestions are appreciated.  Thank you.

    acyclone wrote:
    Thanks.  Don't know why I didn't see it.  That arrow is pretty small.
    I do still have an issue that I cannot figure out.  I'm using the same mic for webcam recording (now in QT thanks to Luis) and in Final Cut for voiceovers.  Though I'm still on the same Mic the sound is not the same.  It's close, but the sound on the voiceover sounds cleaner and clearer.  I'm sitting in the same spot speaking the same way, but the sound quality difference is noticable.  Not sure why.
    It seems that the difference is in how each software deals with it.
    It may be that QT is sampling audio differently from FCP X somehow, or using a different audio codec or whatever.
    Just guessing, I really have no concrete knowledge.
    Oh, wait: there are a few things that I can notice, after trying a small example: the QT audio is AAC at 44.1 KHz,
    the FCP X is AIFF at 48KHz. Compression and sample rate are different.

  • Unable to capture video from VHS through DAC-200

    (Running Final Cut Pro 5.1.4)
    I have a DAC-200 to hook up my VCR to my G5 in order to capture video from VHS tapes into Final Cut. I had this set-up working a few months ago, but it was disconnected to rearrange equipment and now I can't get it working again. I have followed the advice from the DAC-200 installation instructions and advice from other forum topics but can't seem to get it to work. I finally was able to get something in the log and capture window besides "preview disabled" and "cannot capture because there is no video." I now can get Final Cut to capture video, however it only captures a blank black screen (and this is all I can see in the preview window).
    I've triple-checked every cable hook-up, the G5 recognizes the converter box, the video tape plays fine to a tv. I've even had our IT-guy here at work come check out my set-up for help and he can't figure out what is wrong either. (He did get my log&capture window to get white fuzz in the black screen at one point though. Does that mean anything?)
    Any help is greatly appreciated! (I'm happy to answer any other questions too.) Thanks!

    I had difficullty with the X.4.10 plus QT7.2 and put my info on the Forum as well as sending feedback to Apple. Shortly afterwards, Apple brought out a short security update which I downloaded and, hey presto, I was then able to use QT7.2 with OSX.4.10. It may be that you missed out on the later small update to QT7.2..... ? Another factor I found was that some little while later I again had a problem so I again installed QT7.2 and over-installed FCP5.1.4 which has resolved my problems for the time being. Worth a try if you still can't get through on the DAC.
    Ron.

  • Unable to capture video from webcam in JMF in xlet

    hi
    I am unable to capture video from webcam in an Xlet. I am using Xletview to run Xlet. The method CaptureDeviceManager.getDeviceList(vidformat) returns empty array. Which videoformat should I use and why do I get empty array?
    Thanks
    Rajesh

    MHP and OCAP only use JMF 1.0, which does not include support for capturing video. You will not be able to do this in any current MHP/OCAP imlementation that I know of.
    Steve.

  • Unable to capture video from webcam in JMF

    hi
    I am unable to capture video from webcam in an Xlet. I am using Xletview to run Xlet. The method CaptureDeviceManager.getDeviceList(vidformat) returns empty array. Which videoformat should I use and why do I get empty array?

    MHP and OCAP only use JMF 1.0, which does not include support for capturing video. You will not be able to do this in any current MHP/OCAP imlementation that I know of.
    Steve.

  • What are the settings for capturing video from Canon HV20

    Hi All,
    I want to capture video from Canon HV20 with Premiere Elements 11. What kind of settings should I use to capture the video with full information?
    Here is what I did:
    1) According the manual, I went to Capture settings panel (Edit > Project Settings > Capture) and selected HDV as capture format, because my video is at high definition.
    2) In addition, I checked "Capture to Timeline" and "Split Scenes by cotent".
    Are these settings enough?
    Thanks.

    HV20user
    Sounds reasonable, using Add Media/HDV Camcorder, but....
    Have you reviewed the Adobe write up on Premiere Elements 11 DV and HDV capture firewire into it.
    http://help.adobe.com/fr_FR/premiereelements/using/WS5CDA0F91-60F1-4b79-ABF6-E9E75F498DB2. html#WS2AF26FB5-4C63-4c46-9DB3-7249558F6528
    The mention of Get Media instead of Add Media makes me wonder if the video's instructor was demo'ing from Premiere Elements 10, but...
    Major factors have always included having Premiere Elements project preset set correctly to correspond to your camera settings...For HDV data capture firewire...
    NTSC HDV HDV 1080p30 or PAL HDV HDV 1080p25 depending on if you are targeting a NTSC or PAL area where frame rates are typically a consideration.
    I had not done any DV or HDV data capture firewire into Premiere Elements. But, Premiere Elements 11's take over of the project preset setting would encourage me to encourage you to verify your project settings before the capture.
    There are probably many more, but the following is online discussion of one Canon HV20 issue
    http://forum.videohelp.com/threads/316970-video-capture-problems-HV20-camcorder-is-control led-but-no-video-capture
    If you experience difficulty with the HDV capture fireware into Premiere Elements 11, you might consider what some others have done in this regard, that is, use HDVSplit for the capture firewire and then import the split (.m2t) clips "Add Media" into Premiere Elements 11 with the appropriate HDV HDV 1080p (1440 x 1080 HD anamorphic 16:9) project preset.
    Please update us on your progress when you get a chance.
    Thanks.
    ATR

Maybe you are looking for