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 2996 times)

mattkhan

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

OK, will be great if it can be done in an open manner that lets a user provided filter give the info required to drive it
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72478
  • Where did I put my teeth?
Re: Blackmagic Design devices - how do we support them better
« Reply #101 on: November 18, 2024, 04:37:42 pm »

Matt,
I think you know that we don't intend for JRVR to be used by other applications.  I hope you understand.
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4256
Re: Blackmagic Design devices - how do we support them better
« Reply #102 on: November 18, 2024, 04:46:06 pm »

You misunderstand as it's not another application

I'm talking about a directshow capture filter to use as channel within MC television. I can already use the microsoft provided one for the card but that only supports stereo audio and doesn't expose the colourspace in a way that lets a renderer understand it, you have to use the api provided by the card manufacturer to do all that. Hence write one and then be able to use MC to fully access the card capabilities.

Put simply, it's exactly what Yaobing is doing for the blackmagic cards (which I don't use because they have limited support for the resolution/frame rate output by my cable box. I can't imagine why you'd want to restrict support to a particular card but obviously it's your software so that's your choice.
Logged

mattkhan

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

We are working on HDR metadata.  It is still not clear how we are approaching it.
regardless of whether you make it public api or not, I'm curious what are the downsides of the method of packing data into IMediaSideData (https://github.com/Nevcairiel/LAVFilters/blob/81c5676cb99d0acfb1457b8165a0becf5601cae3/include/IMediaSideData.h) are? it seems commonly used and pretty straightforward
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4256
Re: Blackmagic Design devices - how do we support them better
« Reply #104 on: November 23, 2024, 04:00:36 am »

FWIW I have my filter functional now and it seems to at least play in MC & I can see that JRVR is tonemapping without changing settings when fed with appropriate data so not sure you need to do anything other than simply integrate their API as a capture filter?

I haven't tackled attempting to handle changing format yet, e.g. my cable box (a virgin 360 aka LG horizon) will switch from sdr to hdr when I go from normal tv to something like apple+, atm I just plan to use its function to overlay an image as OSD to say "restart playback" but would JRVR cope with this? e.g. does it support https://learn.microsoft.com/en-us/windows/win32/directshow/dynamic-format-changes ?
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10958
Re: Blackmagic Design devices - how do we support them better
« Reply #105 on: November 23, 2024, 04:31:23 am »

JRVR is fine with dynamic format changes, if you need to change the allocator due to frame size or format changes, you may need to flush though (so all frames are returned to the allocator). Feel free to refer to LAV Videos format change logic https://github.com/Nevcairiel/LAVFilters/blob/master/decoder/LAVVideo/LAVVideo.cpp#L1500-L1589
Logged
~ nevcairiel
~ Author of LAV Filters

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4256
Re: Blackmagic Design devices - how do we support them better
« Reply #106 on: November 23, 2024, 05:50:07 am »

thanks for the link, will try to adapt/copy
Logged

jmone

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

I still think an encoder is going to be needed if you want to pause, record etc.  That uncompressed video stream bitrate is too high to write out to disc effectively and the resultant file is full of dropped frames.
Logged
JRiver CEO Elect

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10935
  • Dogs of the world unite!
Re: Blackmagic Design devices - how do we support them better
« Reply #108 on: November 27, 2024, 11:25:07 am »

What you are saying is that the hard disk is the limiting factor here.  A compressor and a decompressor shift load to CPU. That is what I thought too, as time-shifting writes many files to disk and then reads them back for displaying.
Logged
Yaobing Deng, JRiver Media Center

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10935
  • Dogs of the world unite!
Re: Blackmagic Design devices - how do we support them better
« Reply #109 on: November 27, 2024, 11:40:58 am »

Regarding HDR metadata, I posted the following a few days ago:

BMDDeckLinkSupportsHDRMetadata is 1
BMDDeckLinkSupportedDynamicRange is 1610612736 (HDRStaticPQ, HDRStaticHLG)
Found IDeckLinkHDMIInputEDID interface
bmdDeckLinkHDMIInputEDIDDynamicRange is 536870912 (HDRStaticPQ)
Found IDeckLinkStatus interface
bmdDeckLinkStatusDetectedVideoInputDynamicRange is 0 (SDR)


