directshow

Video Capture output always in 320x240 despite changing resolution

℡╲_俬逩灬. 提交于 2019-11-28 07:44:16
Ok I have been at this for 2 days and need help with this last part. I have a Microsoft LifeCam Cinema camera and I use the .NET DirectShowLib to capture the video stream. Well actually I use WPFMediaKit, but I am in the source code of that dealing directly with the direct show library now. What I have working is: - View the video output of the camera - Record the video output of the camera in ASF or AVI (the only 2 MediaType's supported with ICaptureGraphBuilder2) The problem is: I can save it as a .avi. This works fine and at a resolution of 1280x720 but it saves the file in RAW output.

Reading a video with openCV

落花浮王杯 提交于 2019-11-28 07:41:39
问题 I have a video engine2.avi that I want to read and show with openCV. Here's my code: #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <iostream> using namespace cv; int main(int argc, char** argv) { string filename = "D:\\BMDvideos\\engine2.avi"; VideoCapture capture(filename); Mat frame; if( !capture.isOpened() ) throw "Error when reading steam_avi"; namedWindow("w", 1); for( ; ; ) { capture >> frame; //if(!frame) // break; imshow("w", frame); waitKey(20); //

Where can I find a thorough DirectShow tutorial?

半城伤御伤魂 提交于 2019-11-28 06:34:07
I've read through the MSDN documentation on DirectShow and it's still confusing. I feel like I need more context for what the objects are: Graphs, Pins, Filters...etc. A Google search doesn't give me much to work with. What do I need to grok DirectShow? EDIT: The wikipedia page on DirectShow does a pretty good job. MSDN Magazine has a nice article in their July 2002 Issue: DirectShow: Core Media Technology in Windows XP Empowers You to Create Custom Audio/Video Processing Components Pascal Mignot from Université de Reims has gathered information from MSDN documentation into a single document ,

How can I create a video from a directory of images in C#?

只愿长相守 提交于 2019-11-28 05:31:32
I have a directory of bitmaps that are all of the same dimension. I would like to convert these bitmaps into a video file. I don't care if the video file (codec) is wmv or avi. My only requirement is that I specify the frame rate. This does not need to be cross platform, Windows (Vista and XP) only. I have read a few things about using the Windows Media SDK or DirectShow, but none of them are that explicit about providing code samples. Could anyone provide some insight, or some valuable resources that might help me to do this in C#? At the risk of being voted down, I'll offer a possible

How to capture PCM data from Wave Out

妖精的绣舞 提交于 2019-11-28 04:52:43
问题 How would it be possible to capture the audio programmatically? I am implementing an application that streams in real time the desktop on the network. The video part is finished. I need to implement the audio part. I need a way to get PCM data from the sound card to feed to my encoder (implemented using Windows Media Format). I think the answer is related to the openMixer(), waveInOpen() functions in Win32 API, but I am not sure exactly what should I do. How to open the necessary channel and

Best DirectShow way to capture image from web cam preview ? SampleGrabber is deprecated

六月ゝ 毕业季﹏ 提交于 2019-11-27 20:36:38
问题 I have developed DirectShow C++ app which successfully previews web cam view into provided window. Now I want to capture image from this live web cam preview. I have used graph manager, ICaptureGraphBuilder2, IMoniker etc. for that. I have searched and found following options: WIA & Sample Grabber. Many recommends using SampleGrabber but as per MS's msdn document SampleGrabber is deprecated and one should not use. And I don't want to use WIA API. So which is the best DirectShow way to capture

Where are the DirectShow samples in the Windows 8 SDK?

爷,独闯天下 提交于 2019-11-27 18:42:45
问题 DirectShow samples lived under (SDK samples root)\DirectShow\ in the Windows 7.1 SDK, but the Windows 8 SDK does not have the files neither in C:\Program Files (x86)\Windows Kits\8.0 nor C:\Program Files (x86)\Microsoft SDKs\Windows. The samples are also not for download at http://code.msdn.microsoft.com/windowsapps 回答1: I believe DirectShow is to be phased out and replaced by Microsoft Media Foundation (MF). I think that's been the intention since Windows Vista, although at that time MF was

Virtual Webcam Driver

走远了吗. 提交于 2019-11-27 18:24:19
I want to develop a virtual webcam driver which from User mode I'll pass image to it and it will display as webcam output. I don't want to use DirectX filter and CSourceStream etc. Because they don't work on some programs which doesn't use DirectX for capturing webcam image. I have to write a kernel mode device driver so. Any ideas? I tried testcap from DDK samples, but it doesn't process image from user mode and doesn't get any input, just it displays 7 colors in webcam... Any help would be greatly appreciated. Thanks Thank you all! I tried code from here: http://tmhare.mvps.org/downloads.htm

How to change Directshow filter properties C++

柔情痞子 提交于 2019-11-27 16:23:27
How to change Filter Properties programmatically? I am using a filter AAC encoder , and I can manually change its bitrate in graphedit by right clicking on the filter and entering the bitrate value. Is it possible to do the same through code? Please give me valuable suggestions and if possible with code. You do this via private filter-specific interface. You need to refer to filter documentation or SDK to get details on this ( VSS Tech Support ). Sometimes you can obtain the necessary information from type library. See: Controlling variables in filter remotely with out property page, How can I

C# + DirectShow.NET = Simple WebCam access?

不想你离开。 提交于 2019-11-27 12:57:22
I have found an example for accessing a webcam in C#. The example uses the DirectShow.NET library. I have tried to understand the code, but so far the only thing I could figure out is that somehow the usercontrol calls directshow to draw directly to the surface of the user control. I want to access each frame and put it into a Bitmap object. How can I tell when a new frame arrived? How can I capture this new frame into a Bitmap Object? This might be simple to answer if you know your way around DirectShow.NET. Shay Erlichmen You will need to use the ISampleGrabber interface there are many c++