Page 1 of 1

DeckLink and AVFoundation

PostPosted: Mon Nov 17, 2014 12:04 am
by Joe Bay
I'm looking to get the live video from a DeckLink into Xcode / AVFoundation as a AVCaptureInput. Is this possible?


I can see 'Blackmagic' as a device, but I get a black screen when viewing it. Is this more complicated then I think? Also, am I going to have to be using the API to write a custom plug-in for it to work?


Thanks for the help,
Joe

Re: DeckLink and AVFoundation

PostPosted: Tue Nov 18, 2014 8:11 pm
by Bruce Payan
I have been on these forums for a number of months asking for some manner of an AVFoundation-based solution from BM -- or, at the very least, some sample code for capture and output.

So far, no dice.

A heads up... there is an AVFoundation thread in here stating that 720p is the maximum capture resolution.
viewtopic.php?f=3&t=21483&p=134391&hilit=AVFoundation#p134391

Bruce.

Re: DeckLink and AVFoundation

PostPosted: Thu Nov 20, 2014 4:59 pm
by Andrzej Hijewski
Hi Joe,

If you use UltraStudio Mini Recorder you can use avfoundation and avsession to capture and record movie clip. But if you have to use another ultrastudio or decklink you have to use decklink SDK.

You can record 1080p and 720p na avfoundation and decklink SDK.

Re: DeckLink and AVFoundation

PostPosted: Wed Dec 03, 2014 11:41 am
by deOmair
Thanks for the help

Re: DeckLink and AVFoundation

PostPosted: Thu Dec 04, 2014 4:32 am
by deOmair
Is this more complicated then I think?

Re: DeckLink and AVFoundation

PostPosted: Sun Dec 07, 2014 8:44 pm
by Joe Bay
I see. I got the SDK and am using the demo app "CapturePreview" to view my source (DeckLink Studio 2). What I really need is to get it into Core Animation. I want a CALayer of the Blackmagic source. Is this possible?

As of now, it's drawing a view with:

CreateCocoaScreenPreview(previewView);

I'm guessing I don't want to be using a preview but an actual output. Any ideas?

Re: DeckLink and AVFoundation

PostPosted: Tue Jan 27, 2015 8:12 pm
by thomasgodon
give the capture example a look. if you get an incoming frame get the pixel data and pass it trough the CALayer.

Re: DeckLink and AVFoundation

PostPosted: Wed Feb 18, 2015 1:01 am
by Sami Dalati
Hi
I m trying to run the sample code CapturePreview on MacPro. The code runs but the video window does not show anything. When the start button is clicked i get an error message "this application was unable to select the video mode, perhaps the selected device is currently in use".

Note that the video preview works fine on BM media studio. So far I m using the sdk to grab the frames and convert them to openCV Mat and then do some processing. The extracted images work fine but the video preview does not even in openCV! Am i missing a driver?

The sample code works fine on Windows.

Your help is muchooo appreciated