For those who doesn't want to use Media Player Classic – HomeCinema to play H.264 videos using DXVA or CUDA hardware acceleration, another alternative player that can be used is KMPlayer. This post is intended to be a short guide on how you can use hardware acceleration for H.264 videos using DXVA (using MPC-HC external video decoder) and CUDA (CoreAVC 2.0). You need to use using Windows Vista/7 and have a qualifying ATI/nVidia/Intel/S3 for DXVA method, and a qualifying nVidia card for CUDA method. A list can be seen here. All nVidia cards that can do the DXVA method can also do the CUDA method.
What you need:-
- KMPlayer 2.9.4.1435 – download from here.
- Media Player Classic – HomeCinema standalone splitters & decoders (32-bit version build 1249) – download from here, OR
- CoreAVC 2.0 – available here (my affiliate link). Come integrated with Haali Media Splitter.
Troubleshooting tools:-
- DXVA Checker - download from here. Original website.
- GPU-Z – download from here.
Test videos that you can use for acceleration tests.
- The Melancholy of Haruhi Suzumiya ED theme – Hare Hare Yukai (H.264 SD video with karaoke subtitles) – Download from here.
- Clannad ED theme – Dango Daikazoku (H.264 HD 720p video with karaoke subtitles) – Download from here.
- AIR OP – Tori no Uta (H.264 HD 1080p video with karaoke subtitles) – Download from here.
- Kanon OP – Last regrets (H.264 HD 1080p with soft-subtitles) – Download here.
- Planet Earth: From Pole to Pole (H.264 HD 1080p with subtitles) – Download from here.
REMINDER: THIS GUIDE IS BEST USED WITH WINDOWS VISTA OR WINDOWS 7.
The tutorial is below. If you use DXVA method, follow the blue text. If you use CUDA method, use the green text. Black text are mandatory for both methods.
DXVA method/CUDA method
Step 1:-
Download Haali Media Splitter from the link above and install it using the default options. Then download KMPlayer from the link above and install it with default options. Ask.com toolbar installation is optional.
Download the MPC-HC standalone splitters/decoders from the link above, and extract the file named 'MPCVideoDec.ax' and put it in your C:\ drive, using software like 7-zip or WinRAR.
After that, open the Command Prompt with administrative priviledges, and type the command
regsvr32 c:\MPCVideoDec.ax
A pop-up window with the message 'DLLRegisterServer in c:\MPCVideoDec.ax succeeded'. If the message does not appear, make sure your path to MPCVideoDec.ax is correctly typed and that the command prompt has administrative privileges.
Download and install CoreAVC 2 with default options, without Haali Media Splitter. Set it up according to the picture below.

Step 2:-
Start KMPlayer and then press the F2 button to open the Preferences window, which should look like below.

Step 3:-
Go to Filter Control —> Decoder Usage section, as shown below. Tick the option 'Only use if it fails to play with system default'.

Step 4:-
Go to Filter Control —> Decoder Usage —> External Video Decoder section, as shown below.

Click the External Decoder Search button, and the pop-up window below will appear.

Click the Add System Codec button, and another pop-up window will appear.

If you use DXVA method, select 'MPC Video Decoder' from the list and click OK button. The result should look like below.

If you use CUDA method, select 'CoreAVC Video Decoder' from the list and click OK button. The result should look like below.

Then press OK to return to the previous window.
Under H.264 Video drop down menu, select MPC Video Decoder if you want to use DXVA method.
Under H.264 Video drop down menu, select CoreAVC Video Decoder if you want to use CUDA method.

Under AVC1 Video drop down menu, select MPC Video Decoder if you want to use DXVA method.
Under AVC1 Video drop down menu, select CoreAVC Video Decoder if you want to use CUDA method.

Step 5:-
Go to Filter Control —> Custom Filter Manager which will look like below.

Click Add Registered Filter button and a pop-up window like the one below will appear.

If you use DXVA method, select MPC Video Decoder from the list and click OK button. The result should look like below.

Under Priority Settings, select the Use Forcibly option.
If you use CUDA method, selec CoreAVC Video Decoder from the list and click OK button. The result should look like below.

