sskodje / screenrecorderlib Goto Github PK
View Code? Open in Web Editor NEWA .NET library for screen recording in Windows, using native Microsoft Media Foundation for realtime encoding to h264 video or PNG images.
License: MIT License
A .NET library for screen recording in Windows, using native Microsoft Media Foundation for realtime encoding to h264 video or PNG images.
License: MIT License
Hello sskodje. Thank you for this amazing library. Is it possible to record the video to a stream?
This would make the use more flexible. Thank you for help in advance
Thanks for the great lib.
I am using this lib from my console exe which is called form window service.
service -> console -> screenLib.
now everything ok except when I starting the service then i can't move my mouse for few seconds (10 - 15 secs) after that all normal.
it is happening every time recording the screen.
please advise.
Win 10 OS.
thanks.
Hello there. Thanks for the great library sskodje!
I am wondering if it is possible to record a lossless h264 mp4 file?
Or alternatively when this is not possible what are the "best quality" settings one can choose?
Thanks in advance
Hi,
I have a dotnet core project that includes ScreenRecorderLib as a package reference:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>8.0</LangVersion>
<Platforms>x64</Platforms>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ScreenRecorderLib" Version="1.7.0" />
</ItemGroup>
</Project>
I then publish the application as a self-contained deployement: dotnet publish -c Release -r win-x64 -p:Platform=x64
When I run the executable from the published folder on a 64 bit Windows machine, I get the following runtime error:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.BadImageFormatException: Could not load file or assembly 'ScreenRecorderLib, Version=1.0.7332.3373, Culture=neutral, PublicKeyToken=null'. An attempt was made to load a program with an incorrect format.
Searching this exception online, this exception typically is from trying to use the wrong environment, but I don't see how that's an issue here since I specified x64 for everything. Any help would be greatly appreciated.
My computer has two display adapters (with 3 displays). With the TestApp I can only record on with the first item provided in ScreenComboBox.
On line
Instead of using a Monitor number in the RecorderOptions (which is only valid in the adapter's context), I'd suggest to use Screen.DeviceName which is a string like \\.\DISPLAY4
. This corresponds to DXGI_OUTPUT_DESC.DeviceName.
When recording a display where no pixels change the final recording has only a fraction of the real length and no audio is recorded at all.
MediaInfo
Duration : 100 ms
TestApp
Elapsed: 2s:425ms
I think the recorder should not send the frame directly to the writer when captured. Instead it should keep the frame until the next frame is recorded or the loop is paused / stopped. The frame duration is then delayed calculated when the next frame appears (or recording is paused / stopped).
HI
Every time I stop the recording I get the following error:
Error: Unexpected WaitForMultipleObjects return value 4294967295 on pass 126 after 2011654736 frames
My Recording configuration is:
RecorderOptions options = new RecorderOptions { RecorderMode = RecorderMode.Video, IsThrottlingDisabled = false, AudioOptions = new AudioOptions { Bitrate = AudioBitrate.bitrate_128kbps, Channels = AudioChannels.Stereo, IsAudioEnabled = true }, VideoOptions = new VideoOptions { Bitrate = 8000 * 1000, Framerate = 60, IsMousePointerEnabled = true, IsFixedFramerate = true, EncoderProfile = H264Profile.Main } };
Hi, I met this problem when I tried to run WPF demo. When I debug the demo, the StatusTextBlock.Text changed from IDLE to ERROR, and the error is "failed to create output folder". Could you show some instructions on how to solve this problem? Thanks
I could not easily rewrite the code to push the audio frames independently because:
if (model.Audio.size() > 0) {
hr = WriteAudioSamplesToVideo(model.StartPos, model.Duration, m_AudioStreamIndex, model.Audio);
if (FAILED(hr)) {
_com_error err(hr);
}
}
else
m_SinkWriter->SendStreamTick(m_AudioStreamIndex, model.Duration);
I tried this and this works great (for silenc at the beginning).
pu64DevicePosition
from IAudioCaptureClient::GetBuffer
.Probably an even better way handle the audio is to use a MediaSource? Multiple audio inputs could be simply combined using MFCreateAggregateSource
.
I pushed my experimental changes to https://github.com/hakito/ScreenRecorderLib/tree/independent_audio
Hello! Recently I've been getting some errors while using this library. I have recently updated to the latest Windows Update (KB4499167) so that might be a cause.
The errors I am getting happen immediately after starting to record but before the recorder object goes into the Recording state. The error messages are as follows:
Everything seems to be mostly in line with proper initiation (most of my code came from the example code on the README). Do you know what may have possibly caused this to occur?
Thank you and have a nice day!
Because the recording instance is reused a second recording will re-use the settings from the first run. I'd suggest to disable all recording options after the first recording and add a reset button which is only enabled when recording is not running and sets the _rec instance to null.
Hello sskodje! Very cool lib, but I always det an error while try to start recoding? Why is this happen?
We have the recorder running on it's own thread to record ui automation tests. The issue is that for some reason the recorder is causing a hang. Checking the crash logs, i see these two errors below in window events. This causes the nunit tests to hang until jenkins ends up killing the jobs
Exception Info: System.NullReferenceException at <Module>.ScreenRecorderLib.ManagedIStream.Seek(ScreenRecorderLib.ManagedIStream*, _LARGE_INTEGER, UInt32, _ULARGE_INTEGER*)
Exception Info: System.OutOfMemoryException at <Module>.ScreenRecorderLib.ManagedIStream.Write(ScreenRecorderLib.ManagedIStream*, Void*, UInt32, UInt32*)
HEllo
Will the library work with a service application?
thanks!
I'm a little confused, sometimes click the mouse, click the effect will not show, there is uncertainty.
I use the following interface:
[DllImport("user32.dll")]
public static extern void mouse_event(...);
It seems can't show color when I double click ,like this:
mouse_event((int)(Win32API.MouseEventFlags.LeftDown), 0, 0, 0, UIntPtr.Zero); Thread.Sleep(500); mouse_event((int)(Win32API.MouseEventFlags.LeftUp), 0, 0, 0, UIntPtr.Zero); mouse_event((int)(Win32API.MouseEventFlags.LeftDown), 0, 0, 0, UIntPtr.Zero); Thread.Sleep(500); mouse_event((int)(Win32API.MouseEventFlags.LeftUp), 0, 0, 0, UIntPtr.Zero);
May be It's the bad time to use sleep().
I really look forward to your good advice ,thanks !
Hi! Could you implement this feature, please? Something like in Captura project (https://github.com/MathewSachin/Captura/blob/master/src/Captura.MouseKeyHook/MouseKeyHook.cs). It shows mouse clicks on recorded video.
Need more info on this.
Yes the tests run into an out of memory exception. I tried to figure out why. The only thing I found is that the refcount for D3D objects is counting up.
MF shut down!
D3D11 WARNING: Live ID3D11Device at 0x094FCD2C, Refcount: 23 [ STATE_CREATION WARNING #441: LIVE_DEVICE]
Did these unit tests ever work?
Originally posted by @hakito in #50 (comment)
when setting VideoOptions SnapshotFormat this actually sets the Slideshow format?!
Snapshot mode records just a single frame to the mp4, right?
Hello,
It seems that the application does not record any images from a monitor that is Portrait. It gets the mouse movements, but not the screen images. It works if I set the monitor to Landscape only.
Is there a limitation in this sense, or I am using it wrong? I tested with the TestApp from the repository.
Hello, sskodje! I am here again. First of all, I really appreciate you developed this library, fantastic work!
Currently, I am using version 1.1.5, and my code looks like this.
I have deployed the same piece of code on 4 different machines, it is just interesting to see the video sizes are drastically different, I think might due to different bit rate , but for which I have already set to fixed values in the code.
I just want to share with you how they look. It is nice to have to know some knowledge about why they behave in this way. Otherwise, doesn't matter.
By the way, do you accept any donations? I would like to say thank you for providing this great library on the nuget. Please give me your paypal account if that is easy for you?
Cheers,
Richard
When recording with the TestApp using default settings + Audio input the resulting video has a time compressed/stretched audio (depending on the player). I inspected the files using MediaInfo:
Duration : 3 s 334 ms
Bit rate mode : Constant
Bit rate : 48.0 kb/s
Nominal bit rate : 96.0 kb/s
Channel(s) : 2 channels
There should be no nominal bit rate and the Bit rate should be at 96.0 kb/s.
Another recording with debugging enabled produced the following:
Bit rate mode : Constant
Bit rate : 56.4 kb/s
Nominal bit rate : 96.0 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 148 Bytes (0%)
And the according debug output:
Resampled audio from 16000hz to 48000hz
Wrote frame with start pos 0 ms and with duration 0 ms
Inserted 80 bytes of silence
Wrote audio sample with start pos 0 ms and with duration 0 ms
Received stop event after 734 passes and 58720 frames
Received stop event after 742 passes and 0 frames
Exiting recording task
I am trying to record some tests in case they failed. The recording works fine as long as the mouse is not moved. If the mouse is moved, then a lot of lag is produced and everything gets very slow.
I have tried enabling/disabling the hardware encoding, the mouse pointer and mouse clicked variables as well as the quality, the bitrate, etc.
Do know why this happens or what the cause could be?
Can you please point me to a compiled version of the lib that is based on .net 4.5 version?
Hi there.
Thanks for the great tool, I recorded a lot of my program running videos.
There is a small puzzle for me that it seems my recordings could not last capturing for more than 15min. Is it me using it wrong or it is a feature?
I currently work that around by dividing between steps:
Has anyone managed to record a longer clip like 1 hour or 2?
Cheers,
Richard
Is it possible to show the captured video in a image control (or some other control) in real time, without writing it to a file?
Originally posted by @MJWherry in #18 (comment)
Hi, I've been using this lib for a while on x86 platform but after the OS reinstall it keeps showing me the BadImageFormatException for ScreenRecorderLib.dll
I've double checked the platform settings and it the usual x86, the dll file in output folder is the x86 version too (according to the size).
I've also installed the latest VC++ redist packages.
Can you please tell me if there could be some other OS specific dependencies I can check?
PS: I probably can try to rebuild the src, but it shows errors on VS2019 and I don;t have VS2017 at hand.
Hi sskodje,
This looks like an awesome library, and I'm very excited to give it a shot and integrate it into my own project!
However, so far I've been unable to use it at all! :-( I've cloned the repository and opened up the solution in Visual Studio. I build the whole solution and run the TestApp project. I leave all of the settings as default and hit Record. Immediately it says "Error: The parameter is incorrect."
I'm not sure if there's any logging I could enable to help you debug this issue, but I don't see anything in the Output window when I run in the debugger.
Thanks for any help you can provide!
Hello,
my recorder options are
public static RecorderOptions Options = new RecorderOptions
{
RecorderMode = RecorderMode.Video,
//If throttling is disabled, out of memory exceptions may eventually crash the program,
//depending on encoder settings and system specifications.
IsThrottlingDisabled = false,
//Hardware encoding is enabled by default.
IsHardwareEncodingEnabled = false,
//Low latency mode provides faster encoding, but can reduce quality.
IsLowLatencyEnabled = false,
//Fast start writes the mp4 header at the beginning of the file, to facilitate streaming.
IsMp4FastStartEnabled = false,
AudioOptions = new AudioOptions
{
Bitrate = AudioBitrate.bitrate_128kbps,
Channels = AudioChannels.Stereo,
IsAudioEnabled = false
},
VideoOptions = new VideoOptions
{
BitrateMode = BitrateControlMode.UnconstrainedVBR,
Bitrate = 8000 * 1000,
Framerate = 60,
IsFixedFramerate = true,
EncoderProfile = H264Profile.Baseline
},
MouseOptions = new MouseOptions
{
//Displays a colored dot under the mouse cursor when the left mouse button is pressed.
IsMouseClicksDetected = true,
MouseClickDetectionColor = "#FFFF00",
MouseClickDetectionRadius = 30,
MouseClickDetectionDuration = 100,
IsMousePointerEnabled = true,
}
};
Calling:
_recorder = Recorder.CreateRecorder(ScreenRecorderSettings.Options);
_recorder.OnRecordingComplete += Rec_OnRecordingComplete;
_recorder.OnRecordingFailed += Rec_OnRecordingFailed;
_recorder.OnStatusChanged += Rec_OnStatusChanged;
_recorder.Record($@"C:\temp\{Guid.NewGuid()}.mp4");
Leads to an event in Rec_OnRecordingFailed where RecordingFailedEventArgs has the message The specified device interface or feature level is not supported on this system.
DxDiag Display Feature Levels (Intel Graphics Card)
DxDiag Display Feature Levels (Dedicated AMD FirePro)
Please let me know if you need anything else..
is this intended?
How can I change this code to use H265 transform instead of H264? This is what I tried:
In MainWindow.xaml.cs I changed:
public H264Profile CurrentH264Profile { get; set; } = H264Profile.Main;
from value 77 (Main) to value 1 (eAVEncH265VProfile_Main_420_8)
In internal_recorder.cpp I changed:
RETURN_ON_BAD_HR(pVideoMediaTypeOut->SetUINT32(MF_MT_MPEG2_PROFILE, m_H264Profile));
to
RETURN_ON_BAD_HR(pVideoMediaTypeOut->SetUINT32(MF_MT_VIDEO_PROFILE, eAVEncH265VProfile_Main_420_8));
and in internal_recorder.h I changed:
const GUID VIDEO_ENCODING_FORMAT = MFVideoFormat_H264;
to
const GUID VIDEO_ENCODING_FORMAT = MFVideoFormat_HEVC;
and I still get message: The data specified for media type in invalid, inconsistent or not supported by this object.
I just did some test recordings with the 1.8 lib and after a few seconds the recording stopped automatically with an error. The cause seems to be in
Recording started
Press ESC to stop recording or enter to pause
Elapsed: 24s:828msFinishing encoding
Elapsed: 24s:843msRecorder is idle
Elapsed: 25s:866msRecording failed: Write error in video encoder.
Elapsed: 32s:893ms
I tried several times with
872f9a0
and had no problem.
Need a way to choose audio device for capture.
Hello Sverre
I'm on win10 with all the updates with VS2019 and seeing following error every now and then, have you ever encountered this issue or know what could be the reason? I did display driver update today along with windows update. Also, i took the latest code from the repo and compiled it onto local machine ( exhibiting this issue ) and used the generated lib to rule out any dependency issue.
00000037 1.33105326 [16460] Wrote frame with start pos 51011 ms and with duration 33 ms
00000038 1.36531556 [16460] Wrote frame with start pos 51045 ms and with duration 37 ms
00000039 1.53500974 [16460] Wrote frame with start pos 51082 ms and with duration 169 ms
00000040 1.56823719 [16460] Wrote frame with start pos 51252 ms and with duration 33 ms
00000041 1.99900198 [16460] Wrote frame with start pos 51285 ms and with duration 417 ms
00000042 2.03447485 [16460] Error: AcquireNextFrame error: The keyed mutex was abandoned.
00000043 2.03447485 [16460]
00000044 2.03449488 [16460] Error: RETURN_ON_BAD_HR: Access is denied.
00000045 2.03456140 [16460] Error: Reinitialized desktop duplication error: Access is denied.
00000046 2.03456140 [16460]
00000047 2.03645086 [16460] Error: AcquireNextFrame error: Access is denied.
00000048 2.03645086 [16460]
00000049 2.03653789 [16460] Error: RETURN_ON_BAD_HR: Access is denied.
00000050 2.03655386 [16460] Error: Reinitialized desktop duplication error: Access is denied.
In addition, when this issue happens, i see following assertion message:
Thanks
Hey, love the work. Is there any way I can disable the logging to console? I'm using the lib in a console application and the frame logging is spamming my output :(
For example:
2018-04-10T20:11:37.2116701Z Skipped frame
2018-04-10T20:11:37.2423639Z Wrote frame with start pos 17667 ms and with duration 200 ms
2018-04-10T20:11:37.3110141Z Skipped frame
2018-04-10T20:11:37.4102771Z Skipped frame
2018-04-10T20:11:37.5095375Z Skipped frame
2018-04-10T20:11:37.6088865Z Skipped frame
2018-04-10T20:11:37.7085212Z Skipped frame
2018-04-10T20:11:37.8077081Z Skipped frame
2018-04-10T20:11:37.9066506Z Skipped frame
2018-04-10T20:11:38.0059548Z Skipped frame
2018-04-10T20:11:38.1056443Z Skipped frame
2018-04-10T20:11:38.2656782Z Wrote frame with start pos 17867 ms and with duration 50 ms
2018-04-10T20:11:38.2856351Z Skipped frame
Thanks in advance.
I'm using the current code to try to record my screen, however nothing is being created and no errors are being thrown anywhere.
`using System;
using System.Windows;
using ScreenRecorderLib;
namespace ScreenRecorder {
public partial class MainWindow : Window {
private String videoPath;
private bool shouldRecord;
private Recorder recorder;
public MainWindow() {
InitializeComponent();
recordButton.Click += OnButtonClick;
RecorderOptions options = new RecorderOptions {
RecorderMode = RecorderMode.Video,
IsThrottlingDisabled = false,
IsHardwareEncodingEnabled = true,
IsLowLatencyEnabled = false,
IsMp4FastStartEnabled = false,
AudioOptions = new AudioOptions {
Bitrate = AudioBitrate.bitrate_128kbps,
Channels = AudioChannels.Stereo,
IsAudioEnabled = true
},
VideoOptions = new VideoOptions {
Bitrate = 8000 * 1000,
Framerate = 60,
IsMousePointerEnabled = true,
IsFixedFramerate = true,
EncoderProfile = H264Profile.Main
}
};
recorder = Recorder.CreateRecorder(options);
videoPath = "C:\\Users\\Technerder\\Desktop\\Test.mp4";
}
private void OnButtonClick(object sender, RoutedEventArgs e) {
shouldRecord = !shouldRecord;
MessageBox.Show("Now: " + (shouldRecord ? "Recording!" : "no longer recording!"));
if (shouldRecord) {
recorder.Record(videoPath);
} else {
recorder.Stop();
}
}
}
}`
Mouse click recording works fine when i use my mouse, but simulating mouse clicks by going through SendInput(...) does not show. Below is the method called
[DllImport("user32.dll", EntryPoint = "SendInput")]
private static extern uint _sendInput(uint nInputs, [MarshalAs(UnmanagedType.LPArray), In] InputStruct[] pInputs, int cbSize);
It seems like the recording's color is much more whiter than the screen actually is. This doesn't happen with any recording software. Here are a couple shots demonstrating the issue:
These are my options:
Rec = Recorder.CreateRecorder(new RecorderOptions
{
VideoOptions = new VideoOptions
{
BitrateMode = BitrateControlMode.Quality,
Bitrate = 8000 * 1000,
Framerate = 60,
Quality = 70,
IsMousePointerEnabled = true,
IsFixedFramerate = true,
EncoderProfile = H264Profile.Main
},
AudioOptions = new AudioOptions
{
Bitrate = AudioBitrate.bitrate_128kbps,
Channels = AudioChannels.Stereo,
IsAudioEnabled = true
},
IsLowLatencyEnabled = true,
IsFragmentedMp4Enabled = true,
IsMp4FastStartEnabled = true,
RecorderMode = RecorderMode.Video
});
The issue persists when disabling IsLowLatencyEnabled
, IsFragmentedMp4Enabled
and IsMp4FastStartEnabled
. Thanks!
Hi sskodje,
I'm back again with another issue. :-) I am really loving this library and integrating it into my project. However, I am now hitting a wall when I try to deploy either the test project or my own project, which includes your library, onto a non-development system. In the case of the test app, it fails to start; in the case of my personal app, it fails to load the library. In both cases, it seems like it has a problem loading some Windows C++ dependency.
I've verified that the system has .NET 4.5 Framework, Visual C++ Redistributable 2015, and Windows 8.1 SDK installed (these are the framework versions targeted by your test project). Yet the application still fails to start up. See screenshots and stack trace at the end.
This is on a Windows Server 2012 machine (so it satisfies the Windows 8+ requirement), and I have also tested deployment on a Windows 10 machine.
I'm assuming that I am missing some sort of SDK or redist that needs to be installed on deployment machines, but haven't been able to identify what I'm missing. Once again, thanks for any help you can provide!
.NET Framework Is Installed
Visual C++ and Windows SDK Are Installed
Startup Stack Trace
Application: TestApp.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NotImplementedException
at System.Windows.Baml2006.Baml2006SchemaContext.ResolveBamlType(BamlType, Int16)
at System.Windows.Baml2006.Baml2006SchemaContext.GetXamlType(Int16)
at System.Windows.Baml2006.Baml2006Reader.Process_ElementStart()
at System.Windows.Baml2006.Baml2006Reader.Process_OneBamlRecord()
at System.Windows.Baml2006.Baml2006Reader.Process_BamlRecords()
at System.Windows.Baml2006.Baml2006Reader.Read()
at System.Windows.Markup.WpfXamlLoader.TransformNodes(System.Xaml.XamlReader, System.Xaml.XamlObjectWriter, Boolean, Boolean, Boolean, System.Xaml.IXamlLineInfo, System.Xaml.IXamlLineInfoConsumer, MS.Internal.Xaml.Context.XamlContextStack`1<System.Windows.Markup.WpfXamlFrame>, System.Windows.Markup.IStyleConnector)
at System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader, System.Xaml.IXamlObjectWriterFactory, Boolean, System.Object, System.Xaml.XamlObjectWriterSettings, System.Uri)
Exception Info: System.Windows.Markup.XamlParseException
at System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader, System.Xaml.IXamlObjectWriterFactory, Boolean, System.Object, System.Xaml.XamlObjectWriterSettings, System.Uri)
at System.Windows.Markup.WpfXamlLoader.LoadBaml(System.Xaml.XamlReader, Boolean, System.Object, System.Xaml.Permissions.XamlAccessLevel, System.Uri)
at System.Windows.Markup.XamlReader.LoadBaml(System.IO.Stream, System.Windows.Markup.ParserContext, System.Object, Boolean)
at System.Windows.Application.LoadBamlStreamWithSyncInfo(System.IO.Stream, System.Windows.Markup.ParserContext)
at System.Windows.Application.LoadComponent(System.Uri, Boolean)
at System.Windows.Application.DoStartup()
at System.Windows.Application.<.ctor>b__1_0(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
at System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
at System.Windows.Application.RunDispatcher(System.Object)
at System.Windows.Application.RunInternal(System.Windows.Window)
at System.Windows.Application.Run(System.Windows.Window)
at System.Windows.Application.Run()
at TestApp.App.Main()
Many thanks to the author sskodje for this great tool!
Currently it runs well on my Windows 10, but when it goes to Windows 7, it popped up such an error:
Unhandled Exception: System.IO.FileLoadException: A procedure imported by 'ScreenRecorderLib.dll' could not be loaded.
at CreateRecording(String videoPath)
at AutoTaskMode()
at Program.Main(String[] args)
Tried to use Regsvr32 'ScreenRecorderLib.dll' under Administrator mode but nothing changed.
Could anyone help me on this?
Much appreciated.
By the way, I use file size to determine if the video has finished its writing to the hard disk. Hope this tip could help someone else.
How do I make this ScreenRecorderLib.dll is work with Windows 7. both 32 and 64 bit.
I am getting an exception like below A procedure imported by 'ScreenRecorderLib.dll' could not be loaded.
please advice
Hi
Any Idea why recording the screen is making my cpus to be on 100%
Any way to create an AVI file so it wont use all my cpu ?
Hey, very good work. I got the video recording as per the code in the README file. When I tried the sample for audio recording along with the video, does not seem to work. AudioOptions
does not seem to have an option to pass a device either.
Also, I see this is a new project. Anyway pointers on how we can contribute?
I've integrated ScreenRecorder with UnitTests in VisualStudio and start recording before every test case and then stops it. On Windows 10 Azure VM (2 Cpus, 16GB RAM), i consistently get Corrupted .mp4 video file after stopping the recording. No error is thrown by ScreenRecorder.
Is there a way to mitigate this issue?
Seems that audio is not recorded at all no matter what Audio device I do select in the dropbox.
"Audio Out" and "Record audio" checkbox are ticked.
see #23 in more detail & fix.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.