INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3   Go Down

Author Topic: Blackmagic Design devices - how do we support them better  (Read 1006 times)

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10926
  • Dogs of the world unite!
Re: Blackmagic Design devices - how do we support them better
« Reply #50 on: November 06, 2024, 03:27:41 pm »

Thanks.  I read the text you quoted, and did not pay much attention because it requires having the device start streaming, then detect changes in a callback.  I was looking for a way of getting the current/default format before the device starts.

I tried setting it in the DS Filter's pop up but it does not "stick" between sessions, and changing it once the graph is setup does not work. 

Did you try to get this through right-click menu while the video is playing in MC?  That will not stick.  To get the format saved, you need to run "Configure Device".  This is accessed through right-clicking Television tree branch, and selecting the device from the list, and clicking "Configure..." button.  Once the dialog window pops up, go to Advanced section and double-click "Video Capture pin"
Logged
Yaobing Deng, JRiver Media Center

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #51 on: November 06, 2024, 04:06:05 pm »

Yeah, neither method works and it always reverts.

I can make the change on the Video Capture Pin (under the TV Configure Device) just fine, but it seems to revert to the default as soon as I leave MC's "Configure Device" dialogue.

I'm only guessing on the various calls and hope the sample code sheds some light.  Otherwise, I'd suggest just posting over on the BMD's Dev Forum.  It's a bit like Interact and has both users and BM staff that respond pretty well to most questions.
Logged
JRiver CEO Elect

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10926
  • Dogs of the world unite!
Re: Blackmagic Design devices - how do we support them better
« Reply #52 on: November 07, 2024, 09:16:56 am »

Can you find this registry key?

Code: [Select]
HKEY_CURRENT_USER\SOFTWARE\JRiver\Media Center 33\TV Settings\<device id>\MediaType
where <device id> should look similar to this for your device:

@device:sw:{860BB310-5D01-11D0-BD3B-00A0C911CE86}\{44A8B5C7-13B6-4211-BD40-35B629D9E6DF}

except that some characters are replaced with '_'.

That location is where we save the format after you run the configuration tool.  If it is there, but we still get the wrong value, it means the device reverts before we even have a chance to save.

I will see if I can get it going using another method.
Logged
Yaobing Deng, JRiver Media Center

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #53 on: November 07, 2024, 01:50:05 pm »

I'm not sure if it matters but the device path is "JRiver" not "JRiver"

Code: [Select]
Computer\HKEY_CURRENT_USER\Software\JRiver\Media Center 33\TV Settings\@device:sw:{860BB310-5D01-11D0-BD3B-00A0C911CE86}_{44A8B5C7-13B6-4211-BD40-35B629D9E6DF}
Attached is the registry settings for this device (note: It looks pretty identical to the other devices).

Update: I can make the change on the Video Capture Pin (under the TV Configure Device) just fine, and it stays set while I'm in the "Configure Device" dialogue (eg I can go back into the pin and see it is still set), but it seems to revert to the default as soon as I leave MC's "Configure Device" dialogue.

Logged
JRiver CEO Elect

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10926
  • Dogs of the world unite!
Re: Blackmagic Design devices - how do we support them better
« Reply #54 on: November 07, 2024, 02:39:01 pm »

I meant for you to look for the MediaType sub key.

In any case, I found a line of code that is too restrictive, which might have led to skipping the saving of info to the registry.


Logged
Yaobing Deng, JRiver Media Center

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #55 on: November 07, 2024, 02:43:04 pm »

I'll give it a try in a sec, but FYI - there is no MediaType sub key at all for the Decklink entries, but there is one for the WDM ones.
Logged
JRiver CEO Elect

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #56 on: November 07, 2024, 02:52:25 pm »

No change in the behavour (setting, playback etc).

No "MediaType" sub key was added to the registry either.

Logged
JRiver CEO Elect

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #57 on: November 07, 2024, 02:54:39 pm »

Do you want me to try copying the MediaType sub key from the BMD WDM over to the Decklink?
Logged
JRiver CEO Elect

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10926
  • Dogs of the world unite!
Re: Blackmagic Design devices - how do we support them better
« Reply #58 on: November 07, 2024, 02:56:13 pm »

Please post a log.  Look for "CAnalogTVDevice::DisplayVideoCapturePinPropPages" entries in the log file.
Logged
Yaobing Deng, JRiver Media Center

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10926
  • Dogs of the world unite!
