sskodje / ScreenRecorderLib

A .NET library for screen recording in Windows, using native Microsoft Media Foundation for realtime encoding to h264 video or PNG images.
MIT License
408 stars 93 forks source link

Recording colors are getting reverted #226

Open ranwer-dev opened 1 year ago

ranwer-dev commented 1 year ago

I have tried the recorder on a Windows 10 22H2 PC. Interestingly the colors of recording are reverted to redish tone.

https://user-images.githubusercontent.com/92986100/218127022-3e63ca62-b125-4e9c-944d-8879e3fb5e1e.mp4

ranwer-dev commented 1 year ago

On another PC, it's all green. Any idea what could be causing this? image

ranwer-dev commented 1 year ago

can you suggest what could be the issue?

sskodje commented 1 year ago

The green color is what happens when you send empty data to H264 encoder. E.g a pixel with colors [0,0,0] becomes green. So it means something goes wrong somewhere and it sends empty junk data. The pink and green issue i don't know, but it's probably because there's a mismatch between the format the encoder receices, and what it expects. I've seen it before on HDR content without playback support.

ranwer-dev commented 1 year ago

So it means something goes wrong somewhere and it sends empty junk data.

What could be wrong? Any hints on how to debug that?