Currently prototyping a Windows .NET app that needs to play back high definition WMV and H264 video. My test files are full 1080p.
The target hardware has weak Atom processors but strong NVidia 9400 graphics. I know the graphics are integrated but my understanding is that they are good for video playback.
Testing on Windows 7, if I play my test files in WPF, using the MediaElement control, my CPU usage is 0.
However, target OS is Windows XP and we may not have .NET 3.0. Therefore the app needs to run in WinForms. For various reasons, Windows Media Player ActiveX is not an option. So we are looking at DirectShow.
I put together a player using DirectShow.NET, playing the video back full screen using the VMR9. Using this approach, my WMV files consume somewhere between 20 - 30% CPU. I had to install an mp4 muxer/demuxer to even get the H264 files to play, and then they consumed 40 - 50% CPU.
- I know that Windows 7 supports H264 out the box. However, it seems it s not a DirectShow filter?
- Why is my video accelerated using WPF, but not when using DirectShow? My understanding is that DirectShow supports DXvA.
tldr: how can I achieve hardware accelerated WMV and H264 video playback in WinForms?
Thanks!