Under Priority Settings, select the Use Forcibly option.
Step 6:-
Go to Video Processing section which will look like below.

Leave everything at default here.
Click the Renderer tab, and from the pulldown menu, select Enhanced Video Renderer (C/A), just like below.

Step 7:-
Go to Subtitle Processing section, which will look like below.

Ensure that the Show Subtitles option is enabled. Under 'Output Methods of Subtitles', select the Draw to Image Itself option. Under 'Font Rendering Method', select Rasterizer Output.
Go to Subtitle Processing —> Multi-Sub/etc section, which will look like below.

Click the Advanced tab, and under 'External Subtitle Module', enable the three options highlighted in the screenshot above.

After doing everything above, click the Close button to close the Preferences window.
Step 8:-
Right click on the video area of the KMPlayer, and select the option Video (Advanced) —> SuperSpeed Mode. This is applicable for DXVA method only, for those who use CUDA method, this step is optional.

H.264 DXVA/CUDA hardware-accelerated video playback with KMPlayer
Lia – Tori no Uta DXVA acceleration.

Lia – Tori no Uta CUDA acceleration.

























Which am I better off with for playing x264 movies (MKV)/BluRay files?
radeon hd 4600
or
GeForce 8200 onboard video with CoreAVC / CUDA ?
thanks in advance
Direct rip of Blu-rays in .mkv format? Then the ATI.
Reencoded Blu-ray rips in .mkv format? Then the nVidia with CoreAVC CUDA.
I watch the following
BluRay discs
Reencoded blu-ray rips in MKV
A bit more of the latter than the former
In your case, just get the ATI card then, then use the latest Catalyst drivers under Windows 7 which will allow you to decode out-of-spec HD videos most of the time.
So I should go back to using the default settings in KMPlayer? I had changed everything in accordance with this site’s guidance.
Did you configure KMPlayer using CUDA method? Then the answer is yes.
OK I managed to change the settings back, but now I don’t see my MKV’s playing in the DTS they were encoded to play in. I have a ASUS Xonar HDAV1.3 Slim Sound Card. I see my AV receiver light up with True-HD and Master HD when I play the BluRays, but it no longer lights up with DTS when playing MKVs through KMplayer. ANy hints, tutorials, etc that you can offer? Thanks!
With Asus Xonar soundcard, doesn’t you need to use TMT Media Theatre to use its bitstreaming capabilities, and unusable in other players like KMPlayer?
WAS ABLE TO DO IT BY GOING INTO internal audio Decoder / Output/ selecting SPDIF output after realtime AC3 re-encoding. That way I can leave the settings alone on TMT 3 for BluRays. Plus I couldn’t access the subtitles on alot of my mkv’s on TMT 3.
Hmm… if you did do what you have mentioned above, isn’t that’s why DTS doesn’t light up in your receiver? I think that’s expected behaviour with your setting. If you want DTS passthrough, I think you are better off using ffdshow audio decoder to redirect the DTS stream into your SPDIF interface. And we are talking about vanilla DTS and not DTS-HD MA right?
be more specific about what you said with ffdshhow. What settings and where in KMplayer need to be modded to do what you mentioned. Thanks for the help. I wish I were more knowledgeable about these things.
The XONAR HDAV slim 1.3 runs through a SPDIF passthrough to the HDMI plug on the HTPC. If I run the BluRays in TMT3 I need to select HDMI/Xonar to get True HD and Master HD sound. However, on that same setting I cannot get the mkv’s to register in DTS unless I switch TMT3 to SPDIF…howver I cannot access subtitles that I can with KMplayer.
You will have to adapt the instructions here to use SPDIF passthrough. But IMHO, KMPlayer is really less-friendly than MPC-HC when it comes to AC3/DTS bitstreaming.
I don’t know, that is a pretty involved set of install instructions which I followed perfectly (so I thought) and what I ended up with was a jumpy, not too clear picture with no sound whatsoever
3 hours later and countless rechecks produced the same results. Choppy picture and no sound at all. dunno….
Can you try using the said guide using MPC-HC?
I am sorry, I guess I wasn’t clear. I WAS doing all of the steps you listed to try and set up MPC-HC. That was what is choppy and has no sound. KMplayer plays smoothly, just a question of how to get the DTS to play back from the mkv’s.
Then I do not have any ideas why it doesn’t work then, I have only tried it on an ATI, and that’s not even mine. You should try asking at the said doom9 forum thread.
Hello,
I’ve done everything from this tutorial but it doesn’t work, I get a black screen and kmp freezes, I have to use task manager to close it. I reinstalled kmp, did the steps again and the result is the same. With mpc-hc the dvxa works fine, no problem. I have ATI 4850 with catalyst 10.3 and win 7 x64. Also in xp x86 kmp works fine with dxva. Any suggestion?
You use the KMPLayer linked from this page right? Not anything newer than that right?
Yes, build 1435.
hmm… I have no idead why it freezes then. Try updating your DirectX installation to the latest version and also download http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=0a391abd-25c1-4fc0-919f-b21f31ab88b7 .NET Framework 4.
Also try making an exception for the kmplayer executable in your anit-virus software, if you have one installed.
Nothing changed. Maybe it’s the x64 windows…
I have the same problem on x86 XP.
With mpc-hc the dvxa works fine.
So in your case, KMPlayer also doesn’t want to start then? You may have to ask in KMPlayer forum then on why this problem happened because I have no idea why either.
i think this problem arise when using EVR…using other video renderer is fine…
Hello,
I’ve done everithing from this tutorial but it doesn’t work, I get a black screen and kmp freezes, I have to use task manager to close it. I reinstalled kmp, did the steps again and the result is the same. With mpc-hc the dvxa works fine, no problem. I have ATI 4850 with catalyst 10.3 and win 7 x64. Also in xp x86 kmp works fine with dxva. Any suggestion?
Is the MPC video decoder mentioned at the top newer than the MPC video decoder (that comes with media player classic) from this guide http://imouto.my/watching-h264-videos-using-dxva/ . Because a few days ago i followed the other guide and installed MPC-HC buid 1453 and today I followed this guide and I registered this decoder which has build 1249(I wandted to try using DXVA with KMPlayer).So the problem is, last night I downloaded some anime but MPC-HC doesn’t play these files using DXVA(but it plays your test video files using DXVA).If I force the player to use the Microsoft DTV-DVD video decoder from Windows7 instead of mpc video decoder, then it plays the files using DXVA(but using this decoder sometimes my PC stops responding and the only way is to reset it).Could the player won’t play these files using mpc video decoder in DXVA because I registered the decoder mentioned at the top which I think is older than the decoder from the other guide?
BTW these are the details of one of the files:
General
Complete name : E:\Downloads\[A-FanRips]Utawarerumono_01_-_26.R2JDVD_[h264_aac][Dual_Audio]\[A-FanRips]Utawarerumono_-_01[h264_aac][Dual_Audio].mkv
Format : Matroska
File size : 220 MiB
Duration : 23mn 14s
Overall bit rate : 1 321 Kbps
Encoded date : UTC 2007-05-29 21:09:31
Writing application : mkvmerge v1.7.0 (‘What Do You Take Me For’) built on Apr 28 2006 17:20:19
Writing library : libebml v0.7.7 + libmatroska v0.8.0
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L5.1
Format settings, CABAC : Yes
Format settings, ReFrames : 16 frames
Muxing mode : Container profile=Unknown@5.1
Codec ID : V_MPEG4/ISO/AVC
Duration : 23mn 13s
Nominal bit rate : 1 049 Kbps
Width : 704 pixels
Height : 480 pixels
Display aspect ratio : 16:9
Original display aspect ratio : 1.467
Frame rate : 23.976 fps
Resolution : 8 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.129
Writing library : x264 core 54 svn-635M
Encoding settings : cabac=1 / ref=16 / deblock=1:1:1 / analyse=0×3:0×133 / me=umh / subme=7 / brdo=1 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / chroma_qp_offset=0 / threads=2 / nr=0 / decimate=1 / mbaff=0 / bframes=3 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=3 / wpredb=1 / bime=1 / keyint=250 / keyint_min=25 / scenecut=40(pre) / rc=2pass / bitrate=1049 / ratetol=1.0 / rceq=’blurCplx^(1-qComp)’ / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / pb_ratio=1.30
Language : English
Audio #1
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : LC
Format settings, SBR : Yes
Format settings, PS : No
Codec ID : A_AAC/MPEG4/LC/SBR
Duration : 23mn 14s
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Title : 2.0
Language : Japanese
Audio #2
ID : 3
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : LC
Format settings, SBR : Yes
Format settings, PS : No
Codec ID : A_AAC/MPEG4/LC/SBR
Duration : 23mn 14s
Channel(s) : 6 channels
Sampling rate : 48.0 KHz
Title : 5.1
Language : English
Text
ID : 4
Format : ASS
Codec ID : S_TEXT/ASS
Codec ID/Info : Advanced Sub Station Alpha
Language : English
The MPC-HC decoder here is the current non-beta version, older than the one in http://imouto.my/watching-h264-videos-using-dxva/ tutorial. Restrictions with ATI GPU still applies, which mean the Utawarerumono video you have will not be accelerated. How about trying the beta driver from this page and try again?
I tried this driver a week ago when I had windows XP installed, and I couldn’t play the Bond trailer and the other 2 videos you sad that won’t play on ATI GPU(plus with this driver I was having problems playing even the Haruhi video).But I’ll try again.Maybe will work with windows 7 (or with the new microsoft video decoder if the mpc decoder fails).I’ll tell you the results in a week because now I’m going on a little vacation.
@codrynn
If Haali also doesn’t work, try overlay mixer. This is the final resort.
[...] aici: Configuring KMPlayer to play H.264 videos using Microsoft's DirectX Video Acceleration (DXVA) and nV… Mie imi merge [...]
maN., tat’z awesome.., it’z the best complete information i got.,
yu’knew i’just got DDRI(1.5GB 400 MHz), nVidia GeForce 9600 GT.., but after yu’r idea., i’am just playin 1080p with my 24″ full hd monitor like cheeZe.., added my system uses only 50% of processing…
& i’am an Microsoft developer(windows appln)., i’ve developed many useful applnz like auto shutdown, auto cd tray timer etc….
yu’ can contact me through my mail if yu’ want…
(fros…@gmail.com)
thankyou later…
for h.264 the audio/video is perfectly rendering like cheeZe., but for some low Q files like avi 700mb or else the audio is not playing..,
plz post any comments to make it work….
It depends on what codec the audio use. Assuming that you use CUDA method, go back to Step 3 and select ‘Always Use (Strongly Recommended)’.
No audio ;( I’m using hd 4870 with dvxa method and have no audio at all any help appreciated
After doing the DXVA method, can you click the ‘Reset Current Preset’ button?
When it comes to kmplayer then there is a comparison written for vlc vs kmplayer!
Very good. Got it to work on my EEE Box – thanks a lot. I used the KMPlayer option with CUDA.
Big up!
I have Vista 32-bit and I don’t have ffdshow installed.
The funny thing is – I now have solved the problem. I just pressed “reset current presets” in the options menu and now I get audio output and the movies run with CUDA acceleration.
I just don’t know why this works.
Hello Ranpha!
Thank you for this tutorial! However, I have a little problem. I have configured the KMPlayer using CUDA as you described it. Now, if I play any .mkv files, I just get video but no sound.
Do you have any idea to fix this?
Thanks
@vollka
What is your OS? And did you have ffdshow Audio Decoder installed?
Neither CUDA or DXVA is available for your card. Not even in software mode ,with CoreAVC, your computer will not be able to play any HD H264 content. To handle some divX HD files is maximum you can do. The only thing you can do with that computer is tu buy an ATI HD 3450 video card(max. HD 2600 or HD 3650)with AGP slot (i guess you ‘re running an AGP system). NVIDIA AGP video cards do not support DXVA or CUDA. HD 3450 AGP is about 60$. Then you can play 720 p files using DXVA on MPC-HC or KMPlayer with good results.You can also play 1080p files encoded with decent bitrate and DXVA compatible.