ms-media-foundation

Creating NV12 encoded video using windows media foundation

≯℡__Kan透↙ 提交于 2019-12-24 11:27:43
问题 I was learning to create video files with raw fixed colored images using Windows Media Foundation using this tutorial http://blogs.msdn.com/b/eternalcoding/archive/2013/03/06/developing-a-winrt-component-to-create-a-video-file-using-media-foundation.aspx I was able to create RGB encoded WMV video shown in the above link. But i need to create YUV encoded MP4 video in NV12 format from image. Since NV12 use (W x H x 3/2) bytes of memory buffer for each frame, i created (W x H x 3/2) bytes of

Extract RGB32 Byte Data from IMFSample

浪尽此生 提交于 2019-12-24 10:00:09
问题 I have IMFSample data that is RGB32 , and I want to convert this format to BMP or I want to extract the actual RGB32 bytes and save to file and then using some external tool convert to BMP or any other format. So question is how can I get RGB32 data from IMFSample 回答1: The IMFMediaBuffer interface can be taken via the ConvertToContiguousBuffer call (as mentioned in another answer). Additionally, the IMFMediaBuffer can be queried for IMF2DBuffer: https://msdn.microsoft.com/en-us/library

Add two media sources in topology and display mix video - Windows Media Foundation

不羁岁月 提交于 2019-12-24 08:37:07
问题 I am exploring windows media foundation. I want to mix and display two video stream in one window. I am following few of the sample provided by MS. I am trying to Add multiple media sources to topology, I want to add two media files to topology. As per the below link, I am following code to add media source in topology: https://msdn.microsoft.com/en-us/library/windows/desktop/ms701605(v=vs.85).aspx Below is the code to add source node to the topology: HRESULT hr = pPD-

Media foundation custom mixer MFT getting error MF_E_CANNOT_CREATE_SINK

风格不统一 提交于 2019-12-24 06:01:07
问题 I am using Windows Media Foundation for creating video playing app. I have created custom EVR mixer using the IMFTransform interface and few of the other mandatory Interfaces as mentioned in the below link. https://msdn.microsoft.com/en-us/library/windows/desktop/ms701624(v=vs.85).aspx I have created custom mixer as a DLL and also successful registered it. Then I have added this custom mixer using below code in the EVR: // Create the video renderer. hr = MFCreateVideoRendererActivate

Media foundation custom mixer MFT getting error MF_E_CANNOT_CREATE_SINK

只谈情不闲聊 提交于 2019-12-24 06:00:54
问题 I am using Windows Media Foundation for creating video playing app. I have created custom EVR mixer using the IMFTransform interface and few of the other mandatory Interfaces as mentioned in the below link. https://msdn.microsoft.com/en-us/library/windows/desktop/ms701624(v=vs.85).aspx I have created custom mixer as a DLL and also successful registered it. Then I have added this custom mixer using below code in the EVR: // Create the video renderer. hr = MFCreateVideoRendererActivate

Where is the CLSID for Media Foundation H264 Encoder?

主宰稳场 提交于 2019-12-24 05:26:26
问题 The Media Foundation H264 Encoder MFT documentation does not mention a CLSID for the encoder. Other Encoder class IDs, and the H264 Decoder MFT class ID are defined at \Program Files (x86)\Microsoft SDKs\7.1\Include\wmcodecdsp.h or \Program Files (x86)\Windows Kits\8.x\Include\am\wmcodecdsp.h I see this codec when I enumerate the devices, and can obtain the CLSID, which is {6ca50344-051a-4ded-9779-a43305165e35}, from the enumerated list, but I cannot find a named GUID, which I would expect to

MediaFoundation can´t find video capture emulator driver. But DirectShow does

孤街醉人 提交于 2019-12-24 02:52:14
问题 We are developing a software in which we preview and record an input video source captured from a video-capture card. The preview is implemented with DirectShow and the recording with Media Foundation (it´s an old software slowly upgrading to MediaFoundation) The problem is with MediaFoundation: it seems to find correctly the video-capture card at our release machine, but not the "screen-capture" video emulator that we use at the testing machines. At the other hand, the DirectShow code finds

Feeding D3D surfaces to Quick Sync encoder MFT does not work

扶醉桌前 提交于 2019-12-23 03:58:22
问题 I want to encode video using the "Intel® Quick Sync Video H.264 Encoder MFT". I'm using the MFT manually, without using a paired decoder MFT, or any other MediaFoundation components. Feeding normal buffers (IMFSamples with buffers created by MFCreateAlignedMemoryBuffer) works well. Now I'm investigating whether I can feed it ID3D11Texture2D surfaces as input (DXGI_FORMAT_NV12, 1280x720) in order to improve performance. I tried to pass IMFSample instances created with

How to generate “moov before mdat” MP4 video files with Media Foundation

余生长醉 提交于 2019-12-23 02:42:04
问题 I've discovered that Microsoft Media Foundation generates MPEG4 file in which the MDAT atom comes before the MOOV atom. MOOV before MDAT is required for streaming. I assumed the solution to my problem would be to use the MF_MPEG4SINK_MOOV_BEFORE_MDAT attribute when creating the sink, but I can't seem to get it to have an effect. My code is largely the same as that http://blogs.msdn.com/b/eternalcoding/archive/2013/03/06/developing-a-winrt-component-to-create-a-video-file-using-media

WASAPI Resampling / Windows Media Foundation

…衆ロ難τιáo~ 提交于 2019-12-22 10:37:57
问题 I'm writing a Pro Audio application using WASAPI. This application runs a stream in exclusive mode, and resamples the audio data to and from a constant format in both directions (one resample between the capture device and the app, and another between the app and the output device). There's a page on MSDN about an Audio Resampler DSP here, but I'm not sure if this is the API I want to use. The reason I'm not sure about it is the way the API is designed. Using IMFTransform, I need a bunch of