Decklink SDK SDI Camera Control - Auto Exposure

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

einar-adolfsen

  • Posts: 2
  • Joined: Mon Feb 18, 2019 11:52 am
  • Real Name: einar adolfsen

Decklink SDK SDI Camera Control - Auto Exposure

PostMon Feb 18, 2019 12:16 pm

I’m trying to use the Decklink SDK on windows using Blackmagic SDI Camera control protocol to change auto exposure camera settings. A sdi cable is connected to sdi out port on Decklink Card and the other end to the SDI in port on BlackMagic micro studio4.

From:
BlackMagic micro studio 4k>menu>Camera>Auto Exposure = Manual Trigger
To:
BlackMagic micro studio 4k>menu>Camera>Auto Exposure = Iris + Shutter

Manuals:
[1] BlackMagicCameraControl.pdf (page 3-11),
[2] ATEM_Switches_Operation_Manual.pdf (page 141-148)

Environment:
Windows
BlackMagic micro studio 4k>menu>Setup>Camera Number = 1
SDI connection: Decklink SDI 4k, sdi out ---------- sdi cable-------- sdi in, Blackmagic micro studio 4k
DeckLink sdk: https://github.com/kdienes/decklink-sdk
Example project: \decklink-sdk-master\Examples\Win\VancOutput.vcxproj
Cpp file: VancOutput.cpp

Modifying VancOutput.cpp
I’m able to set shutter speed from the example in the manual to 1/100 or 1/250:

// 1/100 1/250
// shutter 0x10 0x25
// speed 0x27 0x10
INT8_UNSIGNED shutter = 0x10;
INT8_UNSIGNED speed = 0x27;
const INT8_UNSIGNED kSDIRemoteControlData[12] = { 0x00, 0x08, 0x00, 0x00, 0x01, 0x05, 0x03, 0x00, shutter, speed, 0x00, 0x00 };

When trying to set Auto Exposure to iris + shutter, nothing happens
I'm new to the protocol, so I would be :D if anyone could help me out. What am I doing wrong here?
// auto exposure
// [destination, length, command, reserved, category, parameter, type, operation mode ]
// [1 5 0 0 1 10 1 0 3]
INT8_UNSIGNED destination = 0x01; // send to all cameras, current test camera setup>Camera number = 1
INT8_UNSIGNED length = 0x05; // number of bytes after reserved, so array length - 4
INT8_UNSIGNED command = 0x00; // not clear, is set to 0x00 assign, 0x01 toggle
INT8_UNSIGNED reserved = 0x00; // reserved should always be 0x00
INT8_UNSIGNED category = 0x01; // autofocus ID = 1.10 category = 0x01, the hole number in ID
INT8_UNSIGNED parameter = 0x10; // autofocus ID = 1.10 parameter is the fraction of ID, parameter = 0x10
INT8_UNSIGNED type = 0x01; // manual says int8, should be signed byte
INT8_UNSIGNED operation = 0x00; // operation 0x00 assign parameter value, 0x01 toggle parabeter value

// data
// auto exposure modes : 0x00 manual trigger, 0x01 = iris, 0x02= shutter, 0x03 = iris + shutter, 0x04 = shutter + irs
INT8_UNSIGNED autoExposureMode = 0x03;

const INT8_UNSIGNED kSDIRemoteControlData[9] = { destination, length, command, reserved, category, parameter, type, operation, autoExposureMode};
Offline

Cameron Nichols

Blackmagic Design

  • Posts: 154
  • Joined: Mon Sep 04, 2017 4:05 am

Re: Decklink SDK SDI Camera Control - Auto Exposure

PostFri Feb 22, 2019 2:54 am

Hi Einar,

The SDK you are referencing is very old (10.7), can you try using with Desktop Video SDK 10.11.4. I have confirmed that VancOutput to Blackmagic Micro Studio Camera 4K will correctly set auto-exposuse with the following modifications:

const INT8_UNSIGNED kSDIRemoteControlData[9] = { 0x01, 0x05, 0x00, 0x00, 0x01, 0x0a, 0x01, 0x00, 0x00 }; // Set to manual trigger
or
const INT8_UNSIGNED kSDIRemoteControlData[9] = { 0x01, 0x05, 0x00, 0x00, 0x01, 0x0a, 0x01, 0x00, 0x03 }; // Iris + Shutter

Confirmed via menu overlay. Running Desktop Video 10.11.4, Micro Studio Camera 4K v4.7.1.

Regards
Cameron
Offline

einar-adolfsen

  • Posts: 2
  • Joined: Mon Feb 18, 2019 11:52 am
  • Real Name: einar adolfsen

Re: Decklink SDK SDI Camera Control - Auto Exposure

PostWed Feb 27, 2019 11:18 am

Hi Cameron

Thank you for helping me out :)

Decklink SDK(10.7)
Looks as I’ve got the parameter wrong, changing from 0x10 to 0x0a sets auto exposure :shock: :). I did not realize that we should use hex values.

Desktop Video 10.11.4 (Blackmagic_Decklink_SDK_10.11.4.zip)
I’ve tried to set auto exposure from this version, but the VancOutput example is not able to set auto exposure nor shutter speed (exits with code 1).
Do you I have to upgrade the firmware of our camera?

Regards
Einar

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 1 guest