Make MediaElement support more video codecs
Asked Answered
L

3

9

Is there a way to make MediaElement support more video codecs like mkv, flv, mov etc.? If not, is there any other control that supports more video codecs?

Lur answered 4/9, 2012 at 17:39 Comment(3)
using WinRT you cann add custom decoders (adding a custom MFT at runtime)Alvita
@Don'tForgettoUpvote, can you tell me how you resolved the problem ?Quin
@JoachimKerschbaumer how? See my question here. I 've registered it for Media Foundation apps but MediaElement won't see it.Studdingsail
T
5

Have you seen the Player Framework? It's an open source component supporting Windows 8, part of the Microsoft Media Platform, and developed by Microsoft. It's an alternative to the standard MediaElement control, and provides a plug-in mechanism. I'm not sure whether you can support extra codecs through this mechanism though.

Other than that, you can also extend the media platform (the extension has to be written in C++ though) as shown in these samples provided by Microsoft:

The second example is very interesting as it's a sample media extension adding the MediaStreamSource mechanism as in Silverlight. Thanks to this extension you could implement your own MediaStreamSource in C#/VB.NET providing content to the MediaElement.

Tews answered 23/10, 2012 at 12:1 Comment(0)
U
2

It seems impossible as WinRT has completely different set of API and all existing win32 based codecs won't run unless codec owners rewrite them. One long way will be to port win32 code into winrt which will require in depth knowledge of both and seems way too long to do it. Even if somehow you will find way to make existing codec work, it will not work on arm based windows 8 tablets.

This means, there are no codecs for winrt other then Microsoft has provided.

Your options are to convert them into h.264 video, which has become a standard as h.264 plays on all devices. Apple did great job by standardizing video. Win 7 onwards, microsoft has provided inbuilt support for h.264.

Unpredictable answered 14/9, 2012 at 20:11 Comment(0)
G
1

MediaElement plays whatever the windows media player can play. So if you have the right set of codecs installed on your PC it can be a pretty versatile media player.

Personally I have installed K-Lite codecs

As well as Media_player_codec_pack codecs

And now my Windows Media Player doesn't lag anymore when playing mp4 files. Just follow the suggestion of the installer and restart your PC BEFORE starting the installation process. Also... it attempts to trick you with dialogs to install secondary software so BEWARE!!

Once Installed, just remember to experiment with the "preferred acceleration" parameter in the application's video settings, to see what goes better according to your hardware. I have set it to - CUVID.

I also installed this set of codecs to support avi format

Hope this helps :)

Gironde answered 25/4, 2015 at 8:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.