directshow

How to grab laptop webcam video with ffmpeg in windows

孤街浪徒 提交于 2019-12-11 07:37:34
问题 I have a small python program that works very well to capture short videos from webcams in linux (at least for laptops that have built-in webcams) using a sub-process with ffmpeg. Now i'm trying to write the same program to capture webcams in windows, and i know i can't use the generic "/dev/video0" that works pretty well in linux, but i thought something like naming it "Integrated Camera" should be enough, but it fails. Here's my linux code (that works): import sys from subprocess import

GDCL Mpeg-4 Multiplexor Problem

别来无恙 提交于 2019-12-11 07:30:34
问题 I just create a simple graph SourceFilter(*.mp4 file format) ---> GDCL MPEG 4 Mux Filter ---> File writer Filter It works fine. But when the source is in h264 file format SourceFilter( *.h264 file format) ---> GDCL MPEG 4 Mux Filter---> File writer Filter It record a file but the recorded file does not play in VLC Player, QuickTime, BS Player, WM Player. What i am doing wrong? Any ideas to record h264 video source? Do i need H264 Mux? Best Wishes PS: i JUST want to record video by the way..

Inclusion of dshow.h results in definition errors

江枫思渺然 提交于 2019-12-11 07:25:11
问题 I am trying to do a few things using DirectShow for audio playback. I have a header file, at the top is: #pragma once #include <dshow.h> #pragma comment(lib, "strmiids.lib") and then it goes on to define a class. When including dshow.h I get the following complilation errors: C:\Program Files\Microsoft SDKs\Windows\v7.0\include\ddraw.h(703) : error C2011: '_DDPIXELFORMAT' : 'struct' type redefinition c:\program files\microsoft sdks\windows\v7.0\include\ksmedia.h(5749) : see declaration of '

Why CoCreateInstance returns REGDB_E_CLASSNOTREG on some Windows?

被刻印的时光 ゝ 提交于 2019-12-11 05:22:25
问题 I want to use DSound Audio Render in one of my application so I load it with CoCreateInstance. Here is a little snippet: #include <iostream> #include <strmif.h> #include <uuids.h> int main() { std::cout << "Start" << std::endl; HRESULT hr = CoInitialize(NULL); printf("CoInitialize = 0x%x\n", hr); IBaseFilter* ptr = NULL; hr = CoCreateInstance(CLSID_DSoundRender, NULL, CLSCTX_INPROC, IID_IBaseFilter, (void**)&ptr); printf("CoCreateInstance = 0x%x\n", hr); ptr->Release(); CoUninitialize(); std:

DirectShow return hresult 0x887601C2 on IMediaControl.Run()

旧巷老猫 提交于 2019-12-11 05:07:42
问题 I'm doing a simple C# code which uses DirectShowLib to record analog TV (everything in the broadcast: audio, video and VBI) from a USB PCTV. Sometimes, not always, when I call mediaControl.Run() method it crashes and returns HRESULT 0x887601C2, which I couldn't find a meaning for in any DirectShow or .NET documentation. Anyone knows what does the code mean? Thank you. 回答1: 0x887601C2 is DDERR_SURFACELOST and related to presentation of the video, such as for example that during playback you

Delay in video in DirectShow graph

北城以北 提交于 2019-12-11 04:35:16
问题 I'm seeing a noticeable video which is causing the resulting audio/video sync to be off for a capture card that I'm testing. My graph topology is as follows. Video Source -> Sample Grabber -> Null Renderer Audio Source -> Sample Grabber -> Null Renderer The samples from video is compressed using H264, and Audio is compressed using FAAC. This topology and application code works for capture cards that I've used in the past. But I see this delay with the current card that I'm testing. Naturally

GMFBridge with GMF GDCL MPEG 4 Mux Filter

人走茶凉 提交于 2019-12-11 04:09:38
问题 I try to use GDCL MPEG 4 Mux with GMFBridge. My original graph is: SourceFilter ---> GDCL MPEG 4 Mux Filter ---> FileWriter I want to give new file name based on my special criteria (such as time , for example every five minute) but not want to create whole graph again. So i try to use GMFBridge. I does not work. I really can not figure out how to use GMFBridge or it does not work. Note: Here is what i do with GMFBridge In order to use , i divide my graph into two pieces: FirstPart ==>

who can tell me something about IPropertyBag::Read?

删除回忆录丶 提交于 2019-12-11 03:58:42
问题 In directShow, except "FriendlyName",what other properties can i get from the IPropertyBag::Read? 回答1: "CLSID", "FriendlyName", sometimes "DevicePath". There might be filter-specific properties as well. Nothing else is there. 来源: https://stackoverflow.com/questions/12129961/who-can-tell-me-something-about-ipropertybagread

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

DirectShow RGB-YUV filter

帅比萌擦擦* 提交于 2019-12-11 02:53:11
问题 I would like to encode video in my app with VP8. I use RGB24 format in my app but VP8 DirectShow filter accepts only YUV format (http://www.webmproject.org/tools/#directshow_filters). I've googled the "RGB to YUV directshow filter" but no success. I don't want to write this filter myself from scratch, so I would appreciate if you help me with the information on where to find such filter. Thanks! 回答1: You could try Geraint Davies' YUV transform filter to see if it supports the conversion. 回答2: