ms-media-foundation

Convert AAC to WAV

落爺英雄遲暮 提交于 2019-12-09 13:44:09
问题 I'm already using the Media Foundation APIs (thanks to MFManagedEncode, http://blogs.msdn.com/b/mf/archive/2010/02/18/mfmanagedencode.aspx) to convert wav to aac. I haven't fully got my head around how this works, but it does work- thankfully. Now I'm finding it difficult transcoding the other way, even though there is a MF codec for it (AAC Decoder). I can't find examples of how to use this and I'm finding the MSDN documentation for it cryptic to say the least; anyone had an luck with it? A

GOP setting is not honored by Intel H264 hardware MFT

岁酱吖の 提交于 2019-12-09 12:22:05
问题 Problem statement: Intel hardware MFT is not honoring the GOP setting, resulting in more bandwidth consumption in realtime applications. The same code works fine on Nvidia hardware MFT. Background: I'm trying to encode NV12 samples captured through DesktopDuplication APIs to video stream using MediaFoundation H264 hardware encoder on Windows10 machine, stream and render the same in real-time over LAN. Initially, I was facing too much buffering at the encoder as the encoder was buffering up to

Media Foundation webcam video H264 encode/decode produces artifacts when played back

不打扰是莪最后的温柔 提交于 2019-12-09 11:12:27
问题 I have a solution, where I encode video (YUY2) samples from a webcam with Media Foundation's h264 encoder. Then I send it via TCP connection to another application that decodes the stream with Media Foundation's h264 decoder back to YUY2 format. After decoding, the video samples/images are presented at the screen using DirectX. The problem is that between key-frames the video image gets increasing amount of artifacts. Artifacts disappear when a key-frame is received. I dropped the TCP

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

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

MFTransform encoder->ProcessInput returns E_FAIL

早过忘川 提交于 2019-12-08 08:22:09
问题 When I run encoder->ProcessInput(stream_id, sample.Get(), 0) I am getting a E_FAIL ("Unspecified error") error which isn't very helpful. I am either trying to (1) Figure out what the real error is and/or (2) get past this unspecified error. Ultimately, my goal is achieving this: http://alax.info/blog/1716 Here's the gist of what I am doing: (Error occurs in this block) void encode_frame(ComPtr<ID3D11Texture2D> texture) { _com_error error = NULL; IMFTransform *encoder = nullptr; encoder = get

Get native video resolution of a video file

前提是你 提交于 2019-12-08 06:33:35
问题 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

media foundation H264 decoder not working properly

馋奶兔 提交于 2019-12-08 06:20:48
问题 I'm creating an application for video conferencing using media foundation and I'm having an issue decoding the H264 video frames I receive over the network. The Design Currently my network source queues a token on every request sample, unless there is an available stored sample. If a sample arrives over the network and no token is available the sample is stored in a linked list. Otherwise it is queued with the MEMediaSample event. I also have the decoder set to low latency. My Issue When

How to create IMFSample for WindowsMediaFoundation H.264 encoder MFT

你。 提交于 2019-12-08 05:13:48
问题 I'm learning to use the H.264 encoder in Windows Media Foundation. What I currently have are media samples in YUV420p format, so that's buffers containing YYYYYYYYUUVV data. Since the H.264 encoder MFT requires input in form of IMFSample, I'm not sure how to convert the data in buffer into IMFSample. May I just do like this: IMFMediaBuffer *pBuffer = NULL; MFCreateMemoryBuffer(cbSize, &pBuffer); BYTE *pData = NULL; pBuffer->Lock(&pData, NULL, NULL); memcpy(pData, bufferIhaveinYYYYUV format,

Asynchronous MFT is not sending MFTransformHaveOutput Event(Intel Hardware MJPEG Decoder MFT)

落爺英雄遲暮 提交于 2019-12-08 04:14:16
问题 I'm developing USB camera streaming Desktop application using MediaFoundation SourceReader technique. The camera is having USB3.0 support and gives 60fps for 1080p MJPG video format resolution. I used Software MJPEG Decoder MFT to convert MJPG to YUY2 frames and then converted into the RGB32 frame to draw on the window. Instead of 60fps, I'm able to render only 30fps on the window when using this software decoder. I have posted a question on this site and got some suggestion to use Intel