These are the static info that I found from API, and the result was for jmone's device. What I did not know was whether we need to deal with metadata for each frame. As far as I know, the WDM capture filter does not carry the metadata, so how do we pass the metadata? I suppose we need to synchronize the video frames that go to the renderer via DirectShow filters with what we find with the API?  That is why I thought a complete re-writing of the system (not using their WDM capture filter, like mattkhan is doing) is necessay?
Logged
Yaobing Deng, JRiver Media Center

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4256
Re: Blackmagic Design devices - how do we support them better
« Reply #110 on: November 27, 2024, 11:56:02 am »

It is transmitted per frame though clearly it changes rarely so I guess you could write a transform filter to sit on top of the provided capture filter (though in my experience, dealing with the media type and the filter negotiation is where all the work actually is, capturing the frame is simple in comparison)
Logged

jmone

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

What you are saying is that the hard disk is the limiting factor here.  A compressor and a decompressor shift load to CPU. That is what I thought too, as time-shifting writes many files to disk and then reads them back for displaying.

Kinda.  We are capturing uncompressed Video (RGB) and the data rates (see table) will be in many cases well over 10 Gbps Vs playing "normal" compressed Video (HEVC, AVC, MPEG, AV1 compressed files, discs, streams) which is normally well under 1 Gbps.  These uncompressed data rates:
- Can be too large to write out to a file in real time (eg dropped frames)
- Are too large to then be later played over a std 1Gbps network connection
- Takes up far too much disc space

My suggestion would be to write the uncompressed video stream via an encoder to a file (say MP4 using HEVC, AVC, whatever) and then play that as with any other "normal" compressed video file. 
Logged
JRiver CEO Elect

alext77

  • Recent member
  • *
  • Posts: 18
Re: Blackmagic Design devices - how do we support them better
« Reply #112 on: December 01, 2024, 07:09:59 am »

Hello.

Are you talking about DeckLink Mini Recorder 4K or DeckLink Quad HDMI Recorder ? Both ? Another BM product, in this case which one ?

Thanks.
Logged
I知 a Windows 10 pro user. Currently enjoying JRiver 33.

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14480
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #113 on: December 01, 2024, 02:09:23 pm »

I was testing with an UltraStudio 4K Mini, but it should work with any of their Capture cards/boxes that supports their SDK.  Keep in mind that each devices has their own HW config and limitations, such as:
- DeckLink Mini Recorder 4K - Max is UHD @ 30fps
- UltraStudio 4K Mini - needs a thunderbolt connector
etc

Note: None of these devices "allow capture from copy protected HDMI sources". 

Logged
JRiver CEO Elect

alext77

  • Recent member
  • *
  • Posts: 18
Re: Blackmagic Design devices - how do we support them better
« Reply #114 on: December 01, 2024, 11:36:17 pm »

I was testing with an UltraStudio 4K Mini, but it should work with any of their Capture cards/boxes that supports their SDK.  Keep in mind that each devices has their own HW config and limitations, such as:
- DeckLink Mini Recorder 4K - Max is UHD @ 30fps
- UltraStudio 4K Mini - needs a thunderbolt connector
etc

Note: None of these devices "allow capture from copy protected HDMI sources".

Thank you  :)
Logged
I知 a Windows 10 pro user. Currently enjoying JRiver 33.

alext77

  • Recent member
  • *
  • Posts: 18
Re: Blackmagic Design devices - how do we support them better
« Reply #115 on: December 02, 2024, 06:55:10 am »

Hello

I m about to buy a Blackmagic DeckLink Quad HDMI Recorder. My understanding is it might work or not, but would  jriver team be ready to integrate this capture board in jriver knowing that I can provide my feedback to help the development ? If yes I m ready to take the risk to buy it.
Logged
I知 a Windows 10 pro user. Currently enjoying JRiver 33.

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10935
  • Dogs of the world unite!
Re: Blackmagic Design devices - how do we support them better
« Reply #116 on: December 02, 2024, 08:38:21 am »

We are indeed working on improving the support of Blackmagic Design devices, including the device you are considering buying.
Logged
Yaobing Deng, JRiver Media Center

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10935
  • Dogs of the world unite!
