[d3d11screencapturesrc and d3d12screencapturesrc] HDR capture is too bright (oversaturated)

Hi.

This is the photo of GStreamer screen capture using d3d12screencapturesrc with HDR enabled.
I used a camera to avoid any error introduced by a capture software.

The green selection shows how the colors looks like on Windows,
the red selection shows the GStreamer capture window with much oversaturated color

this is the pipeline used:
./gst-launch-1.0 d3d12screencapturesrc ! d3d12convert ! d3d12download ! "video/x-raw(memory:SystemMemory),width=1920,height=1080,sync=false" ! autovideosink

@seungha sorry if I quote you, I hope that this does not bother you.

Is there a way to fix/workaround this problem?

I tried playing with brightness/saturation with
! videobalance contrast=-0.n brightness=-0.n with no luck.

it seems that some details are lost in HDR, this does not happen in SDR.

this is a screenshot of a God of War Ragnarock in HDR mode took with the GStreamer pipeline in the OP.

blu colors are completely washed out in favour of white.

Same screen capture with OBS studio produces correct colors.

In case of HDR enabled, screen capture element needs to capture screen using 16bits format (DXGI_FORMAT_R16G16B16A16_FLOAT) and its colorspace would be scRGB, but the HDR capturing not implemented yet. One of major reasons why I didn’t implement the 16bits capturing/rendering is because of missing scRGB colorspace support in GStreamer.

thanks for the answer seungha, I really appreciate it.
it seems that I’m out of luck for now.

hope to see it implemented in GStreamer one day.

I think that HDR capturing/rendering could be a really important feature for a software like GStreamer, even considering that most of the PC monitors / TVs todays has great HDR support.

Just for reference I opened a feature request on Gitlab.

@seungha is this something related to adding HDR support in d3d12screencapturesrc ?

No, it’s barely relevant. I have an idea to get scRGB working in d3d12, but it would take quite a bit of work. I’m not sure I’ll be able to find time to implement it before the 1.26 release

1 Like

Take your time.
Your fans will wait :slight_smile: :partying_face: :partying_face: :partying_face: