Sunday, March 11, 2012

MPC-HC guide

It seems like there are quite a few MPC-HC guides out there but I think most of them are either too complicated, or doesn't provide the best viewing experience. This is what I use and I am very pleased with it. Thanks to Nand for the original guide. So, here is my MPC-HC guide.

Please note that this guide is no longer 100% up to date. XySubFilter has been released and will replace xy-VSFilter as a subtitle renderer. MPC-HC is also testing out implementing LAV Filter as the standard decoder in their test builds. I will update when I feel like it. Please download the test build of the Kawaii Codec Pack if you want the latest and greatest playback.

Installation
1. Uninstall anything you might have which is related to video playback such as outdated MPC - HC version, CCCP, LAV Filters and anything like that. We want to start fresh.

2. Install the latest version of Media Player Classic - Home Cinema. Download the one called "MPC-HC.X.X.X.XXXX.x86.exe". The Xes will be numbers on the website. At the time writing it says "MPC-HC.1.6.7.7069.x86.exe" but it will most likely have changed when you visit it. You do not want the 64bit version because it does not have any real benefits, and a few things will not work with it in our setup.

3. Install the latest version of LAV Filters (Get the one called LAVFilters-X.XX.exe with the highest number). During the installation, uncheck all x64 components. They won't be needed.
This will decode out audio and video. Videos are compressed and it's the decoders job to decompress them. Think of it kind of like unpacking something with WinRAR or 7zip.
The splitter will demultiplex/split our files into separate streams like audio and video before the decoder will decode them. What this does is simply take your single file, and splits it into separate streams such as one stream for video, one for audio and one for subs, and then pass those streams to the decoders.

4. Download the latest version of madVR. This will be our renderer. What this will do is render the picture using the decoded data LAV Filters sends it. When the image is rendered it is sent to your screen where it is displayed.
Unzip the files inside the zip to the folder where you want to install it. So don't just unpack it to your desktop. Make a folder in for example C:\Program Files\madVR and unpack it in there. Make sure you are logged in to an admin account and run the install.bat file (just run it normally on your admin account). DO NOT DELETE THE FOLDER WHEN madVR WAS UNZIPPED.


Configuration
1. Start MPC-HC and go to view -> Options or simply press "O".
Press Internal Filters and uncheck everything in the right column (right click and disable all filters), and uncheck "AVI", "Matroska", "MP4/MOV", "MPEG PS/TS/PVA" and "OGG" in the left column. We have standalone versions for these files and therefore don't need the built in MPC-HC ones.


2. Go to Output and select madVR.
If your video is choppy then try using "Enhanced Video Renderer (custom presenter)" instead. If you do this, ignore step 4 - 7.


3. Go to External Filters, press "add Filter..." look up "LAV Video Decoder", "Lav Audio Decoder" and "LAV Splitter" and add them to your filters. Also change them from "Set merit" to "Prefer".


4. Close MPC-HC, start it again and load any video file you want. In your notification area, right click on the "MAD" icon and press "Edit madVR Settings".


5. Under "rendering" -> "General settings" disable "enable automatic fullscreen exclusive mode".


6. Under "scaling algorithms" go to "image upscaling" and change it to Jinc, 3 taps and activate the anti-ringing filter. If you experience a lot of dropped frames with this then either change to Lanczos without anti-rining, or change to "Enhanced Video Renderer (custom presenter)" back in step 2.


7 (optional). You can if you want turn on "smooth motion". You find this under "rendering" -> "smooth motion". To understand what this does, we need to understand how video is being displayed on your monitor. A lot of video is played at ~24 frames per seconds, but your monitor is most likely only capable of 60 frames per second. What your monitor will do in this situation is display some frames 3 times, and some frames 2 times (over the course of 1 second). madVR is capable of generating extra frames (takes 2 frames and combines them, and buts them in-between the 2 original frames) which will make it so that each frame is displayed the same number of times. I haven't experimented with this so I don't know how much resources it uses, or if it works well, but I thought that I should mention it for those of you who are interested.


