directshow

how to change OutPut Pin Size & ColorSpace/Compression in DirectShow

痞子三分冷 提交于 2019-12-09 03:51:27
问题 how to change OutPut Pin Size & ColorSpace/Compression of a Video Source Filter in DirectShow I want to Know whre the Output Pin PropertyPage Datas are stored and how can I Change those Datas By My Code 回答1: You can use IPin::EnumMediaTypes on your filter's output pin to get a list of supported media types / video formats. Afterwards, call IAMStreamConfig::GetFormat to get the current format in an AM_MEDIA_TYPE structure. Modify this structure as you wish (make sure your format is supported

best way to build graph for MPEG2 transport stream

浪子不回头ぞ 提交于 2019-12-09 01:39:12
问题 on windows 7 the windows media player supports .ts files very well, in the sense that windows media player knows how to handle such files without any additional codec packs. however if I try to use graphedit to "render" a .ts file, it complains it doesnt know how to build a graph for it. what method does windows media player use to demux/decode these files? is it directshow? windows media foundation? BDA? Microsoft TV Technologies? unified tuning model? whatever the method they use, is

How can I adjust the video to a specified size in VMR9 renderless mode?

帅比萌擦擦* 提交于 2019-12-08 23:30:31
I want to adjust the video to display on a specified window, for example 320*240. I must use VMR-9 Renderless mode to render to a surface. I am using the IVMRMixerControl9->SetOutputRect() method to adjust the video size. So I must get the native video size. But I don't know how. The GetOutputRect method always return 0 and 1. The get_VideoHeight and get_VideoWidth method return E_NOINTERFACE. But I do build a filterGraph with a video file. Do I have the wrong idea or there are other method? Thanks in advance! Not sure if this would help you, but have you looked at the VMR's windowless mode?

IGraphBuilder::RenderFile() failing with VFW_E_BAD_KEY - 0x800403f2

Deadly 提交于 2019-12-08 20:02:42
Continuing investigation on a embedded WindowsMediaPlayer problem , i am trying to do simple file playback via a DirectShow in-process server: ::CoInitializeEx(0, COINIT_MULTITHREADED); CComPtr<IGraphBuilder> spGraph; spGraph.CoCreateInstance(CLSID_FilterGraph, 0, CLSCTX_INPROC_SERVER); CComQIPtr<IMediaControl> spMediaControl(spGraph); // ... later: spGraph->RenderFile(L"c:\\foo.wav", 0); // fails with VFW_E_BAD_KEY spMediaControl->Run(); Interestingly, this runs fine on both systems i tested on (Windows XP 32 & x64) when doing it in a stand-alone application. It however fails in my real use

Getting stuttering during rendering of my DirectShow filter despite output file being “smooth”

大城市里の小女人 提交于 2019-12-08 19:28:31
I have a DirectShow application written in Delphi 6 using the DSPACK component library. I have two filter graphs that cooperate with each other. The primary filter graph has this structure: Capture Filter with 100 ms buffer size. (connected to) A Sample Grabber Filter. The "secondary" filter graph has this structure. Custom Push Source Filter that accepts audio directly to an audio buffer storehouse it manages. (connected to) A Render Filter. The Push Source Filter uses an Event to control delivery of audio. Its FillBuffer() command waits on the Event. The Event is signaled when new audio data

Get native video resolution of a video file

爱⌒轻易说出口 提交于 2019-12-08 14:10:31
I'm currently writing some custom EVR for a Media Foundation player. So far everything work, but i'm in need of finding the native resolution of the video file i'm rendering. I try to use the IBasicFilter2 Interface to use the getVideoSize, get_VideoHeight or other get_SourceWidth etc... but it always return me a E_NOINTERFACE... So do someone have an esay way of getting resolution of a video file? Even if it's with a nice light library...just the size nothing else...Windows manage to find it inside the file browser, but i'm totally unable to get it from code... Thanks! persiflage You can use

get loudness level from raw data recieved from microphone in DirectShow

感情迁移 提交于 2019-12-08 13:52:39
问题 How I can get loudness level from raw data received from microphone in DirectShow? IMediaSample keep data in bytes. And how I can read this bytes and get something? 回答1: Loudness is an aural quality, not a physic formula. There are many many definitions for it. It's a also a temporal value. As a consequence, this value changes during the time. The simplest implementation I remember I had seen some years ago, was simply putting a time out on the maximum value of the amplitude. But the log of

directshow RedenStream Fails for Capture

故事扮演 提交于 2019-12-08 11:52:03
问题 I am making an Directshow Application to Capture MP4 video. I use below graph to do so. Input Stream --> MJPEG Decompressor --> x264vfw H.264/MPEG-4 AVC Codec --> GDCL Mpeg-4 Multiplexor --> File Writer in my directshow application , i created the required filters and connect them on graph , at end i do file writer operation and redder stream using pin as capture. that part of my code is as below. GUID guid; guid = MEDIASUBTYPE_x264; hr = gcap.pBuilder->SetOutputFileName(&guid, gcap

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

WMV media streams appear more pixelated on Windows 7 than on XP

混江龙づ霸主 提交于 2019-12-08 08:24:40
问题 Our streaming media player is an in house C++/DirectShow application and runs on XP and greater. One of our most widely used streaming codecs is WMV, as it's widely supported. We've noticed that output from WMV media streams looks different on Windows 7 clients than on Windows XP. Windows 7 output looks much more pixelated / blocky for WMV streams. An identical stream (coming from a media server) on Windows XP appears much smoother / less pixelated. The same playback graph is used on both