What Types of Video Can MediaElement Play?
Asked Answered
Q

1

6

I'm looking for detailed information on what decides the formats of media that MediaElement can play, I can't seem to find any definitive source. I've read somewhere that if it can be played in WMP then MediaElement can play it. Is this true? If it is, then my next question is where can I find the capabilities and limitations of WMP? And where does the association lie between WPF's MediaElement and WMP? I'm looking for a better understanding of these components and video playback in WPF and have so far struggled to find anything online.

Quentinquercetin answered 5/8, 2010 at 17:3 Comment(0)
P
8

MediaElement internally uses the WMP ActiveX. In theory, MediaElement could/should be able to play anything WMP can, but it's not always the case, for example .vob files.

When you play a file in MediaElement, the Windows Media Player ActiveX is loaded. WMP will then decide to use DirectShow or MediaFoundation paths for playing the media. The types of media it can play depends largely on what kind of codecs (DirectShow or MF) are installed on your computer. Once a media path is chosen, WPF will provide a custom presenter for the Enhanced Video Renderer so each video frame will be rendered to a D3D surface, primed for presentation within the WPF composition engine.

Phthisic answered 8/8, 2010 at 5:21 Comment(3)
This is great, thanks for the explanation. Two more questions though - 1) Is there a way to see what codecs are installed on a machine that are available to Directshow and MF? 2) Any idea on what criteria is checked to decide on Directshow vs MF playback? Thanks!Quentinquercetin
The easiest way to see what codecs are available is to use GraphEdit in the bin directory of the Windows SDK. I don't think a similar utility exists yet for MF. I'm not sure what criteria is used for using MF or DShow. My only assumption is it trys MF first and then falls back to DShow. MF in Windows 7 will supports some flavors of MPEG4, like h264 and WMV (maybe WM7, 8 and VC1).Phthisic
Now what should we do if we need to play .vob files in a WPF application?Kiddy

© 2022 - 2024 — McMap. All rights reserved.