FFmpeg.NET icon indicating copy to clipboard operation
FFmpeg.NET copied to clipboard

How to record a screen or desktop using this tool?

Open GeraldEugenio opened this issue 3 years ago • 3 comments

GeraldEugenio avatar Mar 30 '22 10:03 GeraldEugenio

Also interested in this.

Wanted to clarify if this question was left unanswered because the feature is not currently available (on Windows, it is done using ffmpeg -f gdigrab -i desktop), or because nobody bothered to answer?

@GeraldEugenio have you found any FFmpeg C# wrapper that supports screen recording?

lostmsu avatar May 20 '22 16:05 lostmsu

https://github.com/cmxl/FFmpeg.NET/issues/7

does this answer your question?

fritz-net avatar May 21 '22 12:05 fritz-net

Yep, but it turns out ffmpeg is very inefficient because gdigrab is an old gen tech. These days the desktop is in DWM DXGI buffers, and there's an efficient API in modern Windows SDK with less options but actually much more practical: https://github.com/MicrosoftDocs/SimpleRecorder/

lostmsu avatar May 21 '22 19:05 lostmsu