directshow.net

VideoCamera get supported resolutions

别说谁变了你拦得住时间么 提交于 2019-12-11 13:50:24
问题 I'm using DirectShow library (DirectShowLib-2005.dll) with C# to capture a video camera image. When I'm definig the capture object's size, I have these parameters: const int VIDEOWIDTH = 640; // Depends on video device caps const int VIDEOHEIGHT = 480; // Depends on video device caps const int VIDEOBITSPERPIXEL = 24; // BitsPerPixel values determined by device capture = new Capture(0, VIDEOWIDTH, VIDEOHEIGHT, VIDEOBITSPERPIXEL, pictureBox1); I'm using this loop for getting the names of

Two Instances from one Webcam

假如想象 提交于 2019-12-11 12:52:08
问题 I am new at DirectShow and found one example to capture when i ran two instances of this app it throws exceptions like camera is already in use.I having a requirement that the same camera will be shared by two Applications. Is it possible to acheive this using any filters Thanks in advance 回答1: DirectShow web cameras are typically exclusive use resources, applications cannot share them. One solution is to use a virtual camera software that creates a virtual device available to many apps,

How can i Programmatically set a Directshow Filters' options?

自闭症网瘾萝莉.ら 提交于 2019-12-11 12:38:53
问题 I have filters in Graphedit whose settings can be changed. I have a usb webcam which i can go to its properties and make it stream at different sizes, but im not sure how i would change these types of options programmatically without popping up the actual webcam property box. I want to keep it stream lined in a sense. .QueryFilterInfo() didn't give me any access to those types of options, and neither did .QueryPinInfo() Is there a way to get access to these options in C#? Update: http:/

Retrieving the COM class factory for component with CLSID {…} failed due to the following error: 80040154

早过忘川 提交于 2019-12-11 08:54:04
问题 I am using DirectShowLib and SampleGrabber to capture video frames of an AVI file. I am accomplishing this by using graph builder and couple of filters. Everything was working fine, I was able to initialize graph and filters. I then added code to get some video information like Dimension, Frame rate e.t.c. For this I used to IMediaDet. But when I try to initialize it: Type t = Type.GetTypeFromCLSID(new Guid("65BD0710-24D2-4ff7-9324-ED2E5D3ABAFA")); IMediaDet mediaDet = (IMediaDet)Activator

DirectShow - Capture Webcam While Viewing It?

空扰寡人 提交于 2019-12-11 03:27:57
问题 I am trying to make a webcam application in c# that allows users to record video. I have been using DirectShow.Net to preview the webcam and to take snapshots. But need to be able to capture video and audio while previewing the webcam at the same time. One thing I tried was using capturing multiple snapshots and converting them to a video using ffmpeg, however this obviously does not capture audio. Any ideas on how I could accomplish this? 回答1: Things you should be aware of: Capture device is

How to simulate low memory for .net application?

别来无恙 提交于 2019-12-10 16:46:02
问题 Well, I have to debug a memory allocation issue. The application runs out of memory over time. I need to simulate low memory system for a .net window app, as a way to reproduce the out of memory issue more quickly. PS: My initial investigation suggests that the memory leak is occurring while the application is allocating unmanaged resources (Managed DX). 回答1: Write another program that allocates all of your system's memory :) Alternatively, debug in a VM with low memory 回答2: static volatile

Get WebCam status using C#

三世轮回 提交于 2019-12-10 11:20:01
问题 I use DirectShowLib .Net to capture images from WebCam. How get state of my WebCam in C#? I mean if it's alredy using by another app? 回答1: Build a capture graph, such as Camera -> Null Renderer and put it into paused state. If you succeeded, the camera is (was) idle becuase otherwise this third party app would lock it exclusively. You could possibly use IAMResourceControl too, but it's unlikely to be available for a camera device. 来源: https://stackoverflow.com/questions/8655951/get-webcam

Capturing pictures from webcam at high resolution while previewing at a lower one using DirectShow.Net

我与影子孤独终老i 提交于 2019-12-10 03:26:54
问题 I am using DirectShow.Net to stream a webcam to my C# (4.0) app for reading QR codes. It is taking a snapshot every .5 seconds to see if it can find any QR codes and decode them. This works great on my dev computer at any resolution I can get my webcam to, but when I try it on a target machine (Panasonic CF-U1 Toughbook - Intel Atom processor) it really starts to bog down when I go to a higher resolutions than 800x600 on the webcam. I am using the Capture class from the DirectShow.Net DxSnap

video record and playback at same time using DirectShow

筅森魡賤 提交于 2019-12-08 11:42:49
问题 I should develop an application that records and plays recorded video while recording continues (without stopping graph). I know how to use and develop using DirectShow but I need architecture of my graph. What filters should I use? I did it with raw video using DirectShow and SampleGrabber but I should compress video and I have no idea how to do it in compressed video file (which is not closed, because recording continues). I think MPEG-2 recording is the best for my application but please

How To Get A List Of Available Video Capture Devices

谁说胖子不能爱 提交于 2019-12-08 08:04:11
问题 I am creating a project using DirectShow.Net that shows a preview of a webcam view within a windows form using Visual C#. I would like to start with gaining a collection of available video devices so I can choose between either the built in webcam or the USB webcam. I have seen several examples of this being done in C++, e.g. on the msdn "http://msdn.microsoft.com/en-us/library/windows/desktop/dd377566(v=vs.85).aspx". However as I do not know any C++ I do not know how to convert this code