Re: Blackmagic Design devices - how do we support them better
« Reply #117 on: December 02, 2024, 08:44:19 am »

It is transmitted per frame though clearly it changes rarely so I guess you could write a transform filter to sit on top of the provided capture filter (though in my experience, dealing with the media type and the filter negotiation is where all the work actually is, capturing the frame is simple in comparison)

So, if the metadata changes at a random moment, we just pass the new data to the renderer.  Does the renderer need to know which video frame this is for, or starting with which frame? That was what I meant by "synchronization".
Logged
Yaobing Deng, JRiver Media Center

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4256
Re: Blackmagic Design devices - how do we support them better
« Reply #118 on: December 02, 2024, 08:54:50 am »

If you were to implement this as a transform filter then you would see each frame and would update as and when it changes (and then have to renegotiate the media type with the renderer). Hendrik already confirmed it but I can see jrvr and madvr both support this on the fly changing of media type without issues.

As long as their API exposes this info without needing to read the entire frame then it seems doable to me (but as noted actually reading the frame is easy so might be simpler just to write your own source filter instead)
Logged

alext77

  • Recent member
  • *
  • Posts: 18
Re: Blackmagic Design devices - how do we support them better
« Reply #119 on: December 03, 2024, 06:16:16 am »

We are indeed working on improving the support of Blackmagic Design devices, including the device you are considering buying.

Hello, Thanks. I have ordered a Blackmagic DeckLink Quad HDMI Recorder. I知 willing to help if it makes any sense for jriver development, I will tell you once I知 ready.
Logged
I知 a Windows 10 pro user. Currently enjoying JRiver 33.

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10935
  • Dogs of the world unite!
Re: Blackmagic Design devices - how do we support them better
« Reply #120 on: December 03, 2024, 12:20:13 pm »

Thanks.
Logged
Yaobing Deng, JRiver Media Center

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4256
Re: Blackmagic Design devices - how do we support them better
« Reply #121 on: December 03, 2024, 01:52:05 pm »

fwiw anyone who wants same functionality using a magewell pro card can refer to https://yabb.jriver.com/interact/index.php/topic,140134.0.html
Logged

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10935
  • Dogs of the world unite!
Re: Blackmagic Design devices - how do we support them better
« Reply #122 on: December 03, 2024, 03:25:27 pm »

Nathan,

Please test this JRTelevision DLL.

This is about setting video format before playing.  You are going to get a pop-up dialog when starting up the device.  I will move it to Configuration window later, after we confirm it works.

You get two combo boxes. The first one lets you choose a connection method, i.e. HDMI, Component, Composite, etc.  The second one lets you choose display mode - a combination of pixel format (YUV, RGB etc.) and display (HD, 4k, progressive or not).

I only implemented the following pixel formats:

"8BitYUV"
"10BitYUV"
"8BitARGB"
"8BitBGRA"
"10BitRGB"

Selecting anything else likely will not work.

Known issue: the dialog window hides behind the main window after a second or so. You have to Alt-Tab it back. So in the end it probably will only appear on the Configure window.

Logged
Yaobing Deng, JRiver Media Center

jmone

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

Thanks Yaobing.  Had a play, and kinda weird and I've attached a log that should how
- 1st Play: Using the BMD filter.  The pop up boxs came up (which they should not as this one is all automatic and does not need manual config).  You can select anything, then after OK, the UltraStudio changes to the correct format and I get Video and Audio just fine.  On stop, it leaves the UltraStudio in that format.
- 2nd Play: Using the Decklink Driver.  No matter what resolution I selected, the UltraStudio is put into 1080p mode.  This of course only gives me an image if I'm sending 1080p and a black screen if I'm sending UHD.

PS - Windows freaked about the RAR file.  Claimed it was a "severe" threat! :)  Seems I lived.

Logged
JRiver CEO Elect

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10935
  • Dogs of the world unite!
Re: Blackmagic Design devices - how do we support them better
« Reply #124 on: December 04, 2024, 09:24:24 am »

Thanks Yaobing.  Had a play, and kinda weird and I've attached a log that should how
- 1st Play: Using the BMD filter.  The pop up boxs came up (which they should not as this one is all automatic and does not need manual config).  You can select anything, then after OK, the UltraStudio changes to the correct format and I get Video and Audio just fine.  On stop, it leaves the UltraStudio in that format.
I will refine it so it will not be done for WDM devices.