Re: Blackmagic Design devices - how do we support them better
« Reply #59 on: November 07, 2024, 03:05:23 pm »

I'm not sure if it matters but the device path is "JRiver" not "JRiver"


We kept the old name in registry settings.  So J and R separated by a period and a space  is correct for registry paths.  (and J and R separated by just a space is correct for program installation folder name.)
Logged
Yaobing Deng, JRiver Media Center

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #60 on: November 07, 2024, 03:06:07 pm »

Post of log of doing what?
- Trying to set the Pin,
- Starting Playback

PS - I copied the MediaType subkey from the WDM to the Decklink.  It certianly changed the input details in JRVR, but still a black screen.  The video pin was then showing as blank (so it was not set to something it had in it's list).
Logged
JRiver CEO Elect

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #61 on: November 07, 2024, 03:10:28 pm »

Got it working!

That copied MediaType puts the Decklink into UHD@50fps mode, and when I feed it that signal it now plays just like the WDM version.

Logged
JRiver CEO Elect

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10926
  • Dogs of the world unite!
Re: Blackmagic Design devices - how do we support them better
« Reply #62 on: November 07, 2024, 03:12:09 pm »

Post of log of doing what?
- Trying to set the Pin,
- Starting Playback

PS - I copied the MediaType subkey from the WDM to the Decklink.  It certianly changed the input details in JRVR, but still a black screen.  The video pin was then showing as blank (so it was not set to something it had in it's list).

Log of trying to set format on Pin property page.
Logged
Yaobing Deng, JRiver Media Center

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10926
  • Dogs of the world unite!
Re: Blackmagic Design devices - how do we support them better
« Reply #63 on: November 07, 2024, 03:14:38 pm »

let's back step a little.  Delete the MediaType subkey and try running the property page and setting the video format.  Then post a log.
Logged
Yaobing Deng, JRiver Media Center

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #64 on: November 07, 2024, 03:15:01 pm »

This is the registry with the copied WDM MediaType that works with UHD Output.

It is interesting you can set this format (and it works), but there are no UHD options listed in the drop down for the Video Pin (only up to 2K).

I'll grab the log trying to set the pin next.
Logged
JRiver CEO Elect

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #65 on: November 07, 2024, 03:15:23 pm »

let's back step a little.  Delete the MediaType subkey and try running the property page and setting the video format.  Then post a log.

One sec.
Logged
JRiver CEO Elect

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #66 on: November 07, 2024, 03:17:25 pm »

Here it is.
Logged
JRiver CEO Elect

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10926
  • Dogs of the world unite!
Re: Blackmagic Design devices - how do we support them better
« Reply #67 on: November 07, 2024, 03:24:45 pm »

I can not find any entries with "DisplayVideoCapturePinPropPages".  Did you use Configure dialog to set the properties?
Logged
Yaobing Deng, JRiver Media Center

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #68 on: November 07, 2024, 03:30:40 pm »

This are my steps:

- "Television" (on the left main window)
- "TV Options..." button (main window)
- "... Manage Devices.." link
- Select "Decklink Video Capture" entry in the "Manage Television Devices" Dialg
- Press "Configure" button
- Double click on "Video Capture Filter..."
- From the "Properties" Window of slected a Video Format in the Drop Down --> Press Apply  --> Press OK
- Then OK / OK /OK to get back to the Main MC UI.


Logged
JRiver CEO Elect

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #69 on: November 07, 2024, 03:31:12 pm »

Is this the correct sequence?  If so I'll try again and grab another log.
Logged
JRiver CEO Elect

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10926
  • Dogs of the world unite!
Re: Blackmagic Design devices - how do we support them better
« Reply #70 on: November 07, 2024, 03:39:08 pm »

Almost correct.

"Video Capture Filter..." should have been "Video Capture Pin..."
Logged
Yaobing Deng, JRiver Media Center

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #71 on: November 07, 2024, 03:42:11 pm »

I see the following.

Unless, I need to delete and reset up the Device (it was added some time ago when we first looked at this)?
Logged
JRiver CEO Elect

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #72 on: November 07, 2024, 03:44:45 pm »

The WDM Version says "Video Capture Pin..."
Logged
JRiver CEO Elect

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10926
  • Dogs of the world unite!
Re: Blackmagic Design devices - how do we support them better
« Reply #73 on: November 07, 2024, 03:52:46 pm »

I see.  They don't have a  property page for that.  Hmm, the video output pin settings are expected to come from there  :(

I will think of something tomorrow.
Logged
Yaobing Deng, JRiver Media Center

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #74 on: November 07, 2024, 03:54:50 pm »

Thanks - I'm around :)
Logged
JRiver CEO Elect

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10926
  • Dogs of the world unite!
Re: Blackmagic Design devices - how do we support them better
« Reply #75 on: November 07, 2024, 04:03:32 pm »

Thanks.
Logged
Yaobing Deng, JRiver Media Center

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #76 on: November 07, 2024, 04:13:29 pm »

I see.  They don't have a  property page for that.  Hmm, the video output pin settings are expected to come from there  :(

I will think of something tomorrow.

...and it supports more than is what is exposed on that Filter Dialog anyway.
Logged
JRiver CEO Elect

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10926
  • Dogs of the world unite!
Re: Blackmagic Design devices - how do we support them better
« Reply #77 on: November 08, 2024, 01:18:19 pm »

I did two things today:

1. Do not use any hard-coded format, if we have not already saved a format in the registry.  I don't remember why we needed the hard-coded format, maybe for some devices.  Now I disallow that for Blackmagic devices.

2. Save video format after user configured "Video Capture Filter..." when "Video Capture pin..." does not exist.  I am guessing this devices uses the "Capture Filter" property pages, instead of a separate "Capture pin" property page.

To test the ideas, first wipe out the "MediaType" subkey from the registry, and try playing the device and see if it works.  It it works, it means the previously hard-coded format is not supported and that is the reason for it not working.  This tests the change #1 above. Hope it works.

Regardless of whether the above test succeeds, run Configure on the device and double-click "Video Capture Filter..." to bring up the capture filter property page.  Make any changes you like, and click Apply/OK.

Send a log.


Logged
Yaobing Deng, JRiver Media Center

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #78 on: November 08, 2024, 02:15:25 pm »

First test is just to pick and set some format on the filter (1080/50p 4:2:2 as there is no UHK option exposed).  This seems to work... I've attached the:
- Log
- The MediaType Registry settings that got created.

Next to test playback.
Logged
JRiver CEO Elect

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #79 on: November 08, 2024, 02:22:55 pm »

...and here is the log with MC correctly setting the Ultrastudio to 1080p50 and then playing the 1080p stream (with audio) that I was feeding it.

Nice work.
Logged
JRiver CEO Elect

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #80 on: November 08, 2024, 02:24:10 pm »

As expected - I also tried sending a UHD stream and this "played" but with a black screen (as the UltraStudio was in 1080p mode). 
Logged
JRiver CEO Elect

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #81 on: November 08, 2024, 03:08:00 pm »

To test the ideas, first wipe out the "MediaType" subkey from the registry, and try playing the device and see if it works.  It it works, it means the previously hard-coded format is not supported and that is the reason for it not working.  This tests the change #1 above. Hope it works.

Here is the log for this test.  It did not work in that:
- Nothing was created in the Registry
- Ultra Studio was set to the default 525i
- It played with a blank screen

Log attached
Logged
JRiver CEO Elect

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #82 on: November 08, 2024, 03:15:42 pm »

Also testing the following to see if it helps (it does not):
- Play the WDM : Changed the Ultra Studio to 1080p mode and playback was correct in MC, then Stop and:
- Play the Decklink : Changed the Ultra Studio back to 525i and the input was not correct and a black screen in MC (with sound).
Logged
JRiver CEO Elect

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10926
  • Dogs of the world unite!
Re: Blackmagic Design devices - how do we support them better
« Reply #83 on: November 08, 2024, 06:51:44 pm »

It appears that the device, when we do not set the video format, defaults to 720x486x16 bit '0x59565955'.  We have to set the format (i.e. via Video Capture Filter configuration), in order to play.  Well, as least we now know how to set it.
Logged
Yaobing Deng, JRiver Media Center

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10926
  • Dogs of the world unite!
Re: Blackmagic Design devices - how do we support them better
« Reply #84 on: November 08, 2024, 07:03:03 pm »

As expected - I also tried sending a UHD stream and this "played" but with a black screen (as the UltraStudio was in 1080p mode).

So you have to configure the device each time a stream with a different resolution is sent?  And the device does not let you set it to UHD.  They need to update this device driver.
Logged
Yaobing Deng, JRiver Media Center

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #85 on: November 08, 2024, 11:08:54 pm »

It appears that the device, when we do not set the video format, defaults to 720x486x16 bit '0x59565955'.  We have to set the format (i.e. via Video Capture Filter configuration), in order to play.  Well, as least we now know how to set it.

Correct, but you can also set it programmatically.

So you have to configure the device each time a stream with a different resolution is sent?  And the device does not let you set it to UHD.  They need to update this device driver.

- Correct,
- Half Correct:  There Filter's UI does not expose any UHD options, but you can set it programmatically to UHD (as I by copying the MediaType registry)
- Not sure:  I think the Decklink driver is expecting to be programatically controlled (and not via the Filter's UI)

---------------------------------------------------------

I'm confused on what we are trying to achieve with these BlackMagic devices and the two different filters that are exposed, seem to offer different things:

Isn't their WDM filter the "auto everything" driver as?
- Requires nothing to be set,
- Auto configures the UltraStudio to match in incoming signal format,
- Passes through the video and audio to MC just fine.

Vs

The Decklink filter which seems to need you to programmatically control it as:
- Nothing is automatic,
- Setting it via the Filter does keep it between sessions, but you have to manually change it manually for different input specs
- Not all the capabilities are exposed in the filter's UI but it does support everything (as we can see in the log and in my manual testing).

I guess the bit I do not understand, and my Q's would be:
1) What is wrong with just using the WDM driver?
2) What is the advantage of getting the Decklink driver working?
3) Aren't you still going to need an encoding filter to get a useable H264/H265/AV1 file (or ffmpeg/avcodec or even some way of getting the WDM or the Decklink driver to trigger that with the GPU.... if that is even possible... no idea)?

