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.
tldr: how can I achieve hardware accelerated WMV and H264 video playback in WinForms?
Thanks!
Hardware video acceleration makes it possible for the video card to decode/encode video, thus offloading the CPU and saving power.
Hardware acceleration is the process by which application offloads computing tasks onto specialized components. It allows greater efficiency on the system than it's when using a general-purpose CPU.
GPU Acceleration reduces the stress that video editing software apply on CPU and improve the speed and efficiency of these software. Enabling GPU acceleration for video rendering, playback saves you from waiting and improve the playback quality.
There are many commercial hardware accelerated h264 directshow filters available out there. Some use DXVA, some use Cuda. None of them are free, but most of them aren't expensive. Ffdshow and the related ffmpeg projects are great, but they will absolutely not do HD h264 on an Atom cpu. (If anyone can prove otherwise, I'd love to hear from you.)
I've been doing HD h264 playback on the same Ion platform that you described, using DirectShow in XP. It's borderline in performance for 1080p, but can manage it if you can limit the bitrate and don't need to do much other CPU or GPU work at the same time. 720p is a lot more comfortable, especially if you can get by with 24 or 30 fps instead of 60.
Off the top of my head, the codecs that worked best on the Ion for h264 were MainConcept, CoreAVC, and Cyberlink.
I would also suggest trying VMR7 instead of VMR9 if that's an option for you. Some DXVA codecs are more reliable and have better performance with VMR7.
Don't have a direct answer for you, but the DXVA checker utility has helped me debug DXVA issues in the past. Here is a download link: http://bluesky23.hp.infoseek.co.jp/en/index.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With