Quote
- 2nd Play: Using the Decklink Driver.  No matter what resolution I selected, the UltraStudio is put into 1080p mode.  This of course only gives me an image if I'm sending 1080p and a black screen if I'm sending UHD.

I hoped this would work.  Will look at the logs.
Quote
PS - Windows freaked about the RAR file.  Claimed it was a "severe" threat! :)  Seems I lived.

Sorry about that. I will use ZIP next time.
Logged
Yaobing Deng, JRiver Media Center

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14480
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #125 on: December 04, 2024, 03:17:11 pm »

NP on the compressed file.

Good news is that it does look like it is showing all the supported options of the UltraStudio and you are successfully setting the Ultrastudio to change to a particular format.
Logged
JRiver CEO Elect

jsmith967

  • Junior Woodchuck
  • **
  • Posts: 72
Re: Blackmagic Design devices - how do we support them better
« Reply #126 on: December 05, 2024, 10:41:49 am »

We are indeed working on improving the support of Blackmagic Design devices, including the device you are considering buying.

I too can help with development as I have a Decklink 4K Recorder mini
Logged

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10935
  • Dogs of the world unite!
Re: Blackmagic Design devices - how do we support them better
« Reply #127 on: December 05, 2024, 10:55:51 am »

- 2nd Play: Using the Decklink Driver.  No matter what resolution I selected, the UltraStudio is put into 1080p mode.  This of course only gives me an image if I'm sending 1080p and a black screen if I'm sending UHD.

It turns out that the format was not set, because of a bug. Please try this new DLL.
Logged
Yaobing Deng, JRiver Media Center

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14480
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #128 on: December 05, 2024, 02:07:59 pm »

 ;D - It Works!  Well done.  Let me know if
- you want a log
- test yet on SDR (709) vs HDR (HLG, PQ)
- etc

Thanks
Nathan

Logged
JRiver CEO Elect

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14480
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #129 on: December 05, 2024, 11:36:58 pm »

I too can help with development as I have a Decklink 4K Recorder mini

You should be able to add this as a Device under Television --> TV Options --> Manage Devices and they will be (if it is the same as what I see)
- Blackmagic WDM Driver : This "just works" but only under Windows.  If you have a signal going into your Decklink then "play" this channel you should see and hear it in MC just fine.
- Decklink Video : This is an API driven approach that should work regardless of platform, but requires the user to select what the stream is.  This is the bit that Yaobing is working on at present.
Logged
JRiver CEO Elect

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10935
  • Dogs of the world unite!
Re: Blackmagic Design devices - how do we support them better
« Reply #130 on: December 06, 2024, 09:37:10 am »

;D - It Works!  Well done.  Let me know if
- you want a log
- test yet on SDR (709) vs HDR (HLG, PQ)
- etc

Thanks
Nathan

Thanks Nathan.
Right now, HDR is not involved. You can just try setting format to different ones and see if they all work (those I listed a few days ago, YUV and RGB types). Yes please provide a log.
Logged
Yaobing Deng, JRiver Media Center

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14480
  • I won! I won!
Re: Blackmagic Design devices - how do we support them better
« Reply #131 on: December 06, 2024, 02:46:40 pm »

Here are a couple of Logs:

UHD (2160/50p) : This offered me the choice of
- 8BitYUV : Works
- 10BitYUV : Not expected to work as it is not on your list.  Result is a black screen, and the UltraStudio is put into 1080p50 mode.

FHD (1920/50p) : This gave me all of your support formats plus a few more
- They all worked and I played them in this order in the log. 8 YUV, 8 ARGB, 8 BGRA, 10 RGB ... and then for "fun" 12 RGB (and even this one worked...but I've got the feeling it just did not switch any mode but it was hard to tell). 

Also, in the JRVR it always showed that the Input was always 8-Bit RGB regardless of what I used above.

FWIW - As usual it also reports with unknown colour space info and still can't see in the OSD what the input FPS.
Logged
JRiver CEO Elect
Pages: 1 2 [3]   Go Up