Git Product home page Git Product logo

capturemanagersdk's Introduction

CaptureManager

CaptureManager SDK - Capturing, Recording and Streaming Video and Audio from Web-Cams.

This article presents my project for capturing of video and audio sources on Windows OS by Microsoft Media Foundation.

Support this project

If you like this project and think about how to show you respect - just buy me a coffee:

Demos' screenshots

SourceInfo WPFRecording QtMinGWDemo PythonRecord JavaWebViewer WPFImageViewer WPFIPCameraMJPEGViewer WPFMediaFoundationPlayer UnityWebCamViewer

capturemanagersdk's People

Contributors

xirexel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

capturemanagersdk's Issues

How to run this in unity

I tried your Demo unity project (UnityVideoAndAudioRecorder) . But I couldn't get expected result. I m using Unity 2020.1. Its not even opening my web cam.

capture cursor too slow

hi, I follow your code https://www.codeproject.com/Tips/1116253/Desktop-Screen-Capture-on-Windows-via-Windows-Desk
to add cursor on dxgi texture2d. but after test, it was too slow to draw the cursor,for about 6ms,,with hand cursor it
will go up to 200ms.

sample code like

         // Draw cursor image into GDI drawing texture
		 CComPtrCustom<IDXGISurface1> lIDXGISurface1;
		 hr = lGDIImage->QueryInterface(IID_PPV_ARGS(&lIDXGISurface1));
		 if (FAILED(hr))
		 	break;
		 CURSORINFO lCursorInfo = { 0 };
		 lCursorInfo.cbSize = sizeof(lCursorInfo);
		 auto lBoolres = GetCursorInfo(&lCursorInfo);
		 if (lBoolres == TRUE)
		 {
		 	if (lCursorInfo.flags == CURSOR_SHOWING)
		 	{
		 		auto lCursorPosition = lCursorInfo.ptScreenPos;
		 		auto lCursorSize = lCursorInfo.cbSize;
		 		HDC  lHDC;
                 printf("time microsecond2: %lld\n", std::chrono::duration_cast<std::chrono::microseconds>(chrono::steady_clock::now() - lastFrameTime).count());
		 		lIDXGISurface1->GetDC(FALSE, &lHDC);
		 		DrawIconEx(
		 			lHDC,
		 			lCursorPosition.x,
		 			lCursorPosition.y,
		 			lCursorInfo.hCursor,
		 			0,
		 			0,
		 			0,
		 			0,
		 			DI_NORMAL | DI_DEFAULTSIZE);
                 printf("time microsecond3: %lld\n", std::chrono::duration_cast<std::chrono::microseconds>(chrono::steady_clock::now() - lastFrameTime).count());
		 		lIDXGISurface1->ReleaseDC(nullptr);//too slow
		 	}
		 }
         printf("time microsecond4: %lld\n", std::chrono::duration_cast<std::chrono::microseconds>(chrono::steady_clock::now() - lastFrameTime).count());
        // Copy image into CPU access texture
		pCtx->CopyResource(*ppTex2D, lGDIImage);

log

time microsecond1: 19102
time microsecond2: 28896
time microsecond3: 46015
time microsecond4: 146072
time microsecond5: 287259
time microsecond1: 12035
time microsecond2: 22040
time microsecond3: 33243
time microsecond4: 124891
time microsecond5: 248231

how to solve this problem?thanks。
from obs

I don't think the APIs we currently use in the helper functions (starting with GetCursorInfo) have the ability to give us correctly-sized textures. My guess is that as it's a legacy API (Windows 2000-era), it will always recieve a 32x32 icon for compatibility reasons, and getting more modern cursors should be done with newer APIs (ie GetFramePointerShape, Windows 8+).

WPFVirtualCamera demo crashes on launch

Tested on multiple computers with windows 10 and 11. (on developer mode)
The install.bat seems to run sucessfully allthough it complains a bit about names
image
Then when I try to run the application itself it displays that it is running in the taskbar and crashes

This is using the precompiled files in the Bin directory.
When trying to run it from Visual Studio Some details are given.
log.txt
Any clues as to why this might be happening?

NetworkSinkStream fails to deliver video packs in VBR mode (very often)

Test with WPFRecorder with ByteStreamSink and found that no video pack is being sent out.
If I add WMA audio, then only audio can be sent out but no video.

If I enable WMV8/9 CBR in CaptureManagerSDK, then both video and audio are sent out and Windows Media Player is happy.

Any idea why NetworkStreamSink fails to deliver video packs in VBR mode?

Note that if I use FileSink, both video and video look good in VBR and CBR modes.

Python version not working due to unregistered GUID

I tried to use the python version in Python 3.8.10, after updating the code from Python 2 and Tix to tkinter. It fails however on the GUID:

On the line: self.captureManager = cc.CreateObject('{D5F07FB8-CE60-4017-B215-95C8A0DDF42A}', None, None, comtypes.automation.IDispatch)
It fails with error: OSError: [WinError -2147221164] Class not registered

It seems the GUID of the captureManager is nowhere registered. Am I missing something?

How capture & stream from Wireless of GSM camera

Hello this is very nice!! is there a way to stream from the GSM devices, and can it handle any brand.

What is the discovery mechanism
Do I need special drivers for different brands or will ONVIF suffice, IP cam suffice
How to stream on an ASP web application

thansk

'System.AccessViolationException' when call SourceControl::getCollectionOfSources()

Hello,

I am getting a 'System.AccessViolationException' when the following line from any demo project is executed:

//Line 352 CaptureManager.cs
mCaptureManager.getCollectionOfSources(ref lxmldoc);

I have the latest video drivers from nvidia, I also tried removing nvidia drivers and only use Microsoft Drivers but the problem stills there.

I don't have this problem with my laptop dell. Both machines are running Windows 11.

No useful Log information is generated, only until line "INFO_LEVEL: DMOManager: DMO is initialized!!!" and after that the Memory read/write access violation (System.AccessViolationException) is raised.

I am using the commercial versions, 1.16 and 1.19

Any help would be much appreciated,

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.