MP4 video

Feb 21, 2010 at 6:13 PM

in Windows7 Windows MediaPlayer can play MP4 video, but I can't play thoose videos with WPF MediaKit, how come? Isent MediaKit using Windows codecs.  How can I solv this?

Coordinator
Feb 22, 2010 at 7:42 AM

Do they play in graphedit?  WMP can use MediaFoundation also, where MediaKits support is not finished.  Not sure if this codec is MF only or not.

Feb 22, 2010 at 8:53 AM
Edited Feb 22, 2010 at 8:54 AM

No I can't play the MP4 video in GraphEdit, says format not supported.


But looking at the supported mediaformat for Windows7, H.264 is there: http://msdn.microsoft.com/en-us/library/dd757927(VS.85).aspx   How can I use MF in WPFMediaKit?

 

Coordinator
Feb 22, 2010 at 8:58 AM
Unfortunately I have not had time to complete a MediaFoundation player for MediaKit, though the video renderer (EVR) is fully supported.

I think you can get DShow support if you install the "Haali Matroska Splitter" (supports mp4 container I think) and ffdshow.
Feb 22, 2010 at 9:15 AM

Yes it works with ffdshow, but I want it to work on a "clean" Windows7, and I belive Win7 MF codec do a better job than ffdshow.

Hope you get time to complete the MF part in MediaKit.

Coordinator
Feb 22, 2010 at 9:27 AM
I think h264 is supported in dshow, but may not have a splitter for the mp4 container.

Apr 19, 2010 at 9:43 PM

is it possible in WPF MediaKit to create a graph with DShow filter which are not registered on the system ?

 

Media Player Classic does just that : it ships with embedded .ax filters, and it uses them without having to install them on the system ( so you can keep your "clean" windows 7 installation)

is it possible to do something similar ?

Coordinator
Apr 19, 2010 at 9:53 PM
Absolutely.  This is not a MediaKit specific thing though, but a general COM related question.  The custom EVR presenter I have in there is actually a COM object that isn't reg'd with the system.  You can look at MediaFoundation\EvrPresenter.cs CreateNew method.  I run DllGetClassObject  to do a lot of the magic.  Of course you will have to create your own player/element...or edit some of the built in ones to support it..but shouldn't be too hard.

-Jer
Apr 20, 2010 at 8:53 PM
Edited Apr 20, 2010 at 8:55 PM

You're Awesome, Jer !

I've managed to do this very easily !

Just had to :

- call the DllGetClassObject on the .ax filter to get an instance of the IClassFactory ( thanks to you for having defined this one and all the others in managed code ;) )

- call the CreateInstance method of the IClassFactory to get an IFilterBase, and add this to the current filterGraph before  the call to AddSourceFilter ! 

Works like a charm! If you want me to do so, I could contribute to the WPF MediaKit to make this feature available to everybody

 

Coordinator
Apr 20, 2010 at 8:59 PM
Sure!  Send over the class.  Don't know when I'd be able to get it in as I got a terrible flu this week :(

Thanks a bunch!

-Jer
Apr 20, 2010 at 9:04 PM

no worries,anyway, I'll have to make a clean implementation, because so far I've only made a proof-of-concept method, so ... I'll keep you posted when I'm done :)

Apr 20, 2010 at 9:34 PM

...and get well soon ;)

Coordinator
Apr 20, 2010 at 9:39 PM

Thanks bud!  I’m trying to get better, but this flu isn’t letting me J

-Jer

Apr 24, 2010 at 3:10 PM

Hey, I have a clean implementation to support injecting your own filters in your own graph, if you want, you can include me as a contributor so I can check in my modifications, that'll be easier and you'll bea easily able to spot changes and validate them !

what do you say ?

I can also add a method to create a IBaseFilter object based on the .ax filepath and the CLSID in order to use unregistered filters.

keep me in touch ;)

 

-salfab

Dec 17, 2011 at 6:04 PM

In getting the latest version, I can't play MP4 files.  i assume it is because this never got implemented.  I am running Win7 x64.  Can someone please post the code changes here so that I can add it to my version.

 

Thanks.

-Mike

Jul 26, 2012 at 2:17 PM

Hi, I tried WPF MediaKit  (latest version), because I need to play mp4 files, but without success. Even sample application don't play it (neither win 7 64bit or win XP 32bit)

Is there someone who made it work?

Thanks for reply

Jaroslav

Mar 23, 2014 at 10:03 PM
Salfab, Would you send over your proof of concept??