nVidia GPU users – you may optionally read here
Nowadays, many anime fansub groups released their files in H.264 format, which can be pretty taxing for older CPUs (like non-dual core Semprons/Celerons). This will be apparent with high definition anime titles like the one I have reviewed in my blog here
. With DXVA, you should be able to play those videos smoothly with less performance penalty upon your CPU.
This guide is the same as the one I posted at my blog here
21 June 2010: Rewritten to mirror http://wp.me/PrgSo-2n
.BEFORE YOU START…
Below are the things you need to use DirectX Video Acceleration (DXVA) to accelerate those CPU-hungry H.264 videos you see a lot here in this anime torrent tracker:-
FILES YOU NEED FOR TROUBLESHOOTING
- Windows Vista or 7 (with the latest service pack you can get):- With Catalyst 10.4, ATI has followed Intel’s footsteps and only made fully-featured functional DXVA acceleration (that includes playback of videos that do not conform to Blu-ray standards) available under these two operating systems. If you use Windows XP, even if you have an ATI GPU with UVD2.x ASIC decoding silicon, you won’t get the new benefits offered by Catalyst 10.4. DXVA-assisted playback is still possible under Windows XP, but only for Blu-ray-compliant videos. For Intel GPU users, Windows Vista or 7 is mandatory.
If Windows XP is really a must for you (you have an im ortant applications that runs only on XP etc.), consider switching to an nVidia GPU and use the CoreAVC 2 CUDA method for reliable playback of all non-test user-generated H.264 videos out there.
My recommendation: Windows 7 so that you can have the option to use Microsoft DTV-DVD Video Decoder available in Windows Media Player 12. Therefore Windows 7 N should not be used.
- A qualifying video card that supports DXVA:- A list of them are available at the bottom of this tutorial. For ATI AGP GPU users, the improvements available in Catalyst 10.4, even if you use Windows Vista or 7 (playback of Blu-ray-compliant videos should still be available though). Therefore consider getting a PCI-E GPU or any supporting ATI IGP chipsets. Please note that ATI GPU with UVD1.x (UVD, UVD+) only see limited, but still remarkable improvements for decoding out-of-spec videos.
My recommendation: Any qualifying nVidia GPUs, with the emphasis on the ones with PureVideo4 ASIC. See the list at the bottom of this page to see which nVidia GPUs has such ASIC. Fermi GTX470/480 are not recommended though, just wait until a version that takes less electricity to use and output less heat comes out.
- Media Player Classic – HomeCinema:- This tutorial will use the beta version build 1862. It can be downloaded from here (changelog). MediaInfo.dll now comes packaged into the archive too, so no need for a separate download. Please use 32-bit binary only even if you use 64-bit version of Windows.
TEST VIDEO FILES
- DXVA Checker – Download here (you can check whether your card is DXVA-capable and you will need this for troubleshooting).
- GPU-Z – Download here (shows detailed information about your GPU).
- CPU-Z – Download here (shows detailed information about your CPU).
- DirectX End-user runtime (February 2010) – Download here. Install this if you have d3dx9.dll error message when using MPC-HC.
- Microsoft .NET 4 Framework – Download here. Needed for EVR/EVR custom presenter and also to run DXVA Checker.
- Update for Windows Vista (KB971512) – Download here. Backport of some of Windows 7 features such as DirectX 11 for Windows Vista. You will need to pass WGA.
- Haali Media Splitter – Download from here.
If you have problems enabling DXVA, please test your setup with the three compliant videos first. If the problem is repeatable, make screenshots of your DXVA Checker, CPU-Z and GPU-Z results and make a reply to this thread.
EXPECTED RESULT AFTER DOING THIS TUTORIAL
- Blu-ray-compliant test video file 1 – The Melancholy of Haruhi Suzumiya NCED theme (Hare Hare Yukai) SD video with karaoke soft-sub - download here.
- Blu-ray-compliant test video file 2 – Clannad NCED theme (Dango Daikazoku) 720p with karaoke soft-sub - download here.
- Blu-ray-compliant test video file 3 – Kanon NCOP theme (Last Regret) 1080p with soft-sub - download here.
- Out-of-spec test video file 4 – James Bond: Quantum of Solace 1080p trailer - download here.
- Out-of-spec test video file 5 – AIR NCOP theme (Tori no Uta) multi-angle 1080p with karaoke softsub - download here.
- Out-of-spec test video file 6 – BBC Planet Earth: From Pole to Pole opening clip - download here.
- nVidia GPU users (with 191.xx drivers or later) + Windows Vista or 7 = can play all 6 test video files with ease. AIR NCOP theme (Tori no Uta) may become an exception if your CPU is slow, thus you may have to disable karaoke subtitle animation.
- nVidia GPU users (with 191.xx drivers or later) + Windows XP = can play the first 5 test videos, but not the BBC Planet Earth clip. The issue with AIR NCOP theme (Tori no Uta) also applies. nVidia GPU users who insists on Windows XP for whatever reason, should consider using the CoreAVC 2 method.
- ATI GPUs with UVD2.x (PCI-E or IGP) + Catalyst 10.4 drivers + Windows Vista or 7 = can play test video 2 to 6, but not The Melancholy of Haruhi Suzumiya NCED theme (Hare Hare Yukai). Success probability is 98%. The issue with AIR NCOP theme (Tori no Uta) also applies.
- ATI GPUs with UVD/UVD+ (PCI-E or IGP) + Catalyst 10.4 drivers + Windows Vista or 7 = can play test videos 2 and 3 reliably. The Melancholy of Haruhi Suzumiya NCED theme (Hare Hare Yukai) is not playable with DXVA. Should also be able to play test video file 4 to 6 but with less successful probability compared to ATI UVD2.x GPU users. The issue with AIR NCOP theme (Tori no Uta) also applies.
- ATI GPUs regardless of UVD version (AGP) + Catalyst 10.4 drivers + Windows XP/Vista/7 = can only play test video 1 to 3.
- ATI GPUs regardless of UVD version (PCI-E or IGP) + Catalyst 10.4 and older + Windows XP = can only play test video 1 to 3.
- ATI GPUs regardless of UVD version (PCI-E, IGP or AGP) + Catalyst 10.3 or older + Windows XP/Vista/7 = can only play test video 1 to 3.
- Intel G45/Clarkdale/Arrandale (with any recent drivers) + Windows Vista or 7 = can play all 6 test videos with ease. The issue with AIR OP theme (Tori no Uta) still applies. Reminder: while Intel GPUs can play the three out-of-spec video files made available here reliably, the same cannot be said for other out-of-spec videos floating out there. Successful probability for those files is 90%.
- Intel G45/Clarkdale/Arrandale + Windows XP = UPGRADE TO WINDOWS VISTA OR 7.
Other GPUs such as PowerVR’s Intel GMA500 or S3 Chrome = can only play test video 1 to 3.TUTORIALSTEP 1
Download and install the MPC-HC from the link above. Unzip it where you wanted. If you have an existing MPC-HC installation (if you have CCCP or K-Lite Mega Pack), overwrite it with this copy. After that, start the program.
In the example above, I deleted the MPC-HC executables that comes with CCCP and replaced it with the new MPC-HC version (mpc-hc.exe) in its place. Just so you know, since build 1448, the executable has been renamed to mpc-hc.exe.
Download the latest version of Haali Media Splitter from the link provided above. During the setup process, when you arrived at the stage depicted below, unselect the option ‘Associate .mkv and .mka files with Windows Media Player’ before proceeding with the setup process.
If you somewhat skipped the process above, go to Start Menu —> All Programs —> Haali Media Splitter —> Media Splitter Settings (Windows 7 default start path, YMMV), and set the option ‘Use custom media type for H.264′ to ‘No’, as shown below.STEP 2
Press O (or go to View —> Options) to open the Options window, that should look like below.STEP 3
Go to Playback section, and make sure that Autoload Subtitles is checked. This will automatically disable DirectVobSub (auto-loading version), so no need to kill it in step 6. If you do not need subtitles, also enable this option so that DirectVobSub/vsfilter is blocked.STEP 4
Go to Output section, and depending on your operating system, select the appropriate output you have to use. For Windows XP users, you can choose VMR7/9 renderless (if you need subtitles) plus overlay mixer and VM7/9 windowed (if you do not need subtitles – such as playing anime in AVI format that has hard subtitles, for example Dattebayo releases)
while for Windows Vista/7 users, choose EVR custom presenter regardless of your subtitles needs
. Keep EVR buffers as low as possible (3 to 5, not more). If you choose renderers that did not support subtitles, DirectVobSub (auto-loading version) must be blocked in Step 6.
As I now use Windows 7, further steps will show that I am using EVR Custom Presenter.STEP 5
Go to Internal Filters section and under Source Filters, make sure Matroska, MP4/MOV and Ogg is unticked. Then go to Transform Filter, and ensure that ‘H264/AVC (DXVA)’ and ‘H264/AVC (FFmpeg)’ are selected.
Then double click the selected ‘H264/AVC (DXVA)’ entry to open up its property page, as shown below.
So here is what you have to do depending on what GPU + driver version + operating system combination you have:-
- nVidia users + whatever OS used = don’t do anything here, click OK and go to the next step.
- Other GPUs (PowerVR’s Intel GMA500 or S3 Chrome) = don’t do anything here, click OK and go to the next step.
- ATI GPUs (PCI-E or IGP ) with Catalyst 10.4 + Windows Vista or 7 = Set the option ‘DXVA(H264) Compatibility Check’ to ‘Skip all checks’, enable ‘Disable DXVA for SD’ option, click OK and go to the next step. Leave other settings as shown above.
- ATI GPUs (PCI-E, AGP or IGP) with Catalyst 10.3 or older + Windows XP/Vista/7 = don’t do anything here, click OK and go to the next step.
- ATI GPUs (AGP) with Catalyst 10.4 or older + Windows XP/Vista/7 = don’t do anything here, click OK and go to the next step.
- ATI GPUs (PCI-E, AGP or IGP) with Calayst 10.4 or older + Windows XP = don’t do anything here, click OK and go to the next step.
- Intel G45/Clarkdale/Arrandale + Windows Vista/7 = Set the option ‘DXVA(H264) Compatibility check’ to ‘Skip all checks’, click OK and go to the next step.
- Intel G45/Clarkdale/Arrandale + Windows XP = UPGRADE TO WINDOWS VISTA OR 7.
We are now going to Step 6, which is the most important step in this tutorial
. This step is very important at ensuring that hardware acceleration will work at all.STEP 6
Here, we go to the External Filters section, because we have to eliminate intermediaries between the MPC internal decoder and the renderer. It should look like below.
Now ask yourself whether you have installed programs like ffdshow in your computer. If you have installed codec packs such as K-Lite Codec Pack or CCCP, then you may have ffdshow Video Decoder. In that case, click 'Add Filter' and you will see a dialog window like below.
Select ‘ffdshow Video Decoder’ and click OK, then you will see the previous window populated with ‘ffdshow Video Decoder’ entry selected before.
Here, click Block to prevent ffdshow Video Decoder from being loaded by MPC-HC.
Repeat it with entries that you think will prevent the MPC-HC internal decoder from being connected straight to the renderer (either VMR9 renderless or EVR custom presenter). ffdshow video decoder and DirectVobSub (auto-loading version) are the main culprits that will do so. There could be others that I do not know. If you have done Step 3, DirectVobSub is killed automatically and you do not have to do so here, but if you choose to use video renderers that did not support subtitles like Overlay Mixer or VMR7 windowed, you have to block it here too. If you have other H.264 decoders installed in your computer, such as the ffdshow DXVA Video Decoder, CoreAVC Video Decoder, Cyberlink H.264/AVC decoder, DivX H.264 Decoder and Arcsoft Video Decoder, you should also block them here so that MPC-HC will not load them.STEP 7
Go to Subtitles section, and set ‘Allow animation when buffering’ is ticked (for those who has low-powered CPU like Intel Atom, untick this option)
. As long as that option is enabled, the option ‘Sub pictures to buffer’ is not exactly important (set it to 10 if you have 512MB RAM – lower if you have less), but if this option is set to zero, subtitle animation will always be enabled (therefore to disable subtitles animation, the buffer must not be zero and ‘Allow animation when buffering’ is disabled). This will allow those anime OP/ED/insert themes that has soft karaoke effects to be displayed correctly. The appropriate renderer must also be selected in Step 4 above. With the latest MPC-HC, frame drops can be reduced to almost zero even if karaoke effects are turned on.
For ‘Maximum Texture Resolution’ option, set it to ‘Desktop’ with ‘Round up to power of two’ unchecked. This should give you very sharp-looking subtitles but remember, the higher the resolution is, the higher the CPU resources will be used. You can lower this setting to reduce CPU utilization.
Play with this setting accordingly depending on your need and your system spec.
Then go to the Subtitles/Default Style section, and full tick the option ‘Position subtitles relative to the video frame’ just like the screenshot below. This will ensure that subtitles will be rendered within the video picture, allowing more accuracy for positional subtitles such as signboards etc.This step did not apply if you do not watch videos that do not have soft subtitles.
And that’s about all you should do in the Options window. Click Apply to apply all changes you have made, and then click OK to close the Options window.STEP 8
Right-click within MPC-HC video area, go to Renderer Settings —> GPU Control and make sure that all three options within it (Flush GPU before VSync, Flush GPU after Present and Wait for flushes), just like the screenshot below.
If you use Windows XP or use Windows Vista/7 with Aero disabled, right-click within MPC-HC video area, go to Renderer Settings —> VSync and tick any of the options there to prevent tearing. Alternative VSync is recommended for ATI GPU users, the Accurate VSync is for everyone while VSync is similar to the ‘Lock Back-buffer option in the previous stable MPC-HC build (build 908).
I use Windows 7 with Aero enabled, thus those three Vsync settings above doesn’t apply to me.
If you use Windows Vista/7 with Aero enabled, go to Renderer Settings —>Presentation and ensure that the option Disable Desktop Composition is not ticked. If it somehow was ticked, untick it. If you are masochist enough to enable it, you have to select one of the VSync methods above or else you will get tearing. This option is useless in Windows XP (and you have to select a VSync method above).
Enable Frame Time Correction option should always be checked, regardless of what some people may think.
10-bit RGB option is optional (your GPU will actually have to support this feature). Disable if you want to take screenshots of the video being played. D3D Fullscreen Mode been made obsolete by the three VSync options above (and by Aero in Windows Vista/7), but if you use Windows XP and the VSync options and GPU Flushes cannot stop tearing when playing videos, this method is still the most foolproof way to stop tearing. If you have to resort to this, the option D3D Fullscreen GUI Support allows you to use context menu to operate MPC-HC without having to exit the application.
Again, right click within MPC-HC video area, go to Renderer Settings —> Output Range and select between 0 – 255 or 16 – 235, depending on what B&W level your display device is calibrated to. Read your display device manual for more information. Usually, computer monitors (LCD or CRT) are calibrated to 0-255 level, and TV is usually set to 16-235. But many high definition TVs nowadays are calibrated to 0-255, and some of them can have both, depending on what HDMI socket being used! Read the display’s manual for more information. This is where you are on your own.DXVA IN ACTION
Reference system – Windows 7 Ultimate + AMD Athlon2 X2 250 3.0Ghz + 4GB RAM + nVidia GT240 + nVidia Forceware 195.62.
Download links for these test videos are available at http://wp.me/PrgSo-2n
Blu-ray-compliant test video file 1 – The Melancholy of Haruhi Suzumiya
NCED theme (Hare Hare Yukai) SD video with karaoke soft-sub.
to see the full-resolution image.
Blu-ray-compliant test video file 2 – Clannad
NCED theme (Dango Daikazoku) 720p with karaoke soft-sub.
to see the full-resolution image.
Blu-ray-compliant test video file 3 – Kanon NCOP theme (Last Regret) 1080p with soft-sub.
to see the full-resolution image.
Out-of-spec test video file 4 – James Bond: Quantum of Solace
to see the full-resolution image.
Out-of-spec test video file 5 – AIR
NCOP theme (Tori no Uta) multi-angle 1080p with karaoke softsubs.
to see the full-resolution image.
Out-of-spec test video file 6 – BBC Planet Earth: From Pole to Pole opening clip.
to see the full-resolution image.NOTES
- If you have ATI AGP cards, it is highly advisable that you upgrade to a PCI-E or IGP-based GPU.
- If you use ATI PCI-E 1x GPU (instead of the normal PCI-E 16x interface), you have to disable the DisablePCIEx1LaneUVD option in the registry. You can do so with DXVA Checker as shown below.
- Cards that support DXVA:-
Radeon™ HD 3800 Series, Radeon™ HD 3600 Series, Radeon™ HD 3400 Series, Radeon™ HD 2600 Series, Radeon™ HD 2400 Series, Mobility Radeon™ HD 3600 Series, Mobility Radeon™ HD 3400 Series, Mobility Radeon™ HD 2600 Series, Mobility Radeon™ HD 2400 Series, Mobility Radeon™ HD 2300 Series, Radeon 780G integrated chipset – UVD 2 + AVP 2 (with Phenom only), Radeon HD 4xxx HD Series – UVD 2 + AVP 2, Radeon HD 5xxx HD series.
All GeForce 8xxx cards and IGPs except GeForce 8800GTS/GTX with G80 core. All GeForce 9xxx cards and IGPs. All GeForce 2xx and 3xxx cards. All Fermi cards.
Source: http://en.wikipedia.org/wiki/NVIDIA_PureVideo - any of the VP2, VP3, and VP4 GPUs can be used. When buying, make sure it has at least 256MB of video RAM (512MB if you use Windows XP). VP3 GPUs cannot decode videos with the following widths: 769-784, 849-864, 929-944, 1009-1024, 1793-1808, 1873-1888, 1953-1968, 2033-2048 pixels.
Intel G45/Clarkdale/Arrandale IGPs: Windows Vista & 7 only (the latest drivers seems to be problem-free). Set at least 256MB of RAM for the IGPs, 512MB is better.
- Card recommended (personally tested):-
GIGABYTE GV-N220OC-1GI GeForce GT 220 1GB 128-bit DDR3 PCI Express 2.0 x16 HDCP Ready Video Card – A PureVideo4 that can accelerate H.264, VC-1, MPEG4-ASP (DiVX and XViD) and MPEG2 videos on hardware. Also support HDMI audio (multichannel LPCM) just like ATI 4xxx series.
Other cards that I have tested and worked:-
Palit NE3X262SFHD94 GeForce GTX 260 896MB 448-bit GDDR3 PCI Express 2.0 x16 HDCP Ready SLI Support Video Card – Retail – A PureVideo2 GPU that I used to use on my main desktop.
GIGABYTE GV-NX84S512HP GeForce 8400 GS 512MB 64-bit GDDR2 PCI Express 2.0 x16 HDCP Ready Video Card – Retail – A PureVideo3 GPU on my sister’s computer.
- Known issues with DXVA-enabled playback:-
- Seeking (fast-forward or rewind) when DXVA is enabled will not be as smooth as playback with no hardware acceleration.
- The dropped frames with soft-subtitles has largely been fixed with the latest final build, but you will still see some of it during seeking operations.
There are 3 test files available for you above to download so that you can test whether you managed to use DXVA on your computer or not. If you can’t, there are few things you should check:-
- Run DXVA Checker (download from the link above) and see if your card drivers exposed their DXVA capabilities.
DXVA Checker result for AMD ATI HD5770.
DXVA Checker result for nVidia GeForce GT220.
- Under your card’s name/model, the ModeH264_VLD_NoFGT (ATI and nVidia GPUs) or ModeH264_VLD_NoFGT_ClearVideo (Intel GPUs) should exist (alongside with their supported resolutions) and will confirm your GPU capability to accelerate H.264 decoding.
- If you see empty space under your card’s name instead like below:-
You won’t be able to use DXVA in MPC-HC, even if your card supports it. Try reinstalling drivers and then rerun DXVA Checker again to see whether it has been fixed. If it isn’t fixed, you may have to reformat your computer and reinstall Windows.
- When posting a comment for help, please state:-
- Your operating system, inclusive whether it is 32-bit or 64-bit.
- Exhaustive information about your card. Information needed are GPU model (e.g. ATI 3450 or nVidia 9600GT), driver version (e.g. ATI Catalyst 8.12 or nVidia Detonator 178.24 – plus whether you use manufacturer drivers or ATI/nVidia drivers), video memory (e.g. 256MB, 512MB; 256MB is the minimum requirement) and most importantly, the interface (e.g. AGP or PCI-E; PCI cards do not work). If you have AGP cards (ATI only, because nVidia DXVA cards has no AGP versions), you also have to state the manufacturer of your motherboard chipset (e.g. Intel, AMD, ViA and nVidia) and whether you use the DVI-HDMI dongle.
– Screenshots of DXVA Checker, CPU-Z and GPU-Z results. Put them somewhere in sites like photobucket or imageshack and post the link to them here.
– The version of MPC-HC used.Please also make sure that your problem can be repeated with any of the three Blu-ray-compliant test files (Haruhi Suzumiya, Clannad and Kanon – not the Quantum of Solace trailer or the AIR OP theme either).
- When asked to use third-partyDXVA codecs instead of MPC-HC internal decoders, you can do so by following the instructions at this page.