|
Sep
7
Written by:
Jeremiah Morrill
9/7/2008 2:42 PM
I run Vista x64 on my development computer, so it's pretty easy for me to test compatibility with 32bit and 64bit when I'm coding. While coding some more on the WPF Media Kit last night, I decided that I wanted the WPF MediaKit to support 64bit too. This of course is impossible with the MDX libraries. The MDX libraries are written in .NET 1.1 and compiled for 32bit only. Weak huh? So based on a suggestion from one of you guys, I checked out SlimDX, which is a managed wrapper for DirectX. The drawback was they didn't seem to have any 9Ex support, which is a must for Vista performance. Since it was open-source, I was just going to add my own support. While downloading the source from their SVN, I noticed that they have indeed added 9Ex support! I ported all the MDX code over to SlimDX, which was fairly painless, though the API is slightly different, it was easy to navigate. Now the WPF MediaKit supports 64bit and no more .NET 1.1 MDX! Now if there were only more 64bit DirectShow filters... Oh yeah, no more MDA LoaderLocks "exceptions" either :) -Jer
Tags:
26 comment(s) so far...
Re: WPF MediaKit, SlimDX and 64bit
Wow 64bit that is so sweet. But for "simple" video playback, DVB (digital-TV) and DVD should work just fine under x64 (or?)
Can't wait for testing your new stuff Jer.
By Ken on
9/7/2008 11:51 PM
|
Re: WPF MediaKit, SlimDX and 64bit
I can't believe I hadn't heard about SlimDX! I guess I'm a full fledge WPF convert after all. 64bit support is very sweet! Keep up the good work.
-Eric
By Eric Meyer on
9/8/2008 6:29 AM
|
Re: WPF MediaKit, SlimDX and 64bit
I actually was the one to open the missing 9Ex support as an issue in the SlimDX. They did a great job to have something cooked for it in no time: http://code.google.com/p/slimdx/issues/detail?id=322&colspec=ID%20Type%20Status%20Priority%20Owner%20Summary
SlimDX seems to be the best managed wrapper for DirectX currently and the crew seems to be very active on implementing features requested by the users.
Sorry for sounding like a advertisement and no I'm not affiliated with the SlimDX project or the crew behind it.
By Pekka Heikura on
9/8/2008 10:55 AM
|
Re: WPF MediaKit, SlimDX and 64bit
Hi Jeremiah, have you seen the VLCElement s: http://forum.videolan.org/viewtopic.php?f=14&t=36249&st=0&sk=t&sd=a ?
Found it when googling around. perhaps this project also should be updated to use the new mediakit?
By simsod on
9/8/2008 12:53 PM
|
Re: WPF MediaKit, SlimDX and 64bit
Hi simsod,
I had modified someones VLC ->WPF project that used the inefficient WriteableBitmap to render video, to use the VRE. I did this mostly for testing/play purposes. I honestly don't think that VLC is good to be used as a 3rd party library per say, but I think WPF could spruce up their UI quite a bit. If you are looking for compatibility with most types of media, I suggest the FFDSHOW DirectShow filter. I haven't found any audio/video that it could not play. http://ffdshow-tryout.sf.net/
By Jeremiah Morrill on
9/9/2008 8:38 AM
|
Re: WPF MediaKit, SlimDX and 64bit
Although I have Vista, I haven't had a chance to play with the WPF stuff on it when integrating with Direct3D. I put the support for 9Ex into SlimDX, but I never actually compared it against a regular 9 device when using WPF. How serious is the perf penalty that everyone talks about here? I find it difficult to believe it could be "that bad", but I really haven't looked into it and I don't remember the Ex devices interacting with the driver any differently...
By Promit on
9/9/2008 12:40 PM
|
Re: WPF MediaKit, SlimDX and 64bit
It's hard to give a blanket statement on performance with 9Ex, because it really depends on the scene. In this particular video scenario, it's over a 2x performance hit.
Thanks again for adding the 9Ex support! It was very much needed!
-Jer
By Jeremiah Morrill on
9/9/2008 12:54 PM
|
Re: WPF MediaKit, SlimDX and 64bit
Hello Jeremiah,
I am very interested in your project! Indeed, I am building a WPF application that has support for video playback. I am having a hard time finding a good library for it. I have tried VLC with a WinForm interop, but that does not help build my UI the way I want. I am also not convinced with the VLC->WPF project you mentioned above. If you had to build such a project, what library/component would you use?
Another question, more specific to your project: I have made some tests with the preview you released earlier and I am a bit surprised as regards the performances. Your sample application uses 25-30% of my CPU, when MPC, VLC and my WPF application with VLC use between 2 and 8%. Do you have the same results when you test it? Can it be improved?
Thanks in advance for your answer.
Damien
By Damien on
9/10/2008 10:21 AM
|
Re: WPF MediaKit, SlimDX and 64bit
Try benchmarking against mediaelement. Your gpu may not be performant enough. Will post more later. Just got on plane.
By Jeremiah morrill on
9/10/2008 1:18 PM
|
Re: WPF MediaKit, SlimDX and 64bit
Hello Jeremiah,
I have run some more benchmarking. I have created a minimal WPF application for this and used alternatively the WPF MediaElement and your MediaUriElement. My computer is equipped with an Intel P4 530J (3.0GHz, HT) and a Radeon X800XL (256MB RAM). Here are my CPU usage:
ME vs MUE Divx low bitrate and reso 1-2% vs 12-15% Divx higher bitrate and reso 5-6% vs 18-25% MPEG2 3-5% vs 30-35%
Concerning WPFMediaKit, I have also noticed that the bigger the video output (I have a 1920x1200 resolution) the higher the CPU usage. I haven't noticed such a thing for MediaElement.
I hope this can help you.
By Damien on
9/11/2008 10:11 AM
|
Re: WPF MediaKit, SlimDX and 64bit
Damien,
This is really odd. I have a single core 3.4ghz w/ a slow old ATI x600 mobility and the D3D video player was able to do a 1080p WMV file at ~45% CPU usage, MediaElement at ~50% and Windows Media Player, ironically was ~55% CPU.
Testing on my Nvidia 9800 w/ 512 megs of RAM, 2.6ghz, I noticed that MediaElement runs slightly faster than my D3DImage player, but not by much (around 4% better).
What operating system did you test on? Vista or XP, 32 or 64 bit?
-Jer
By Jeremiah Morrill on
9/11/2008 2:00 PM
|
Re: WPF MediaKit, SlimDX and 64bit
Jeremiah,
I run XP, with SP3, 32 bit. I will make some test on my laptop tonight to see if it comes from my computer. Let me know if you need more info or if you want me to test a specific file.
Damien
By Damien on
9/11/2008 10:04 PM
|
Re: WPF MediaKit, SlimDX and 64bit
I have not tested on XP at all, only Vista 32 and 64. The Vista computers I have been testing on have had great performance (otherwise I would not have gone this route). If you have a link to a media file, I can tell you what my CPU usage is on it.
Try out the fighter pilot WMV from here: http://www.microsoft.com/windows/windowsmedia/musicandvideo/hdvideo/contentshowcase.aspx
I get ~8% CPU on this 2.6ghz quad core, which if I multiply by 4, that's 32% of one core. In plain old WMP, i get about ~7%, which translates to ~28% of a single core. WMP in Vista does use Media Foundation for WMV files, but overall I'm happy with the comparison.
By Jeremiah Morrill on
9/12/2008 1:46 PM
|
Re: WPF MediaKit, SlimDX and 64bit
I have made more tests with this video: http://download.microsoft.com/download/2/0/9/20907788-993F-4EF6-8D75-F0DD93207FB8/SuperSpeedway_720.exe
MediaUriElement: 40-45% MediaElement: 20-25% MediaPlayerClassic: 15-20% VLC 0.8.6: 40-45% VLC 0.9.2: 25-30% WMP: 20-25%
By Damien on
9/16/2008 9:05 AM
|
Re: WPF MediaKit, SlimDX and 64bit
I forgot to mention that I didn't use "Fighter Pilot" because it cannot run smoothly with MediaUriElement and VLC 0.8 (it works with the others though).
I also noticed that MediaUriElement is the only one on my computer to decode correctly the audio track of both videos. But I guess I am just missing a codec.
By Damien on
9/16/2008 9:21 AM
|
wysyjolz
wysyjolz # wysyjolz
By TrackBack on
11/26/2008 7:54 AM
|
buy levitra
buy levitra # buy levitra
By TrackBack on
11/28/2008 6:45 PM
|
buspar
buspar # buspar
By TrackBack on
12/5/2008 12:17 AM
|
buy hoodia
buy hoodia # buy hoodia
By TrackBack on
12/5/2008 1:54 AM
|
premarin
premarin # premarin
By TrackBack on
12/5/2008 3:24 AM
|
wellbutrin
wellbutrin # wellbutrin
By TrackBack on
12/5/2008 4:28 AM
|
cetirizine
cetirizine # cetirizine
By TrackBack on
12/5/2008 5:51 AM
|
Re: WPF MediaKit, SlimDX and 64bit
Hi..
Thsi is a gentle reminder..for the above query... Please do give in your inputs...That would be of great help..
Thanks and Regards,
By replica handbags wholesale on
1/5/2010 11:51 PM
|
|
|
ed hardy
ED Hardy Hoodies ED Hardy Hoodies Ed Hardy Swimwear Ed Hardy Swimwear ed hardy tops ed hardy tops ed hardy shoes ed hardy shoes ed hardy t shirt ed hardy t shirt ed hardy shirts ed hardy shirts christian audigier christian audigier ed hardy kids ed hardy kids Ed Hardy Sunglasses Ed Hardy Sunglasses ED Hardy belts ED Hardy belts ed hardy Bags ed hardy Bags ed hardy purse ed hardy purse ed hardy mens ed hardy mens ed hardy womens d hardy womens ed hardy mens shirts ed hardy mens shirts ed hardy mens tops ed hardy mens tops ed hardy mens hoodies d hardy mens hoodies ed hardy mens swim trunks ed hardy mens swim trunks ed hardy mens shoes ed hardy mens shoes ed hardy womens swimwear ed hardy womens swimwear ed hardy womens t shirt ed hardy womens t shirt ed hardy womens tops ed hardy womens tops ed hardy womens pants ed hardy womens pants ed hardy womens hoodies ed hardy womens hoodies ed hardy womens shoes ed hardy womens shoes ed hardy womens clothing ed hardy womens clothing
By ed hardy on
3/15/2010 9:27 PM
|
cheap nike shox
There are wide variety of Nike Shox for both men and women's selection.The Nike Shox Sale are best selling nowadays.Get your own Cheap Nike Shox now.It's definitely time for you to buy womens nike shox and wens nike shox, Wearing them will keep you in a perfect condition.
By nike shox on
3/16/2010 10:21 PM
|
|
|
|