MathewSachin / Captura

Capture Screen, Audio, Cursor, Mouse Clicks and Keystrokes
https://mathewsachin.github.io/Captura/
MIT License
9.68k stars 1.81k forks source link

DesktopDuplicaiton cause exception while using NVENC #558

Open F-TD5X opened 4 years ago

F-TD5X commented 4 years ago

Describe the bug This issue show up only using DesktopDuplicaiton with nvenc, FullScreen or specific screen.

I have not try every combination, but record a region or window is fine.

To Reproduce Steps to reproduce the behavior:

  1. Using default settings but set codec as NVenc: *.
  2. Record fullscreen or specific screen.
  3. Got error SharpDX.SharpDXException: HRESULT: [0x8899000C], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_RECREATE_TARGET/RecreateTarget]

Desktop (please complete the following information):

Additional context

Log Captura v9.0.0.0 OS: Microsoft Windows 10 企业版 LTSC|C 64-bit OS 64-bit Process 8 processor(s) Name: Intel(R) Core(TM) i7-4710MQ CPU @ 2.50GHz NumberOfCores: 4 NumberOfLogicalProcessors: 8 Name: Physicial RAM Capacity: 8589934592 Name: Physicial RAM Capacity: 8589934592 Name: Intel(R) HD Graphics 4600 AdapterRAM: 1073741824 Name: NVIDIA GeForce GTX 1060 AdapterRAM: 4293918720 Desktop: {X=0,Y=0,Width=1920,Height=1080} Screen: \\.\DISPLAY1: {X=0,Y=0,Width=1920,Height=1080} Mic: Microphone (Realtek High Definition Audio) Mic: Krisp Microphone (Krisp) Speaker: Speaker (Realtek High Definition Audio) Speaker: Realtek Digital Output (Realtek High Definition Audio) Speaker: Krisp Speaker (Krisp) Webcam: BisonCam, NB Pro SharpDX.SharpDXException: HRESULT: [0x8899000C], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_RECREATE_TARGET/RecreateTarget], Message: 存在可以恢复的演示错误。调用方需要重新创建、重新渲染整个帧,并重新尝试显示。 在 SharpDX.Result.CheckError() 在 DesktopDuplication.Direct2DEditorSession.EndDraw() 在 DesktopDuplication.Direct2DEditor.GenerateFrame(TimeSpan Timestamp) 在 Screna.Recorder.FrameWriter(TimeSpan Timestamp) 在 System.Threading.Tasks.Task`1.InnerInvoke() 在 System.Threading.Tasks.Task.Execute() --- 引发异常的上一位置中堆栈跟踪的末尾 --- 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 在 Screna.Recorder.d__25.MoveNext()