Logged
JRiver CEO Elect

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #86 on: November 09, 2024, 12:19:25 am »

Having a play using ffmpeg's dshow capture and encoding to MP4 (AVC in this example), I can confirm that both methods can capture a UHD input signal:

Decklink Filters:  You needed to set the Video Size/Framerate (or else it "defaults" and you get a black video).
   ffmpeg -f dshow -video_size 3840x2160 -framerate 50 -rtbufsize 702000k -i video="Decklink Video Capture":audio="Decklink Audio Capture" out.mp4

WDM Filters: You don't need to set anything.
   ffmpeg -f dshow -rtbufsize 702000k -i video="Blackmagic WDM Capture":audio="Line In (Blackmagic UltraStudio 4K Mini Audio)" out.mp4

Apart from that, the rest is the same.

Note: If I was to use ffmpeg for real use I'd be setting a bunch of flags as part of the encoding for quality etc.
Logged
JRiver CEO Elect

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10926
  • Dogs of the world unite!
Re: Blackmagic Design devices - how do we support them better
« Reply #87 on: November 11, 2024, 11:17:41 am »

Thank you Nathan.

With your help we now have the following changes in the next build:

1. Changed: For video capturing (on Windows, using DirectShow), if the device does not offer "Video Capture Pin" property page, MC will save video output format data upon user exiting from "Video Capture Filter" property page. This solves the issue of MC never saving the output format that the user set on the property page.
2. Fixed: DirectShow device "DeckLink Video Capture" from Blackmagic Design did not work.
Logged
Yaobing Deng, JRiver Media Center

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10926
  • Dogs of the world unite!