8. Close madVR and MPC-HC and start "LAV Video Configuration". You should be able to find this in your start menu if you search for it. In here, you want to enable hardware accelerated video decoding.
Pick Nvidia CUVID if you use an Nvidia GPU (such as the GTX 660 Ti).
Pick Intel QuickSync if you are using a Sandy Bridge or Ivy Bridge CPU and is using the onboard graphics (common in laptops but not on desktops).
Pick DXVA2(native) if you are using an AMD GPU (such as the Radeon 7850) or if you are unsure what you are using.
You can't hardware accelerate 10bit content, but LAV Filter will automatically start using software decoding if it detects a 10bit file.


Final check
Now all that's left is to confirm that everything is working as it should. Open up a Hi10p video such as this or this or this one (you don't have to download the whole show if you don't want to. Just grab the opening or ending).

Open a Hi10p video file and press "Ctrl + J" to open up the on-screen display. Right click and hoover over filters. Your setup should look like this if you are playing a 10bit file.

If you open an 8bit file (pretty much any H.264 non-anime file, or something from HorribleSubs or something like that) then it should look like this:


Subtitles rendering
This is something Nand does not bring up in his guide and that's using xy-VSFilter for subtitle rendering. A lot of people prefer this over the built in subtitle renderer in MPC-HC. I personally don't use it because the subtitles on old and low quality content (like 480p) will look bad. Anyway, if you want to see the benefits of it then read this.
Also, the built in image capturing in MPC-HC will not include subtitles unless you use this.

1. Download and install xy-vsfilter. Get the one called "Installer.exe".

2. Open up MPC-HC and turn off "Auto-load subtitles" under playback.


3. Go to external filters and add "DirectVobSub (auto-loading version)" and set it to "Prefer"

7. Restart MPC-HC.



Read this if you're having problems with the audio
Some people have problems regarding the audio when using this setup. The problem is that some files tries to output surround sound when you don't have that many channels. So instead of getting all sound, you only get for example the sound which should come out of the side speakers in a 7.1 setup.
This is quite rare but here is how you might fix it if you're experiencing this issue.

1) Open LAV Audio Configuration (can be found in your start menu)
2) Go to the "Mixing" tab.
3) Press "Enable Mixing" and turn on "Don't mix Stereo sources".



And you're done! Hopefully the audio should work fine now.

11 comments:

  1. "Press Internal Filters and uncheck everything in the right column, and uncheck "AVI", "Matroska", "MP4/MOV", "MPEG PS/TS/PVA" and "OGG" in the right column."

    I think that second line should say left column instead of right.

    ReplyDelete
  2. You said “Uncheck "Associate .mkv and .mka files with Windows Media Player" during” twice. And if you're going to use ISR instead of xy-VSfilter or EVR-CP instead of madVR, then you should probably use JW32's builds.
    http://forum.doom9.org/showthread.php?t=161047

    ReplyDelete
  3. It works fine but when i full screen it or make it any bigger(size of it like full screen) than how it opened up the it lags unbelievably and stutters really badly with the sound

    ReplyDelete
    Replies
    1. Have you tried changing the output from madVR to "Enhanced Video Renderer (custom presenter)"? That renderer uses less resources than madVR.

      Delete
  4. Thanks for the guide but could you post some comparisons images? I don't know what results I will get with these settings nor do I know if this is what I'm looking for.

    ReplyDelete
    Replies
    1. I might do that in the future. I don't have the time required to do it right now though. Comparisons can be very tricky sometimes because the quality difference will depend on the video, the scene and a lot of other factors.
      I might do that some other day when I got more time to spare though.

      Delete
  5. I have a bunch of 240p and 540p low resolution videos. I'm already using SVP with all my videos. Would this improve the image quality of the low res vids?

    ReplyDelete
    Replies
    1. I don't know anything about SVP so I can't really answer you. You should be able to get a pretty decent increase in video quality with this compared to the stock MPC-HC, especially for things like 240p video.

      Delete
  6. Thanks for the guide, makes everything look much better.

    ReplyDelete
  7. Any tips to improve audio quality? I'm using headphones.

    ReplyDelete