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
414 stars 94 forks source link

Recorded video is zero sized not properly saved in windows 11 pro 64 bit in specific resolution 1366x768 (Maximum) and 1680 X 1050 to 1366 X 768 for certain pc. #204

Closed rakib33 closed 2 years ago

rakib33 commented 2 years ago

In certain PC that has max resolution 1366x768 ,after record full screen the file size will zero . but after downgrade resolution video saved well. Please check the recorded.log also see maximum pc resolution where the record not properly saved. Dis-Res

2022-06-24 12:13:02.950 [ERROR] [OutputManager.cpp(RenderFrame:154)] >> Writing of video frame with start pos 44 ms failed: Unspecified error 2022-06-24 12:13:02.950 [ERROR] [RecordingManager.cpp(operator ():508)] >> RETURN_ON_BAD_HR: hr=0x80004005, error is: Unspecified error 2022-06-24 12:13:02.951 [ERROR] [RecordingManager.cpp(StartRecorderLoop:726)] >> RETURN_RESULT_ON_BAD_HR: hr=0x80004005, error is: Unspecified error recorder.log

rakib33 commented 2 years ago

@sskodje , we are still investigate this issue and running 1366 max resolution pc and we get an meaningful error message from one laptop. please check the attached image.By default enable hardware encoding is enable . to disable this resolution issue solved. We are checking more. you may close that issue. Thank you.

sskodje commented 2 years ago

Hi! The hardware encoder is provided by the drivers made by hardware manufacturer when using hardware encoding, so Intel, AMD, Nvidia, etc. Unfortunately there are bugs with some hardware and drivers, and it looks like you stumbled upon one. If updating graphics drivers and/or windows update does not work, using software encoding should, as you discovered :)