mmozeiko / wcap

Simple and efficient screen recording utility for Windows 10 and 11
The Unlicense
795 stars 31 forks source link

Request/Help: H265 #20

Open ksmuthucv opened 1 year ago

ksmuthucv commented 1 year ago

Hello @mmozeiko, The recorded file using h265 (Main_420_8) codec has noise while using the latest version and the earlier version (prior to convert buffer) works as expected. PFA of mock-ups for the same. Can you please advice how to address it?

earlier/working version: H265Works

not working: H265Noise

Thanks, Muthu

mmozeiko commented 1 year ago

You mean it worked before and is not working afterwards? Which commit did it work with? Does it work if you disable GPU encoder?

ksmuthucv commented 1 year ago

Hello @mmozeiko, Thank you very much for your time and help, it is really appreciated.

It works fine till commit #f1050973884. https://github.com/mmozeiko/wcap/tree/f105973884e70fda99c8d1e0864d9cf60213e47b

Disabling gpu encoding fails with below error. no-gpu

Thanks, Muthu

mmozeiko commented 1 year ago

Hmm, I see. Two more questions: 1) what GPU do you have? 2) does latest versions work fine when recording with codec set to H264? What about HEVC 10-bit?

Do you have VS installed? If yes, can you run latest source built in debug mode and check debugger output window for any error messages? To build exe in debug mode, run build.cmd debug

ksmuthucv commented 1 year ago
  1. I have two gpus, Intel(R) HD Graphics 630 (igpu) and Radeon RX Vega M GH Graphics (xgpu). Commit #f1050973884 works fine with amd gpu.
  2. Yes, h264 works fine in latest code. HEVC 10-bit runs into "Cannot configure video encoder input!" error. please find the details below. H264 is highlighted in green and H265 in red. Also, ran the code in debug mode and it didn't throw any error or fail at a code location.

details

please find the logs of output windows for your reference. h265-latest.txt h265-f1050973884 .txt

Thanks, Muthu

ksmuthucv commented 1 year ago

Hello @mmozeiko, Commenting out the below line from the latest code, seems to have fixed the noise problem of h265. HR(IMFMediaType_SetUINT64(Type, &MF_MT_FRAME_RATE, MFT64(Config->FramerateNum, Config->FramerateDen))); (wcap_encoder.c, 337).

Thanks, Muthu

ksmuthucv commented 8 months ago

Hello @mmozeiko, This issue has re-surfaced again. This happens (latest codebase) with Radeon RX Vega M GH Graphics (xgpu, amd) and the integrated gpu works fine. Can you please advise me what could i look into?

image amd-gpu-mftrace-vs2022.txt

Thanks, Muthu

ksmuthucv commented 8 months ago

Hello @mmozeiko, I have raised the below issue at AMF and there are few recommendations provided by them as well. https://github.com/GPUOpen-LibrariesAndSDKs/AMF/issues/434

Thanks, Muthu

mmozeiko commented 8 months ago

Sorry, I'm currently traveling. I'll look into this in couple of weeks when I'm back from vacation.