MathewSachin / Captura

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

Cannot connect Video pipe to FFmpeg #549

Open mankouzhuya opened 4 years ago

mankouzhuya commented 4 years ago

Describe the bug Captura version: v8.0.0 print error msg 'Cannot connect Video pipe to FFmpeg' sometimes and the video file invalid only 1KB. Captura To Reproduce Steps to reproduce the behavior:

  1. start with commandline
  2. kill the Captura process whit 'taskkill /pid %d -t -f' command the Captura console print error msg: System.Exception: Cannot connect Video pipe to FFmpeg\r\n
    at Captura.Models.FFmpegWriter.WriteFrame(IBitmapFrame Frame)\r\n
    at Captura.Models.WithPreviewWriter.WriteFrame(IBitmapFrame Image)\r\n
    at Screna.Recorder.DoWrite()

Desktop (please complete the following information):

MathewSachin commented 4 years ago

Please try the latest beta. If this issue still happens on the latest beta reopen the open and also provide the command line arguments used to start captura.

mankouzhuya commented 4 years ago

commandline: captura-cli start --cursor --encoder ffmpeg:0 - f test.mp4 when i run the commandline with v9.0_beta4。the console print 'NullReferenceException'。 details: Captura v9.0.0 (c) 2020 Mathew Sachin

Video Buffer Allocated: 2160000 System.NullReferenceException: Object reference not set to an instance of an object. at SharpDX.MediaFoundation.Sample.GetBufferByIndex(Int32 dwIndex) at Captura.MfColorConverter.Convert(Texture2D Texture, Byte[] Output) at Captura.Models.FFmpegWriter.WriteFrame(IBitmapFrame Frame) at Captura.Models.WithPreviewWriter.WriteFrame(IBitmapFrame Image) at Screna.Recorder.AddFrame(IBitmapFrame Frame) at Screna.Recorder.FrameWriter(TimeSpan Timestamp) at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Screna.Recorder.d__20.MoveNext() Press p to pause or resume, q to quit