English 中文(简体)
decode MPEG1/2 video with Media Foundation
原标题:

I am using Media Foundation to play videos. On windows 7 some videos encoded with Mpeg1/Mpeg2 PS and Windows Media Player can play them, but Media Foundation does not(I tried to register a stub MPEG1Source but it still does not work). I noticed some of these files could be played with directshow but not Media foundation(can not be open at all). I guess "media player" does not use Media Foundation only?

Is it possible to use Media Foundation to play these file? If it is not, how does Media player work? Thanks a lot.

P.S. I have read the windows SDK and I registered a "fake" mpeg1 decode and it shows a blank frame with no time code. Why we need a fake mpeg1 decoder if windows media player can decode it?

This topic is relative to best way to build graph for MPEG2 transport stream

最佳回答

Media Foundation does not have inbox support for MPEG-1 or MPEG-2. See: http://msdn.microsoft.com/en-us/library/dd757927(v=VS.85).aspx

Windows Media Player uses various code paths, including DShow, Media Foundation, and Windows Media Format SDK, depending on the source content.

问题回答

I have found some information about this question and set up a MPEG1 source with the fake decoder. The failure I ve been through is because bugs in SDK s code. About the MPEG1 decoder, I guess I have to use DShow s decoder in MF. Still have no idea about how MediaPlayer works.

In your Microsoft SDK installation directory, go to Microsoft SDKs -> Windows v7.0 -> Samples -> multimedia -> mediafoundation -> Decoder which contains an example MPEG-1 Decoder MFT. You might find it helpful.

There is new MPEG-2 Video Decoder MF filter at Windows 8. http://msdn.microsoft.com/en-us/library/windows/desktop/hh162909(v=vs.85).aspx





相关问题
How to convert DirectShow Filter to C++C#?

We have some filter for DS. It works - uses standard win dll s. We want to convert that filter to some sort of program that doesn t rely on using DS. We want it to call dlls in the right order, do ...

DirectShow analog for Symbian OS?

So Windows Mobile has its DirectShow for media editing capturing and so what is its analog for Symbian OS (s60 v5)?

GStreamer or DirectShow for Windows development? [closed]

I m implementing a lecture-capture project for a local university. Multiple video streams will arrive at one PC: the presenter s desktop slides, a video camera image of the presenter himself and ...

Is it possible to capture HDV/HD stream using DirectShow API

We currently use the DirectShow API to stream standard definition video into our application via Firewire. Sadly, this code was mostly cobbled together from various places on the internet and to say ...

convert movie file to bitmap files with DirectShow

I want to convert movie files like AVI, MOV etc. to Bitmap-Files, like JPEG, JPEG2000, TIFF etc. Is it possible to realize that with DirectX / DirectShow? Is AVCodec from ffmpeg the much more better ...

热门标签