Watching 1080P x.264 / MKV videos completely decoded by your graphics card An accelerating GPU Video Acceleration Guide
Yours truly is a big movie buff, I like to playback high-definition content, preferably at 1080P Full HD. But face it, to be able to decode such content in a flawless manner, you will need a lot of raw processing power.
One of my more recent dillema's is that you can playback for example BluRay content fairly easily with software like PowerDVD, assisted by the graphics processor on your graphics card. Such a great feaure, as that GPU can do marvelous things when it comes to handeling that content. The problem with 3rd party vendor software like PowerDVD is however complex, if a file format or file-container is not supported you can't play back that content assisted (accelerated or enhanchanced) by your graphics card. And that's a waste of the GPU and definitely your CPU load.
Much like MP3 was up and coming many years ago, one of the most popular formats is x.264 (not to confuse with h.264 itself). x264 is a free and open library for encoding H.264/MPEG-4 AVC video streams.
The x.264 format is often synonym with Matroska MKV, a media file container which often embeds that x.264 content, a much admired container format for media files. Especially the 1920x1080p movies often have some form of h.264 encoding dropped within the x.264 format. As a result, you'll need a very beefy PC with powerful processor to be able to playback such movies, error free without frames dropping and nasty stuttersm as PowerDVD or other PureVideo HD supporting software by itself will not support it.
There is a way though. Today we are going to open up and investigate this topic, we'll show you how you can accelerate x.264 content nearly 100% accelerated and post processed (enhanced) with nothing other than your graphics card.
Why use a graphics card you might ask ? Well, first off, there are many software solutions at hand, the fantastic ffdshow, which is an open source DirectShow decoding filter with excellent image quality. But for it to be able to handle 1080p, you will need fairly decent hardware, especially if you flick on filters like image sharpening. Another option is to purchase CoreAVC, which is a codec that allows extremely efficient x.264 playback, assisted by your (preferably) multi-core processor. CoreAVC is extraordinary, however on bigger HD TVs you'll notice that this codec forfeits a little on image quality.
Running into CPU (system) bottlenecks or forfeiting on image quality is not something we should accept in the year 2009, especially when we have modern graphics cards that could easily handle this content.
Companies like ATI and NVIDIA have been evangelizing that their graphics cards are the best thing invented since the wheel was discovered, especially for that high-definition content playback. See, the graphics processors in your (reasonably modern) graphics card have excellent decoding, accelerating and post-processing (enhance image quality) functionality as they have dedicated core logic built in to the GPU to do exactly that.
ATI Radeon cards starting at series 3000 for example have the a UVD HD (Universal Video Decoder) engine embedded in the GPU. It's a small piece of core logic designed to handle smooth high-definition movie/content playback.
The same can be said for GeForce graphics cards starting at series 8000. GeForce series 8000 (GTX 320|640 and prior excluded) and newer have an updated version of the PureVideo (VP2) engine, allowing high-quality high-definition content playback.
But here's the thing, while both formats are really good, they do not support anything that is not officially supported by 3rd party vendor software like PowerDVD and WinDVD. As a result your hands are tied and you are extremely limited in utilizing UVD and Purevideo only for DVDs, WMV(HD) and Blu-ray disks. And we feel that poses an issue, as the other 80% of the content out there thus can not take advantage of these HD processing video engines.
As a result, you must use some sort of codec or filter forcing the decoding, acceleration and post processing processes over the CPU, and that CPU load will be tremendously high and certain image quality enhancements [can or] will be lost. Decoding and accelerating media content over the CPU is intensive, expensive and not at all optimal.
I believe in the evolution of new and open standards. XVID, DIVX, h.264. VC-1 and now x.264/MKV need native support.
What would have happened if we would have never embraced the MP3 format for example ?
What the majority of us would like to see ...
My personal vision of a Home Theater PC (HTPC) is using software like using Media Center and a remote control (point, click and play), then sit back, watch and enjoy 1080P high definition content, whatever the file container format is.
MKV and x.264 filter transcoded content has got to be the biggest and best open file container format available on the web. It is a revolutionary format, but is just not supported natively by your graphics card, forcing you to revert back to software like FFDSHOW or CoreAVC. Meanwhile you have GPU in your PC picking it's nose, while that GPU easily could handle the entire decoding processes, with very small use of system resources and power consumption.
There is however a way to get x.264 working in a nice symbiosis with your graphics card. And though it's not as charming as having a remote control in your hands and starting up that movie with Media Center, it is a great way to watch high definition x.264 content, accelerated and enhanced by your GPU.
Did you read our NVIDIA ION review ? With this Intel Atom 230 (single core) powered little box you will be able to decode full x.264 content at 1080P with merely 20-25% CPU utilization, interesting right ?
Head on over to the next page where we'll talk a little about the software after which I'll startup a guide explaining you what you need to do to get that MKV GPU accelerated content going.
Why is it so difficult to get sharp and flawless 1080p content out of a regular PC you ask ? Well, to understand that, you need to realise what the PC needs to accomplish. We went from SD (standard definition) content towards HD (high definition content) over the past years. Our television screens and computers have so much more resolution to work in, and that is a frightening task if you realise what the CPU needs to manage, Full HD for example is 1920x1080 pixels, and that needs to be refreshed at refreshed 24,25, 30, 50 of 60 times per second.
< img> We went from PAL and NTSC towards Full HD at 1080P, observe the complexity.
What software do we need to get that 1080P content fully supported over the GPU ?
In the open source community Media Player Classic Home Cinema was released a while ago. This software supports DXVA (bitstream acceleration over the GPU). Next to that the software we can also use the Shader processors on the more recent graphics cards, to enhance image quality in a variety of ways.
There is a restriction though. This software has the graphical user interface of the old media player that was released with Windows 98. So it's not exactly the most pretty looking application to the eyes, especially in graphically enhanced operating systems like Windows Vista it looks and feels old. Don't be naive though, as this software is one of the most sophisticated media player to date.
So here's what you need to forfeit on, you must live without the luxury of a remote control and a software environment like Windows Media Center. This software project is open source, and it's completely free to use and download. MPC is the basis of everything we are showing you today, there are some limitations and restrictions though. But in a screenshot guide we'll show you how to setup everything.
Any popular file-format (XVID/DIVX/MPEG2/MPEG4/h.264/MKV/VC1/AVC) movie can be played on this little piece of software, without the need to install codecs and filters, and where it can, it will DXVA enable the playback. DXVA is short for Direct X Video Acceleration, and as you can tell from those four words alone, it'll try wherever it can to accelerate content over the GPU, offloading the CPU. Which is what we are after.
There's more to this software though:
A much missed feature with NVIDIA's PureVideo and ATI's UVD is the lack of a very simple function, yet massively important, pixel (image) sharpening.
If you watch a movie on a regular monitor, Purevideo playback is brilliant. But if you display the movie on a larger HD TV, you'll quickly wish you could enable little extra's like sharpening. I remember GeForce series 7 having this native supported from within the Forceware drivers. After GeForce series 8 was released, that feature was stripped away, and to date it has to be the most missed HTPC feature ever.
Media Player Classic has yet another advantage, as not only it tries to enable DXVA where possible through the video processor, it also can utilize the shader processors of your graphics cards and use it to post-process content.
A lot of shaders (small pieces of pixel shader code) can be executed within the GPU to enhance the image quality. MCP has this feature built in, you can even select several shaders like image sharpening, de-interlacing, combine them and thus run multiple shaders (enhancement) simultaneously. Fantastic features for high quality content playback.
Don't you sometimes wonder why a small group of dedicated developers can get features like these going in no-time yet companies like ATI and NVIDIA absolutely fail to support this natively ? How big of a missed opportunity is this for these two companies ? We say very big.
Post subject: Re: Accelerate x.264 1080p movies over the GPU Guide
Posted: Fri Mar 06, 2009 8:54 pm
Joined: Sat Aug 23, 2008 9:08 pm Posts: 1674
So what we'll do is this, I'll show you what you need to have installed in your PC, how to set everything up and then enjoy the fruits of benefit with this intriguing Media Player Classic HT software.
Minimum System recommendations
Depending on what you plan to do with your home theater based PC, the requirements can differ. If you can live with the GUI and will stick towards Media Player Classic, you won't need much of a PC at all.
We tested this software even on an NVIDIA ION mini-PC with Atom 230 processor and x.264 DXVA acceleration wise it works fine. To be a little future proof we do recommend the minimum hardware level to be a tad higher:
For graphics processing we need:
nVidia series 8*, (9)xxx and GTX or newer.
ATI Radeon HD series 3000 and 4000 or newer.
* some older models 8800 cards have the older VP1 (video processing) engine, the updated NVIDIA VP2 asic can decode bitstreams which is what we are after. Examples of VP1 would be 8800 GTS 320 and 640 MB. You will still be able to decode content, yet partly. The 8800 GTS 512MB en newer cards have the new VP2 engine, which will be 100% supported.
Let me show you some cheap examples of what would be very sufficient as a HTPC, if you wan to use MPC HT software.
As you can see the above example is a 150 USD configuration has an integrated Radeon chipset that works really well with Media player Classis when it comes to x.264 acceleration. However, if you like to run shaders like Image sharpening, we recommend a dedicated graphics card.
A passive NVIDIA GeForce 9500 GT or Radeon 4650 would be very sufficient to handle additional image processing.
nForce 730 / GF9300 chipset based motherboard 120 (USD)
As you can see, an Intel configuration immediately boosts price a little. We end up spending roughly 220 USD for roughly the same features as the AMD offers. Again, if you like to run shader like Image sharpening, we recommend a dedicated graphics card. A passive NVIDIA GeForce 9500 GT or Radeon 4650 would be more than enough to handle the additional image processing.
These examples are of course the lowest range, cheapest products to build a HTPC. Anything faster is recommended. But the gear mentioned above, will manage 1080P x.264 content, accelerated by Media Player Classic Home Cinema perfectly.
Now your question would be, what components would you use if you had some more cash to spend. Personally I'd opt an AMD 790 GX/FX based motherboard, 2 GB DDR 800 MHz and Phenom X3 720 processor (review here). Massive value for money. I would insert a dedicated graphics card though, just to be sure I could enable complex shader algorithms to enhance image quality. Something as simple as a Radeon 4650 or GeForce 9600 GT is fine really, but faster and newer is always better. The clock frequency on these products (important for the video processors) are high enough to process data + they have enough shader processors for post processing.
What do we need to do:
Download Media Player Classic Home Cinema (GPU accelerated) - click here.
Download and install the latest Direct X - click here
Make sure your graphics card drivers are up-to date.
Make sure you have a nice collection of x.264 / MKV content. Lots of trailers can be download on the web.
Windows XP or Windows Vista ?
Both operating systems work fine with Media Player Classic Home Cinema. We included both the 32-bit and 64-bit versions in our download. We do however feel that Windows Vista is the better OS to opt, it's also the OS we'll test on. In the MPC software we'll have to specifically setup the software in order to support either Windows XP or Vista.
Windows XP users, select Overlay Mixer, VMR7, VMR9 or VMR9 renderless
Vista users, select EVR or EVR custom renderer
But let's walk through the software setup, next page please.
After you have installed your OS and drivers, it's time to startup Media Player Classic Home Cinema. Just open the archive, there is no installer. Click on the file called mplayerc.exe and you'll see the following media player startup like so:
As you can see, GUI wise, MPC HC is not much to look at and brings back Windows 95 memories. Don't get fooled though as simple as it looks, this one of the most versatile and advanced video players we have ever seen.
From here on we will start to setup the software. Only a few steps are really needed to get things going. Go to OPTIONS, and in the first field labels PLAYER you might want to check 'launch files in Full screen'.
Now move to the field Playback > OUTPUT. Here we need to our Direct Show preference, and this is the most important task for you to setup.
Windows XP users, select Overlay Mixer, VMR7, VMR9 or VMR9 renderless
Windows Vista users, select EVR or EVR custom renderer
We have Windows Vista 32-bit installed, we select EVR Custom Preset, highlighted in bold that really should be your preference. Feel free to fool around with some of the other settings.
Small note, after each Direct Show change is is wise to select apply and then exit the program. Then startup again, that way for sure the new setting will be activated.
Sound - Go to Internal Filters. This can be a bit of a culprit. If you playback audio through the PC soundcard (multichannel) analog over speakers, you might just want to leave things as they are. I however use a SPDIF coaxal pass-through, the automatically selected embedded audio filters for DTS and AC3 where not properly in sync. I disabled them and just used a free to download software AC3 filter.
Your choice of course. Don't be afraid to play around with it. If it works fine, don't fool around with these settings.
Next to the DTS and AC3 settings I've highlighted Matroska. Matroska is the MKV / x.264 file container format we want to have accelerated. We strongly recommend you to check the Matroska flag, so that the internal filter will be used, key to x.264 GPU acceleration.
click to enlarge screenshot
Once you've finalized configuring the software I again recommend to just close the application and restart it again, after which you are ready to go. The settings will all be saved. So you only have to do this once.
If you click on the screenshot above you'll load up a 600 KB (compressed) screenshot where we are now accelerating 1920x1080P sized x.264 content with the help of the GPU. Mind you that we used a Core i7 system to make the screenshots, but the result is the same on a low specced machine. Which we'll demonstrate exactly that with a video in a minute.
You'll notice that all 8 logical CPU cores are doing absolutely nothing. If you look at the lowest graph, you can see GPU activity. And observe that we are stressing the graphics processor 30 to 40% at best, while accelerating AND enhancing the 1080P movie. We have no hiccups, no stutters no dropped frames.
The card can handle it with ease. Integrated GPUs like we see embedded in the GeForce 9300/9400M and AMD 780/790 chipsets can accelerate this content just as well. However the embedded GPU have very little shader processors and often lower clock frequencies, they will very likely become an issue if you enable shaders (image sharpening etc) as well.
But let's have a look at such shader functrions we can play around with, next page please.
Having a dedicated graphics card for the best quality possible is recommended, but not a requirement. It's recommended because dedicated cards can hande shaders much better. Let's have a look at the shaders features in the software we can enable to enhance image quality.
During movie playback you can access the Shaders menu through the pull down menu (or just right mouse click on the movie playing). If you click SHARPEN, a shader program will be fired off at the graphics processor enabling pixel sharpening. In a seperate menu you can even configure shaders and their intensity (more/less sharpening etc).
Utilizing the shader engine of the graphics cards is the icing on top of the cake really, especially on bigger Full HD - HDTVs you want a little image sharpening or darker background. Observe the 'combine' function that is highlighted. Now, next screenshot please.
Of course it would a shame if you could only use one shader at a time, like image sharpening .. yet you love the de-noise function too. The software has a solve for that, you can select multiple shaders and run them simultaneous. Here's exactly where the integrated GPUs on motherboards will run out of computational power. But as stated a dedicated Radeon HD 4650 at 69 USD does a remarkable job, well worth the investment. And that's not different for the NVIDIA GeForce card either of course.
I advise you to select and combine the following shaders:
Sharpen Complex or Edgde sharpen
16-235 -> 1-255 (will give you a nice dark screen)
optionally de-interlace: but most movies are de-interlaced already
Once you've made your selection and added the shaders you would like to run, hit OK. And you are good to go.
Here's a fun tip, during playback use the following key combo: CTRL+P to enable and disable the pixel shaders, you'll spot the difference instantly.
So the last screenshot I wanted to show you is GPU usage during 1080P x.264 content playback.
Radeon HD graphics adapters allow us to monitor how much the GPU is stressed. We playback a 1080P movie, x.264; now we enabled two sharpening shaders and 16-235 -> 1-255. As you can see, the GPU is roughly 30% stressed at best. Depending on bitrate and shader selection this can vary a little of course. But this was some really heavy content.
Again you are looking at a Radeon HD 4650, passively cooled by the way.
As final example I recorded a quick movie. A note, the video is extremely low quality and obviously for learning purposes intended only. Have a look if interested, and again pardon the image quality.
tip: once you hit play - the outer right button allows HQ playback, which is advised.
In this demonstration video we quickly setup the three settings as explained in this guide, then we playback a x.264 720p trailer and then a 1080p movie trailer. We'll zoom into the task manager, observe the CPU utilization during playback of these trailers.
The system used here is a midrange Intel Core 2 Q6600 based PC with 2 GB memory on a NF730 motherboard running Windows Vista 64-bit. Amzing stuff really. The video card used is a GeForce 8800 GTS 512MB. We have realtime high-def MKV content being decoded, accelerated and enhanced all over the GPU.
So you guys, I hope I have opened up some doorways for some of you. It really is a shame that container formats like MKV and filters as x.264 do not have embedded industry support from both ATI and NVIDIA.
How cool would it be to see some sort of codec (like NVIDIA initially offered with PureVideo) to open up and enable features as show in this article NATIVE in windows. Grab your remote, startup Windows Media Center, select a x.264 / MKV movie and enjoy it being decoded over the GPU.
It can be done fairly easy, and configuration could be dealt with from within Catalyst or Forceware drivers. Unfortunately neither ATI or NVIDIA is making a move into that direction, and it can be nothing other then a loss for everybody, features like these would boost graphics card sales for sure, and in the year 2009 we feel should have been a standard a long time ago already. Admittedly, I'm a bit of an opportunist though.
Luckily the guys who develop open source project like Media Player Classic - Home Cinema get us a good step closer to what we all want. To me it is amazing what a small group of people achieved fairly quickly. I have much respect for that.
So then, I assure you that you will have fun using Media Player Classic Home Cinema. With it you can finally accelerate and enhance content like x.264, remember ... pretty much any content format is supported with this software.
My experiences. I've tested the software on four different machines, and can summarize this:
NVIDIA ION | Intel Atom 230 | 2GB - Accelerates well, stutters when enabling Shaders
AMD 790 FX | Phenom 9950 | 2 GB | integrated GPU - Accelerates well, stutters when enabling Shaders
X58 | Core i7 965 | 6 GB | Radeon HD 4650 512MB - Flawless playback including combined shaders
The generic consensus is simple, any system will do fine, but if you want to enable shader processing and image quality enhancements, it's strongly advised to have a dedicated graphics card, meeting the requirements we mentioned.
With that said I'd like to close this article. We'll open up a forum thread on this article where you can share your experiences. Remember, this is free software. Fool around with Media Player Classic - Home Cinema a little and observe how much fun you will gain with it.
This article is not intended to criticize companies like NVIDIA and ATI. We just feel that something so standard and common as x.264 should be natively supported. Also, and this has to be said, of course there are many good reasons to use for example CoreAVC or FFDSHOW if you have enough CPU processing power. There's nothing wrong with that, in fact these two examples are out of this world as well.
And surely if you merely watch DVDs or Blu-ray movies then PowerDVD and WinDVD will be more than sufficient and probably an even better alternative. However, when when it comes to handling x.264 and similar file/container formats over the GPU, nothing comes even remotely close to Media Player Classic Home Cinema.
We'd like to hear about your experiences in regards to this software and your graphics card, we setup a discussion thread here. Check out the software (download here), it won't cost you any money as it is a free open source application. Enjoy and have fun you guys.
Users browsing this forum: No registered users and 1 guest
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum