Quantcast Configuring KMPlayer to play H.264 videos using Microsoft's DirectX Video Acceleration (DXVA) and nVidia's Compute Unified Device Architecture (CUDA) >> My collection of short anime reviews
imouto.my background image - Tsunetsuki Matoi of Sayonara Zetsubou Sensei

Configuring KMPlayer to play H.264 videos using Microsoft’s DirectX Video Acceleration (DXVA) and nVidia’s Compute Unified Device Architecture (CUDA)

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:-

  1. KMPlayer 2.9.4.1435 – download from here.
  2. Media Player Classic – HomeCinema standalone splitters & decoders (32-bit version build 1249) – download from here, OR
  3. CoreAVC 2.0 – available here (my affiliate link). Come integrated with Haali Media Splitter.

Troubleshooting tools:-

  1. DXVA Checker - download from here. Original website.
  2. GPU-Z – download from here.

Test videos that you can use for acceleration tests.

  1. The Melancholy of Haruhi Suzumiya ED theme – Hare Hare Yukai (H.264 SD video with karaoke subtitles) – Download from here.
  2. Clannad ED theme – Dango Daikazoku (H.264 HD 720p video with karaoke subtitles) – Download from here.
  3. AIR OP – Tori no Uta (H.264 HD 1080p video with karaoke subtitles) – Download from here.
  4. Kanon OP – Last regrets (H.264 HD 1080p with soft-subtitles) – Download here.
  5. 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.

Written by ranpha on Sep 20,2009 in: |

140 Comments »

  • sam says:

    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

    • ranpha says:

      Direct rip of Blu-rays in .mkv format? Then the ATI.
      Reencoded Blu-ray rips in .mkv format? Then the nVidia with CoreAVC CUDA.

      • sam says:

        I watch the following
        BluRay discs

        Reencoded blu-ray rips in MKV

        A bit more of the latter than the former

        • ranpha says:

          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.

          • sam says:

            So I should go back to using the default settings in KMPlayer? I had changed everything in accordance with this site’s guidance.

            • ranpha says:

              Did you configure KMPlayer using CUDA method? Then the answer is yes.

              • sam says:

                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!

                • ranpha says:

                  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?

                  • sam says:

                    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.

                    • ranpha says:

                      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?

                    • sam says:

                      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.

                    • sam says:

                      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.

                    • ranpha says:

                      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.

                    • sam says:

                      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

                    • sam says:

                      3 hours later and countless rechecks produced the same results. Choppy picture and no sound at all. dunno….

                    • ranpha says:

                      Can you try using the said guide using MPC-HC?

                    • sam says:

                      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.

                    • ranpha says:

                      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.

  • Rick says:

    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?

  • Rick says:

    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?

  • Bila says:

    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

    • ranpha says:

      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?

      • Bila says:

        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.

  • ranpha says:

    @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 [...]

  • fRoStdeviL says:

    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…

  • Porp says:

    No audio ;( I’m using hd 4870 with dvxa method and have no audio at all any help appreciated

  • Penko says:

    When it comes to kmplayer then there is a comparison written for vlc vs kmplayer!

  • walla says:

    Very good. Got it to work on my EEE Box – thanks a lot. I used the KMPlayer option with CUDA.

    Big up!

  • vollka says:

    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.

  • vollka says:

    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

  • edigee says:

    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.

RSS feed for comments on this post. TrackBack URL


Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

If you have any problems with the reCAPTCHA-enabled form, you can contact me using the contact form or by e-mailing me directly.
User's homepage links are nofollow-free.

Powered by WordPress [Secure Login]. Theme: TheBuckmaker. CopyPaste, Bauanleitung, BLOGbal.
Blog Directory | Quick Link Submission Approval in 24 Hours - Submit your Website Today | Promote my blog
Powered by: DNS Made Easy | imouto.my's Privacy Policy | About This Blog | Sitemap | Background image: Tsunetsuki Matoi (Sayonara Zetsubou Sensei)


This blog is best viewed in high definition, using Mozilla Firefox, Internet Explorer 7+, Opera 10.x+ or any Webkit-based browsers.
Blog DirectoryArtsArts BlogsBlog Directory & Search engineTop Arts blogsAdd to Technorati FavoritesBest Blogs Asia DirectoryJoin My Community at MyBloglog!blog directoryblog search directoryBlogarama - The Blog DirectoryFree web directory, click hereWebfeed (RSS/ATOM/RDF) submitted to http://www.feeds4all.nl
Blog Directory 001feedNuts Feed ProfileBlog DirectoryMy collection of short anime reviewsArts Blogs - Blog RankingsListed in LS Blogs the Blog Directory and Blog Search EngineBlogRankers.comBlog DirectoryReadABlog.com Blog Search EngineBlog RatingsTopOfBlogsBloglisting.net - The internets fastest growing blog directory
My collection of short anime reviews at Blogged
Creative Commons License
Unless noted otherwise, this work by ranpha (text only) is licensed under a Creative Commons Attribution 3.0 Unported License. All comments belongs to the respective Posters. Screenshots of all anime titles here belongs to their respective authors and companies.
Get listed in a premiere web site directory for free This site is listed under Anime Directory