ofxBlackMagic output

Hi all.

I’m currently doing a project using 4 x BlackMagic UltraStudio Mini Monitor’s -> SDI -> projectors.

I’ve had a go at hacking Kyle’s ofxBlackMagic addon to do output but am getting stuck with transferring pixel data to the BlackMagic frame data.

Essentially I’m trying to build what BlackSyphon already does (because it’s not open source and you can’t save your config).

I’ve successfully got it recognising the output devices and setting the output format and that’s all happy, now I’m attempting to getPixels from an FBO and output it to the device.

With all the pixels / buffers / unsigned char vectors etc I’m getting confused. Has anyone had any experience with the BlackMagic SDK or this sort of thing or can point me in the direction of getting my head around it? I feel like I’m missing something obvious due to inexperience with the data types. Thanks in advance.

Here’s the point in the code I’m a bit stuck with:

HRESULT result = deckLinkOutput->CreateVideoFrame(
                                                  1280, 720, 1280*4,
                                                  bmdFormat8BitBGRA, bmdFrameFlagDefault,

if (result != S_OK) {
        ofLogError("DeckLinkController") << "create video frame error";    

//TODO: get ofPixel data from FBO to format for BlackMagic SDK


videoFrame = NULL;

I had a very quick hack at this a few weeks ago. I got image out but did not optimise the process.

Here it is

1 Like

Thanks fresla! Much appreciated.
I’ve added your code converting pixels to the buffer into my app and it’s working well.
My fork is here: https://github.com/griv/ofxBlackmagic (I haven’t added an example though)

Another possibility for Windows apps and NVIDIA compatible graphics is “Spout” http://spout.zeal.co and “BlackSpout” https://magicmusicvisuals.com/forums/viewtopic.php?f=6&t=201

It does what BlackSyphon does. I am not sure about multiple devices or whether you can save configurations, but you could ask on the Magic forum.
. . .