3D Keying

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

salzfisch

  • Posts: 2
  • Joined: Mon Dec 07, 2020 10:04 am
  • Real Name: Peng Liu

3D Keying

PostTue Dec 08, 2020 1:06 pm

Hi all,

I am using Decklink 8k Pro to capture and display 3D videos. The card is configured to SDI 1 & 2 in, SDI 3 &4 out (two channels for 3D input and two for output).
I have already implemented adding a single overlay onto the 3D output with internal keying. Now I'm wondering how to add 3D overlays onto the 3D video output, that is, add left and right overlays separately for each output channels. Do I need to implement the IDeckLinkVideoFrame3DExtensions interface then create a 3D frame used for keying?

Thank you in advance!
Offline

Cameron Nichols

Blackmagic Design

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

Re: 3D Keying

PostMon Dec 14, 2020 12:00 am

Hi Peng,

Dual-link 3D internal keying is not a supported feature.

You can however configure the DeckLink 8K Pro with 2 sub-devices full-duplex profile and treat each channel separately - SDI 1 In - SDI 2 Out (left-eye) and SDI 3 In - SDI 4 Out (right-eye). You then schedule left and right key frames for each sub-device as you would for a single device.

You should also look at implementing with the Synchronized Playback feature (refer to 2.4.13.2 in the SDK Manual and also SynchronizedPlayback example) to ensure that the scheduled stream times for left and right channels are frame aligned.

Regards
Cameron
Offline

salzfisch

  • Posts: 2
  • Joined: Mon Dec 07, 2020 10:04 am
  • Real Name: Peng Liu

Re: 3D Keying

PostMon Jan 18, 2021 7:32 pm

Cameron Nichols wrote:Hi Peng,

Dual-link 3D internal keying is not a supported feature.

You can however configure the DeckLink 8K Pro with 2 sub-devices full-duplex profile and treat each channel separately - SDI 1 In - SDI 2 Out (left-eye) and SDI 3 In - SDI 4 Out (right-eye). You then schedule left and right key frames for each sub-device as you would for a single device.

You should also look at implementing with the Synchronized Playback feature (refer to 2.4.13.2 in the SDK Manual and also SynchronizedPlayback example) to ensure that the scheduled stream times for left and right channels are frame aligned.

Regards
Cameron


Hi Cameron,

thank you! I have successfully added left and right key frames respectively using the 2 sub-devices as you recommended.

However, a new problem occurs. As you know, we are trying to implement an AR application by adding left and right overlays onto the video frames, which are captured from a 3D camera and automatically looped through onto the 3D screen. We also need to forward these captured video frames to other applications, so that a callback function: VideoInputFrameArrived is required. However, after we switch to this new configuration with 2 sub-devices without changing the pixel format and display mode, we always receive the error of "no input signal" when we check the bmdFrameHasNoInputSource flag for incoming video frames.

We also tried the Capture sample in the SDK package and enumerated all possible display modes and pixel formats, but still even received the "no input signal" error.

I am not sure if this is the problem with the timestamp of frames. Because the section Synchronized Playback of SDK manual mentioned it is not necessary for DeckLink 8K Pro to set a common reference.

Thank you again!


Here are some main code snippets we are currently using:
Code: Select all
// setup
this->m_DeckLinkInput[i]->DoesSupportVideoMode(
        bmdVideoConnectionUnspecified,
        this->m_Mode, // bmdModeHD1080p50
        this->m_PixelFormat, // bmdFormat8BitYUV
        bmdNoVideoInputConversion,
        bmdSupportedVideoModeDefault,
        //bmdSupportedVideoModeDualStream3D,
        NULL,
        &result);

thi->m_DeckLinkOutput[i]->DoesSupportVideoMode(
            bmdVideoConnectionUnspecified,
            this->m_Mode, //bmdModeHD1080p50
            this->m_PixelFormat,// bmdFormat8BitYUV
            bmdNoVideoOutputConversion,
            bmdSupportedVideoModeDefault,
            NULL,
            &displayModeSupported);
...
// callback function:
HRESULT DeckLinkInputCallback::VideoInputFrameArrived(IDeckLinkVideoInputFrame* videoFrame, IDeckLinkAudioInputPacket* audioFrame)
{
    void*                               frameBytes;
    if (videoFrame)
    {
        if (videoFrame->GetFlags() & bmdFrameHasNoInputSource)
        {
            fprintf(stderr, "No input signal detected\n");
        }
        else
        {
        ...
        }
    }
}
Offline

SBodenstedt

  • Posts: 2
  • Joined: Thu Feb 25, 2021 1:10 pm
  • Real Name: Sebastian Bodenstedt

Re: 3D Keying

PostThu Feb 25, 2021 1:40 pm

Dear all,

to elaborate on Peng's original question:
We have looked at more detail at our setup. While I am no expert in regards to SDI and 3D, I think our problem is the following: The camera we are capturing from outputs a Dual Stream 3D video channel. I am assuming in this case, it means that the cables don't actual each carry just the signal for left/right eye, but instead the two signals only make sense to the capture card when combined. Can anyone confirm this? I assume this is the case, as when we use separate devices for each cable, no input is detected. Is there a way to separate the two signals so that the idea for keying as suggested by Cameron can be implemented?

Thank you for your help!

Best,

Sebastian

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 31 guests