mfh264enc: Incorrect rendering during window capture
Describe your issue
When capturing the window image using d3d11screencapturesrc
(with wgc api) and mfh264enc
encoder, the window image is heavily distorted.
When capturing the entire screen, there is no problem.
For the window, the problem does not occur when using other encoders. Tried: nvd3d11h264enc
, nvh264enc
, openh264enc
.
I also noticed that by changing the size of the window, it is possible to set such a dimension, which is rendered correctly. Probably the error is related to the size of the captured element.
Expected Behavior
Observed Behavior
Setup
- Operating System: Windows 11 21H2
- Device: Computer
- GStreamer Version: 1.22.2
- Command line:
gst-launch-1.0 -e d3d11screencapturesrc capture-api=wgc window-handle=66374 ! video/x-raw(memory:D3D11Memory),framerate=60/1 ! d3d11convert ! video/x-raw(memory:D3D11Memory),format=NV12 ! mfh264enc ! h264parse ! mp4mux ! filesink location=screen_record.mp4
Steps to reproduce the bug
- open terminal
- Enter command (set your window-handle)
gst-launch-1.0 -e d3d11screencapturesrc capture-api=wgc window-handle=66374 ! video/x-raw(memory:D3D11Memory),framerate=60/1 ! d3d11convert ! video/x-raw(memory:D3D11Memory),format=NV12 ! mfh264enc ! h264parse ! mp4mux ! filesink location=screen_record.mp4
How reproducible is the bug?
Always