Re: Blackmagic Design devices - how do we support them better
« Reply #88 on: November 11, 2024, 11:34:16 am »

Good question regarding WDM filter vs. DeckLink filter.  Indeed it appears that the latter requires the app to do more setup.

What I will do is to create a dialog window that will list all input lines (if the device has multiple) and input formats for users to choose from, and then with the chosen input format, list all compatible output formats for the users to choose from.  Only after the users make such selections the device can work. So the dialog window might pop up every time the device is loaded (with the option to turn it off) and it will also be available on the configuration window.
Logged
Yaobing Deng, JRiver Media Center

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #89 on: November 11, 2024, 01:56:27 pm »

Sounds good.  It may be worth adding a "remember" or "make default".

I'll be very interested in see how the "output" format works.  So far, all I've seen is it passes through the input.  My unit certainly does not have any inbuit HW encoding capability, unless it just uses the PC's existing encoding capabilities (CPU/nvidia etc).  Will you also be asking the user to set the Colour Space (709/HLG/PQ)?
Logged
JRiver CEO Elect

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10926
  • Dogs of the world unite!
Re: Blackmagic Design devices - how do we support them better
« Reply #90 on: November 12, 2024, 09:12:53 am »

Sounds good.  It may be worth adding a "remember" or "make default".

Yes, I will let the settings persist, and let users to choose whether to run settings every time.

Quote
I'll be very interested in see how the "output" format works.  So far, all I've seen is it passes through the input.  My unit certainly does not have any inbuit HW encoding capability, unless it just uses the PC's existing encoding capabilities (CPU/nvidia etc).
This is not clear to me either.  By reading their documentation, I get the impression that you set input format for recording, and output format for viewing.  Since the DirectShow filters only expose "Capture" pin, not "Preview" pin, only the input format is used? 

Quote
Will you also be asking the user to set the Colour Space (709/HLG/PQ)?

I am still in the process of understanding what is possible.  I will add it if I figure out how. :)
Logged
Yaobing Deng, JRiver Media Center

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #91 on: November 12, 2024, 02:13:24 pm »

Tested the changes to date rolled into v40.  Works as expected! :) 

I'll also do some digging on the other questions and report back.

Logged
JRiver CEO Elect

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #92 on: November 12, 2024, 02:14:58 pm »

I found this in their FAQ on "How to output HDR Metadata"

Before attempting to capture or output HDR Metadata, a DeckLink API application should verify support for this feature, by querying the BMDDeckLinkSupportsHDRMetadata [1] attribute via the IDeckLinkAttributes [2] interface:

IDeckLinkAttributes *deckLinkAttributes = NULL;
if (deckLink->QueryInterface(IID_IDeckLinkAttributes, (void **)&deckLinkAttributes) != S_OK) {
    printf("Could not get the IDeckLinkAttributes interface\n");
    deckLinkAttributes = NULL;
    goto bail;
}

bool supportsHDR = false;
if (deckLinkAttributes->GetFlag(BMDDeckLinkSupportsHDRMetadata, &supportsHDR) == S_OK && supportsHDR) {
    // HDR is supported.
}
The IDeckLinkVideoFrameMetadataExtensions [3] interface provides methods to query metadata associated with a video frame, the presence of HDR metadata may be determined by checking the frame flags[4] for the presence of the bmdFrameContainsHDRMetadata [5] flag.

"2.7.63 Frame Metadata ID" enumerates the metadata items which may be queried via the IDeckLinkVideoFrameMetadataExtensions interface. The available HDR metadata includes the RGB primaries, whitepoint, EOTF, etc.

In order to output HDR metadata, the application will need to provide a class that implements both IDeckLinkVideoFrame [6] and IDeckLinkVideoFrameMetadataExtensions (in a similar way as 3D support requires an application to implement IDeckLinkVideoFrame3DExtensions, as demonstrated in the SignalGenerator SDK sample).

The custom video frame type should indicate the presence of HDR metadata by ensuring the IDeckLinkVideoFrame::GetFlags() [7] implementation returns bmdFrameContainsHDRMetadata, and implement IUnknown::QueryInterface() [8] for IDeckLinkVideoFrameMetadataExtensions.

This video frame class which implements the IDeckLinkVideoFrameMetadataExtensions interface may implement additional methods to set the HDR metadata fields as needed by the upper layers of the application.

When scheduling instances of the custom IDeckLinkVideoFrame for playback, the DeckLink API will query the frame flags to determine if the bmdFrameContainsHDRMetadata flag is set, and if so, retrieve the IDeckLinkVideoFrameMetadataExtensions implementation (via IUnknown::QueryInterface()). Assuming IUnknown::QueryInterface() is successful, IDeckLinkVideoFrameMetadataExtensions::Get*() will be called by the DeckLink API to retrieve the HDR metadata for output.
Logged
JRiver CEO Elect

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #93 on: November 12, 2024, 02:25:44 pm »

Found this older quote from a Blackmagic Design staff member.  As I suspected (though some of their models do have a HW encoder).

Quote
The DeckLinkAPI provides interfaces for the capture of uncompressed video and audio. It does not provide interfaces for capture to container formats such as .mp4.

You should consider using Media Express for capture or other 3rd party implementations such as FFmpeg to achieve this.

Edit - and this newer post:

Quote
The H265TestEncoder SDK sample provides code example for products that support capture with native H.265 hardware encoding in addition to uncompressed capture. The UltraStudio 4K Extreme will work with this sample, but not the DeckLink 8K Pro which supports only uncompressed capture.

Most BMD capture device don't have onboard HW encoding (and the ones that do only support H265)

Quote
In order to use H.264, your application will need to integrate code to interface the DeckLink SDK with an H.264 codec. You may find FileCapture/FilePlayback SDK samples useful as a reference.

He references the FileCapture/FilePlayback SDK samples which may be worth checking out (you can download the DesckLink SDK) from here - https://www.blackmagicdesign.com/developer/products/capture-and-playback/sdk-and-software
Logged
JRiver CEO Elect

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10926
  • Dogs of the world unite!
Re: Blackmagic Design devices - how do we support them better
« Reply #94 on: November 13, 2024, 08:56:33 am »

Thanks.

I installed the SDK a while back.  The HDR stuff was logged in the previous log files:

Quote
0266890: 40448: TV: BlackmagicWDMCapture::ExploreDecklinkAPI: BMDDeckLinkSupportsHDRMetadata is 1
0266890: 40448: TV: BlackmagicWDMCapture::ExploreDecklinkAPI: BMDDeckLinkSupportedDynamicRange is 1610612736 (HDRStaticPQ, HDRStaticHLG)
0266890: 40448: TV: BlackmagicWDMCapture::ExploreDecklinkAPI: Found IDeckLinkHDMIInputEDID interface
0266890: 40448: TV: BlackmagicWDMCapture::ExploreDecklinkAPI: bmdDeckLinkHDMIInputEDIDDynamicRange is 536870912 (HDRStaticPQ)
0266890: 40448: TV: BlackmagicWDMCapture::ExploreDecklinkAPI: Found IDeckLinkStatus interface
0266890: 40448: TV: BlackmagicWDMCapture::ExploreDecklinkAPI: bmdDeckLinkStatusDetectedVideoInputDynamicRange is 0 (SDR)

The interface that I have not tried is IDeckLinkVideoFrame for per-frame metadata. That seems to require us to move away from DirectShow entirely. Considering possible Mac and Linux support, moving away from DirectShow may be the good choice for these devices.
Logged
Yaobing Deng, JRiver Media Center

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #95 on: November 13, 2024, 02:02:36 pm »

Quote
bmdDeckLinkStatusDetectedVideoInputDynamicRange is 0 (SDR)
Sorry - missed this part (which was correct for the feed I was sending it).  I can test HLG / PQ if you want.

I also agree, that if you want to be cross platform then the Decklink API is the way to go.  Otherwise the existing work down is fine for Windows and achieves the same thing. 

What are your thoughts on the encoder?


Logged
JRiver CEO Elect

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4226
Re: Blackmagic Design devices - how do we support them better
« Reply #96 on: November 13, 2024, 02:38:01 pm »

I had one Q on this topic, hope it's ok to ask here as it's related to what you're doing (won't interrupt again with mention of another device)

can you state exactly what MC needs to see/use a capture card in terms of what it looks for in a directshow filter & how it puts the pins together into an output stream? in addition, in order to drive JRVR into HDR mode, what does it need? we know that https://github.com/defl/directshow_metadata_injector_filter/blob/main/cpp/directshow_metadata_injector_filter/lavfilters_side_data.h doesn't work as is so what else is required?

(context = I'm writing a filter for my own use that wraps the magewell sdk (https://www.magewell.com/sdk) into an implementation of directshow CSource & which can extract multichannel LPCM so it would be nice if I could get this working in MC too)
Logged

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10926
  • Dogs of the world unite!
Re: Blackmagic Design devices - how do we support them better
« Reply #97 on: November 14, 2024, 02:44:33 pm »

MC loads a WDM capture filter and associated filters and render the output pins.  The filters are loaded via Windows WDM device list, of category CLSID_VideoInputDeviceCategory.
Logged
Yaobing Deng, JRiver Media Center

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4226
Re: Blackmagic Design devices - how do we support them better
« Reply #98 on: November 14, 2024, 03:22:41 pm »

ok great, thanks. Does it support driver HDR metadata into JRVR yet or is this what you're working on as part of supporting the blackmagic devices?
Logged

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10926
  • Dogs of the world unite!
Re: Blackmagic Design devices - how do we support them better
« Reply #99 on: November 14, 2024, 04:47:14 pm »

We are working on HDR metadata.  It is still not clear how we are approaching it.
Logged
Yaobing Deng, JRiver Media Center
Pages: 1 [2] 3   Go Up