Dec 8, 2010 9:43 PM
Advanced Playback Configuration
First of all, this guide is only for Windows user. Mac and Linux are not supported (more like, I don't use Mac and Linux so I don't know and I don't care).
Table of Contents
Changelog
To-Do list
Preface
Required Knowledge, and Knowledge Base
Preparations
Installing Stuffs
Configuring Your Setup
- Disabling Internal MPC-HC Matroska Splitter
- Change Your Video Renderer
- Change Your Subtitle Renderer
- Change Your Codecs
Custom Filter Chains
Post Processing
Shaders
madVR
Output Levels
Changelog
04-01-2011
Updated some information.
01-15-2011
Added information ReClock.
Update for 64 bit components.
Update some information.
12-09-2010
Made the guide.
To-Do List
- Adds more information as I research more.
- Add screenshots to better illustrate the guide.
Preface
I believe that most of you have ever tried CCCP, K-Lite, KMPlayer, VLC, or many other one-click playback solutions, and somehow it just works (or, it just doesn't work). Now, have you ever wondered the more advanced options to your playback setup? Or, have you ever found that none of those one-click playback solution works flawlessly for you? If the answer is yes, then this guide is for you.
Note that this is not a step-by-step guide. I will only provide information on configurations, you should pick the setup that fits you best. This way, you will have better understanding, and can deal with many different computer instead of just yours. Who knows, maybe when one of your friends said that his/her laptop can't play video files properly, you can come to the rescue!!
This is an update to the previous guide which covers the topic on how to play HD files smoothly, but I decided to take it further and just put everything I know of how to properly configure your playback setup. Although it says advanced, I think even casual user can benefit to some extent with this guide.
Note that this guide is liable to mistakes, but as Full Frontal said, "Don't let past mistakes weigh you down. Just accept it and move forward. That is the privilege of being an adult."
...Yeah so just inform me if I put up a wrong information here.
Required Knowledge, and Knowledge Base
Of course, you need to know quite a bit about computers in general. If you can't install even a simple program, there's no use for you to be here.
For some more advanced knowledge that will help your understanding, I'll try to explain some of it here. This is important, as many of the technical stuffs I mentioned here are explained there. Or, just Google them.
Preparations
Uninstall any codec packs you might have (including K-Lite and CCCP). Then, get these stuffs.
Required:
Media Player:
Media Player Classic - Home Cinema. This is the official public release. You might also want to get latest build here. (The site is in Russian, but there's enough English for you to get what you want.) If you're not sure, then just get the public release. Get the 32-bit version even if you have 64-bit system. This will be our main media player. You might ask, "Why not [insert your favorite player]?" Well, from my experiments, MPC-HC is the only one that works perfectly and best suited for this guide. Other player tend to have their own shortcomings.
Source Filter (aka Media Splitter):
Haali Splitter (Matroska Splitter). Mainly for .mkv files, because some .mkv files tend to have some features such as ordered chapters, editions, etc that may not work with the built-in splitter for just about any player. Can also be used for splitting other media files.
Optional:
Multi-Purpose Decoder:
ffdshow tryouts.. As with MPC-HC, get the latest 32-bit version. This one can be used as multi-purpose decoder or for post processing. If you have a multi-threaded CPU (Dual Core, Quad Core, Core 2 Duo etc), it also have an option to use multi-threaded h.264 decoding to speed up h.264 decoding process.
H264 Decoder:
CoreAVC. This is NOT free. But it is the fastest decoder for h.264, and it can also use CUDA to utilize GPU to assist CPU in decoding.
Video Renderer:
madVR. A very high quality video renderer with extensive configuration. It's rather heavy on the GPU though, depending on your settings.
Subtitle Renderer:
VSFilter (DirectVobSub). MPC-HC internal subtitle can only be used with certain video renderers. So if you want to use other video renderers (madVR included), you must use vsfilter to show subtitles. The link I gave is version 2.39, there's a version 2.40 available, but I forgot where I got it :P
FLAC Decoder
madFLAC. From the same author as madVR, this one is a high quality FLAC decoder. Though, it does have a problem with audio switching, so if you have a dual-audio FLAC files and you want to switch audio, it's not recommended to use this.
Audio Renderer
ReClock. This is a special filter that enables several things, most importantly, to eliminate judder on playback by adjusting frame rate (Ex: Speed up 23.976fps to 24fps). This will result in smooth playback, at the cost of 1% faster playback speed. Also, enables WASAPI exclusive and bitstreaming.
UPDATE 01-14-2011:The components above except for madVR and madFLAC also have x64 versions. CoreAVC and Haali Splitter installs the x64 versions by default in x64 systems. For the rest of them, you need to get the x64 installers. Note that x64 components only works with x64 MPC-HC, and x86 components only works with x86 MPC-HC.
While there are codec packs such as K-Lite and CCCP that install some of the things I mentioned here, installing them yourself means you can pick what you want yourself, and you don't have to wait for the pack itself to be updated if you want to update the components.
Installing Stuffs
Most of the stuffs above are just like normal installation, but madVR and madFLAC are different. With both of those, you'll get a .rar file. Extract the .rar file somewhere, preferably 'C:Program Files' so it's easy to find later, then double-click on install.bat. A prompt will say that you've successfully installed madVR/madFLAC. Don't move/rename/delete the folder now, or else you will have to reinstall it again.
When installing ffdshow, just enable all components. You don't know when you might need those components.
When installing DirectVobSub, untick 'Prebuffer subpictures' option.
When installing CoreAVC, make sure you untick 'Haali Media Splitter.' We should install this individually, because the one in CoreAVC is outdated already (by the time of writing).
When installing Haali Splitter, make sure to untick 'Associate .mkv and .mka files with Windows Media Player'. If you want to use Haali to split other files other than .mkv, like .avi, .mp4 et cetera, just tick the respective option.
Configuring Your Setup
I will only provide some options, I honestly can't determine the optimal setup for you, since your hardware and mine are most certainly different, you should try these options and see what works best.
Disabling Internal MPC-HC Matroska Splitter
Open up MPC-HC. Press 'O' to open the options menu. Go to 'Internal Filters', and untick 'Matroska' option. If you ticked other file types in Haali installer settings, untick them here as well. This will prevent MPC-HC from using it's internal splitter, and will use Haali Splitter instead. This step is a must; or else many .mkv features will not be supported.
Change Your Renderer
Go to 'Playback'->'Output'. Here, you can pick what video renderer to use. You can look here for the comparison. I recommend Overlay Mixer, VMR7/9 renderless, Haali Renderer, EVR, EVR Custom Presenter, or madVR.
Overlay Mixer
+ Lightest renderer.
+ Can use DXVA on XP.
- Aero will be disabled.
- Does not support MPC internal subtitle.
- Scaling algorithm is not the best.
Recommended for: PC with very low spec that all other renderer fail to work smoothly. This is more like failsafe if anything. With DXVA, you won't get any subtitles at all.
Configurations: None, as far as I know.
VMR7 renderless
+ Support MPC internal subtitle.
+ Can use DXVA on XP. (not on Vista/7)
+ Light; still heavier than Overlay Mixer and EVR though.
+ Can use MPC shaders.
- Picture quality is not as good as with some other renderers.
- Outdated compared to EVR.
Recommended for: PC with XP and you wish to use DXVA. Not recommended for anything else.
Configuration:
Surfaces -> Always go with the recommended option.
VMR9 renderless
+ Support MPC internal subtitle.
+ Can use DXVA on XP. (not n Vista/7)
+ Wide selection of upscaling algorithm, better algorithm means better picture quality.
+ Can use MPC shaders.
- Heavy, especially with better upscaling algorithm.
- Outdated compared to EVR.
Recommended for: PC with XP and you wish to use DXVA. Not recommended for anything else.
Configuration:
Surfaces: Always go with the recommended option.
Resizer: Nearest Neighbour is fastest , but looks ugly as hell. Bilinear is fast, slower than Nearest Neighbour, but gives acceptable PQ. Bilinear PS 2.0 uses PIxel Shader 2.0, it's basically the same as simple Bilinear. Bicubic 1=-0.60 is slower than Bilinear, but gives sharper image. Bicubic A=-1.00 is slowest, but gives sharpest image. You should pick what suits your hardware and your eye the most.
Resizer with PS 2.0 will not work if your graphic card does not support Pixel Shader 2.0.
Reinitialize when changing display -> When changing your display monitor, ticking this option means that the renderer will be reinitialized.
D3D Fullscreen: Will use Direct3D to render your video, like when you play video games. Context menus are disabled. This option is used to remove tearing.
Alternative VSync: Another option to remove tearing.
VMR-9 Mixer Mode: Enabling this option will enable VMR9 to use color controls in 'Options'->'Miscelaneous'.
EVR
+ Light renderer.
+ Can use DXVA on Vista/7. (not on XP)
+ Better for Vista/7 than VMR.
- Does not support MPC internal subtitle renderer.
Recommended for: PC with limited specs.With DXVA, you will get no subtitles.
Configuration: None, as far as I know.
EVR custom pres
+ Support MPC internal subtitle.
+ Many additional features.
+ More options in resizer algorithm, which may results in sharper image when full-screening.
+ Can use DXVA on Vista/7. (not on XP)
+ Can use MPC shaders.
- Heavy, especially with better resize algorithm.
Recommended for: PC with decent specs.
Configuration:
Resizer: Nearest Neighbour is fastest , but looks ugly as hell. Bilinear is fast, slower than Nearest Neighbour, but gives acceptable PQ. Bilinear PS 2.0 uses PIxel Shader 2.0, it's basically the same as simple Bilinear. Bicubic 1=-0.60 is slower than Bilinear, but gives sharper image. Bicubic A=-1.00 is slowest, but gives sharpest image. You should pick what suits your hardware and your eye the most.
Resizer with PS 2.0 will not work if your graphic card does not support Pixel Shader 2.0.
Reinitialize when changing display -> When changing your display monitor, ticking this option means that the renderer will be reinitialized.
D3D Fullscreen: Will use Direct3D to render your video, like when you play video games. Context menus are disabled. This option is used to remove tearing.
Alternative VSync: Another option to remove tearing.
EVR buffer: How many frames will be buffered. Leave this on default setting, unless your hardware is not strong enough.
Haali renderer
+ Option to adjust backbuffer, frame buffer, sharpness, colorspace, color range, and offset color plane. (When playing video, right click->'Filters'->'Haali Renderer').
+ Good upscaling algorithm; uses Bicubic upscaler.
+ Support MPC internal subtitle.
- Does not support DXVA at all.
- Heavy.
- Can only accept YUY2 and RGB32 input correctly.
Recommended for: PC with decent specs. Personally I prefer this than EVR-CP.
Configuration (When playing video, right click->'Filters'->'Haali Renderer'):
Buffers: Determine the size of buffer in your GPU. Reduce this if your playback lags.
Frames: Number of frames to be stored in the buffer.
Sharpness: Sharpness of the video.
YUV Colorspace: Pick BT.601 for SD, or BT.709 for HD. Or just use Auto and hope it results in correct colorpace.
Luma Range: Output color range, though I think the option is reversed. Here, TV actually gives 0-255 range, and PC actually give 16-235 range.
Color planes offset: If you notice color bleeding (certain color is shifted to one direction), use this to correct the bleeding.
madVR
+ Very high quality frame processing, with dithering and 16 bit instead of 8 bit processing.
+ Widest range of scaling algorithm; can select different ones for luma upscaling, chroma upscaling, and luma downscaling.
+ Option to use 3dLUT for accurate color conversion. Making 3dLUT is very advanced though.
+ Support for MPC-HC internal subtitle filter (requires MPC-HC version 1.5.2.2988 or newer)
- Requires video card with full support for Direct3D9, at least 128MB video card memory; recommended at least 256MB; with CUDA at least 512MB.
- Can only accept YV12 input.
Recommended for: PC with good specs.
Configuration will be explained in a later section due to the extensive configuration presented.
==================================================
Pick one that won't be too heavy on your computer, and one that looks best to you. Try taking screenshots of different renderers then compare them to see what you like most.
I mentioned scaling algorithm several times before. This is the algorithm used to upscale/downscale your video when you fullscreen/zoom/resize the video screen. These resizes are done by the renderer, and the quality of the resulting image depends on the scaling algorithm used.
Note that rendering is purely affected by GPU. This have nothing to do with CPU work. You might have a very strong CPU that can decode the video with ease, but your renderer is too heavy for your GPU, especially when you use more complicated scaling algorithm. This will cause a bottleneck. CUDA with madVR is not recommended unless you have at least 512MB video memory because the load on GPU will be too much.
Change Your Subtitle Renderer
You have 2 choice: MPC internal subtitle, or DirectVobSub.
MPC internal
How to use:
1. Press 'O', go to 'Playback' and tick 'Auto load subtitles'
2. Go to 'Subtitles', set 'Sub pictures to buffer' to 5 (lower if your RAM is below 512MB) and tick 'Allow animation when buffering.'
3. Still in the same page, set 'Maximum texture resolution' to Desktop (lower this if you still notice lag with softsubs).
4. Go to 'Default styles', fully tick 'Position subtitles relative to video frame.'
+ Better quality.
+ Can be used with DXVA.
- Only available in some video renderer.
- Subtitle effect sometimes still have some bug.
MPC Internal subtitle works in the rendering process. This means that it will put load on the GPU instead of CPU. When you zoom/fullscreen, the renderer will resize the video first, then overlay the subtitle on the final frame. This means that even when you resize much (e.g. 480p video to 1080p screen), the subtitle will still look great. But since the video is resized before, positional/angled subtitles might appear weird.
DirectVobSub
How to use:
1. Press 'O', go to 'External Filters', click on 'Add Filter', select 'DirectVobSub (auto loading version).'
2. Set it to 'Prefer', double click on it to open menu.
3. In the 'Main' tab, make sure 'PAR compensation' is set to 'Accurate Size.'
4. In the 'Misc' tab, untick 'Pre-buffer subpictures.'
5. If you have other filters here, make sure that you put DirectVobSub at the very bottom of the chain.
6. Go to 'Playback' and untick 'Auto load subtitles' if you use video renderers that support MPC internal subtitle filter.
+ Can be used with any video renderer.
+ Better subtitle effect.
- Lower quality.
- Cannot be used with DXVA.
VSFilter works before rendering process, and is done by the CPU. Because this works before rendering, if you fullscreen/zoom/resize your video player too much, the subtitle might look bad, since it'll get resized as well. But n the other hand, there will be absolutely no problem with positional/angled subtitles since no resizing is done before the subtitle is overlaid.
Change Your Codec
I will only focus on codec for H.264 videos, since HD files are always in H.264, and other codecs are not CPU-heavy.
I recommend between MPC Video Decoder, Microsoft DTV-DVD Decoder, CoreAVC, or ffdshow-mt.
MPC Video Decoder
+ Built-in, you don't need to install anything other than MPC-HC to use this.
+ Can use DXVA.
+ Can decode many other video other than H.264.
- Without DXVA, it's rather slow.
- DXVA has many limitations.
- Rather glitchy.
Usage recommendation:
* You don't want to install too many stuff on your PC.
* Your computer supports DXVA,, but doesn't support CUDA.
How to use:
This is actually the default setting, so you don't need to do anything if you want to use this. However, if you already set other decoder to use, then you want to revert back to MPC Video Decoder, then:
1. Press 'O', go to 'Internal Filters', make sure that the video codec that you want to be decoded with this is ticked.
2. Go to 'External Filters', make sure there are no video decoder that will take over MPC Decoder's work is in the chain. (CoreAVC, ffdshow, etc.)
3. For DXVA, make sure you use a video renderer that supports DXVA.
Microsoft DTV-DVD Decoder
+ Built-in on Windows 7, you don't need to install anthing at all.
+ Can use DXVA.
+ Better quality and less glitchy for DXVA than MPC Video Decoder.
- Without DXVA, it's rather slow.
- DXVA has many limitations.
Usage recommendations:
* You have Windows 7 installed.
* You want to use DXVA.
* You don't want to install to many stuff.
How to use:
1. Press 'O', go to 'External Filters', click 'Add filters', then select 'Microsoft DTV-DVD decoder.'
2. Make sure you use a renderer that supports DXVA.
CoreAVC
+ Can use CUDA.
+ Even without CUDA, the decoding performance is still the best.
+ Many options to pick, such as colorspace, color range, deblocking, etc.
- Payware
Usage recommendation:
* You can pay for it.
* Your computer supports CUDA.
* Your computer doesn't support CUDA nor DXVA; in which case you will use this for it's very fast software decoding performance.
A very recommended decoder, even if you don't use CUDA, it still has the fastest decoding performance.
How to use:
1. Press 'O', go to 'External Filters', click 'Add Filter', then select 'CoreAVC Video Decoder'.
2. Set to 'Prefer', then double click on it to open it's settings menu.
3. Set the options like this:
Input Format: Check everything.
Output Format: Check YV12 only (if you want to use Haali renderer, YUY2 only).
Input levels: TV levels.
Output levels: TV levels, even if you output to PC. We will tweak this somewhere else.
Deinterlacing: Hardware, or Bob if you use madVR.
Input Colorspace: Auto-detect. Or if you want to do it manually, usually SD sources use BT.601, while HD sources use BT.709.
Deblocking: Standard is slowest, but gives best PQ. Skip always is fastest, but may produce artifacts. Pick your choice.
Aggresice Deinterlacing: Tick this.
Crop 1088 to 1080: Tick this.
Force VMR AR correction: Untick this.
Preferred decoder: Tick this.
Use Tray Icon: Tick this.
Prefer CUDA acceleration: Depends. If your computer supports CUDA, then tick this. But if you use madVR and your graphic card has less than 512MB memory, I suggest to untick this even if your computer supports CUDA.
ffdshow-mt
+ Utilizes multi-threaded CPU (Dual Core, Core 2 Duo, Quad Core, i3-i7 series) to speed up decoding. On my laptop, the decoding speed is roughly the same as CoreAVC.
+ Comes from ffdshow, which includes many post processing filters.
- Cannot use CUDA nor DXVA.
- On single threaded CPU (P4, etc.) will slow down encoding a little instead of speed up.
Usage scenario:
* Your computer doesn't support CUDA nor DXVA.
* You don't want to pay for CoreAVC.
* You have a computer with multi-threaded CPU.
Just remember not to use this when you have a single threaded CPU.
How to use:
1. Press 'O', go to 'External Filters'. Click 'Add Filter', then select 'ffdshow Video Decoder'.
2. Set it to 'Prefer', then double click on 'ffdshow Video Decoder' to open up a menu.
3. In 'Codecs', change 'H.264/AVC' decoder from 'libavcodec' to 'ffmpeg-mt'.
4. While you're here, you might want to set up the post processing options.
5. If you use Haali renderer, be sure to go to 'Output' and untick YV12.
Custom Filter Chains
I assume you have read the other blog that explains quite a number of things. If you haven't, then read that now. This section is for making your own filter chain (in the "External Filters' section) so it will play files with filter chain of your preferences. If you have read the guide, you should understand the basics of it by now. Now, to explain further, I'll put an example of a filter chain.
So, what does this mean? Basically, MPC will look from top to bottom to decide what filter to use. Say I am going to play a file with H.264 video and AC3 audio with ASS subs.
* MPC will detect the first filter - CoreAVC, recognize it as a filter that can decode H.264, and use it to decode H.264.
* After the video have been decoded to it's uncompressed form, MPC detects the second filter - ffdshow Video decoder. ffdshow Video decoder does not support uncompressed video (it does with some tweaks though), so it will be skipped. Notice that CoreAVC is used to decode instead of ffdshow even if ffdshow can decode H.264 as well.
* Then, we have DirectVobSub. This will overlay the subtitles on the uncompressed video. Remember that this must be put below all other video transformation filter. By now, we have one uncompressed video stream, one uncompressed audio stream.
* Below that, we have ffdshow Audio decoder. This filter can decode almost any audio codec, including AC3. So MPC will use this to decode our audio track.
* After this, the resulting streams are sent to their respective renderer.
It's rather hard to explain, but that's basically how you configure custom filter chains. Experiment yourself to see what you like.
Post Processing
The file you have may not be to your liking, whether it's the video or audio. Using post processing, we can apply post processing filters to process the video or audio. This includes, but not limited to:
Video:
Resizing
Sharpen
Denoise
Deinterlace
Color Correction
etc.
Audio:
Down/Upmixing
Normalize
Resample
Volume Boost
Equalizer
etc.
Notice that different post processing will result in increase in CPU usage.
How to enable:
The best way IMO is to use ffdshow post processing capabilities. In both ffdshow video decoder and audio decoder settings, there are many filtering options available.
Post processing can be used if you think a source is not up to your liking, then you can use this to make it look better. Even so, I suggest not to use too much post processing. Not only it increase load on CPU, I can't expect someone to manually adjust their post processing options for every different files they encounter so it will look exactly what they want, since different videos will have different 'imperfections'. You can't expect to have one global setting that will work for all; a setting meant to play blurred video will look oversharpened on a sharp video. A setting meant to play noisy video will destroy details on video with little noise.
The only thing I would recommend to be always enabled is the 'Mixer' filter in Audio processing, to down/upmix audio channels to suit your speaker setup, e.g. 5.1 audio channels downmixed to 2.0 channels. Another one is 'DeBand' filter, to fix banding artifacts (where gradients looks like color bands instead of smooth transition). This filter is not that heavy and doesn't have any bad effect on your video (as long as you keep it under 2.0), but make sure to turn it off on 1080p videos, it's too heavy to DeBand 1080p video.
AviSynth
This is what I prefer for video post processing. It gives much more options, and often run faster than the included post-processing filters in ffdshow. To use this open up ffdshow configuration, go to 'AviSynth', then write your AviSynth script here. It's rather difficult to use if you don't know anything about AviSynth, so I don't recommend this for casual user. I might make another guide about this sometimes later.
Post Processing for other decoder
Remember my custom filter chain above? There, I set up my filter so it will only use ffdshow Video for non-H.264 videos, and ffdshow Audio for non-FLAC audio. So, how do I enable post processing for H.264 video and FLAC audio? Simple, we tweak the options in ffdshow so it will accept input from uncompressed video/audio. To do this, open up ffdshow Video decoder settings, go to 'Codecs', scroll to the bottom and set 'Raw Video' to 'all supported'. This way, after CoreAVC decodes the H.264 stream, it will pass it to ffdshow Video decoder to apply the post-processing. Do the same for ffdshow Audio decoder, set 'Raw Audio' to 'all supported'.
Shaders
When using DXVA, you can't use intermediate filter between your video decoder and video renderer. This means you can't use post processing the way I mentioned above. The only way to enable post-processing with DXVA is to use shaders. This has several disadvantages compared to ffdshow post processing, namely:
- Less configurable than ffdshow; unless you know how to write yout own shader.
- Can only be used with VMR7/9 renderless and EVR CP (no big deal, since you will most likely use those for DXVA anyway).
- Shader operations are done in GPU; this means with DXVA, you give a huge load to GPU, depending on the video and shader used. Without DXVA, you have less load in GPU, but you're better off with ffdshow post processing.
Even so, it has one (small) advantage, that is:
+ Able to use some 'strange' effect, such as emboss, wave, etc. Not important if you're watching normally, but might be useful if your laptop is used in a con and you want to show a video with those effects.
To use this, simply set your renderer to VMR7/9 renderless or EVR CP, play a video, pause, right click->'Shaders' then pick your desired shader.
To use more than one shader, select 'Combine Shaders' and use it to combine your desired shaders. Note that the more shader you use, more load will be given to the GPU.
To disable all shaders, simply select 'Shaders Disabled' option.
To be honest I almost never use shaders, so I can't really provide much useful information. If I got the time to test it, I will be sure to update it here.
madVR Settings
Why does this one renderer get a whole section for itself? Because it has the most extensive configuration. madVR is a very high quality video renderer. If you are looking for quality, then this renderer is for you. Though it comes at a price: It's very GPU heavy. Whether to use it or not, decide for yourself. I suggest to use this if you have at least 256MB GPU memory, or 512MB if you intend to use it with hardware acceleration.
Configurations (When playing a video, right click->'Filters'->'madVR Renderer'->'Edit settings'):
Devices: Adjust output settings for different display devices.
Devices->[Display Name]->Identification: I suggest to not touch anything here. (Tbh I also don't understand wtf is this.)
Devices->[Display Name]->Levels: Adjust output color levels. Pick PC levels if you output to PC, or pick TV levels if you output to TV.
Devices->[Display Name]->3DLUT: Use a 3DLUT file for color conversion. This will make madVR a bit longet to load since it will read the 3DLUT file first, but will result in better and faster color conversion. If you know how, you can also make a 3DLUT file specifically calibrated o your display.
Scaling Algorithm: Determines scaling algorithm to use. It is ordered roughly from fastest to slowest.
Scaling Algorithm->Chroma Upscaling: Determines what scaling algorithm to upscale chroma (color). Recommended to use SoftCubic softness: 100. Lower the softness if you find your computer not powerful enough, or further, pick Catmull-Rom, or even Bilinear.
Scaling Algorithm->Luma Upscaling: Determines what scaling algorithm to upscale luma (luminance). Unlike chroma, this one is more preference based. I prefer Bicubic 60, but what you like might differ. Also take note of whether your hardware can handle it or not.
Scaling Algorithm->Luma Downscaling: Determines what scaling algorithm to downscale luma (luminance). Again, this one is preference based. I prefer Bilinear for this, but that's mostly because downscaling usually means the source is very heavy, so I pick the lightest scaler for this.
A rule of the thumb is to resort to Bilinear if you find your hardware not strong enough. Though if you still want better scaler, resort to EVR CP or Haali renderer. Another is that upscaling can usually use slower algorithm than downscaling. You can see the rough difference between different scalers in the graph provided (props to madshi, really a great author).
Rendering: Configures rendering options (well, duh).
Rendering->General Settings->Use managed upload textures (XP only): Enable this if you are on XP.
Rendering->General Settings->Upload frames in render thread: Enable this as well. I read somewhere that in a very low end computer, disabling this will help, though I can't confirm that.
Rendering->General Settings->Enable automatic fullscreen exclusive mode: Like D3D fullscreen option in EVR CP/ VMR9, this one is also used to prevent tearing. 'Show seek bar' is to show a madVR exclusive seek bar so you don't have to switch out of exclusive mode whenever you want to seek. Delay switch to exclusive mode by 3 seconds should be self-explanatory.
Rendering->Windowed mode tweaks: I suggest to refrain from changing anything here.
Rendering->Trade quality for performance: Pretty self explanatory, enable these options if you find your computer not strong enough.
*don't use dither: Disables dithering. Dithering is a process to reduce color banding, by using additional color to simulate another color. Can't explain it very well, try search on wiki.
* use 10 bit chroma processing: The video's color information are processed only in 10 bit instead of 16bit. This might introduce more banding than using 16bit processing, although chroma bandings are usually less noticeable.
* use 10 bit luma processing: The video's luminance information are processed only in 10 bit instead of 16 bit. Least recommended to option to enable, since luma banding are much more noticeable than chroma banding. Note that 10 bit processing is still higher than standard renderers' 8 bit processing.
If you feel the need to use these options, then try them one by one from the topmost.
Output Levels
This is actually quite simple, but I feel the need to elaborate further so people can get the correct output level.
Basically this is the range at which color will be presented. Full range is 0-255, usually PCs can display this no problem, but TV usually can only display 16-235. Since most of video files are meant to be played in a standalone player connected to TV, sources will almost always have TV range. To properly display on PC monitor, we need to do levels conversion, from 16-235 to 0-255 (Photoshop users should understand what this is).
Problem is, in a filter chain, the option to do this conversion can sometimes be found in more than one filter. Take an example, if you use CoreAVC to decode, use ffdshow for post processing, and use Haali renderer, you have 3 filters that can do this conversion. Enabling conversion on all 3 will result in shitty color. You must only enable this conversion once. I prefer to do this in the renderer setting, though some renderer do not have this setting. On the other filter, you must set input and output as TV range.
How to enable color conversion on different renderers:
VMR7 renderless: No option for this. Use ffdshow to convert the output levels
VMR9 renderless: No option, but will always output at PC levels. If you want to output at TV levels, use ffdshow.
EVR: Again, no option. Will always output at PC levels. Use ffdshow to output TV levels
EVR CP: While playing, right click->'Renderer option'->'Output Range' then pick what you want.
Haali Renderer: Explained in the Haali renderer section.
madVR: Explained in the madVR section.
This is why I wrote to set Output levels in CoreAVC as TV levels.
How to use ffdshow to output PC levels
Note that this will NOT work with madVR, since madVR requires YV12 input, and this step involves doing colorspace conversion to RGB.
- Go to ffdshow video settings window.
- Go to 'Output'.
- In hte supported output colospaces, untick every Planar YUV, Packed YUV, and RGB except for RGB32.
- You may want to untick 'High quality YV12 to RGB conversion' if your PC's CPU is not strong enough.
- Go to RGB conversion, in the 'Output levels', pick between Computer or TV.
Since the feed to the renderer is RGB, renderer don't have to do any RGB conversion anymore, thus bypassing the levels conversion as well. Downside is, this method is heavier on the CPU. Though GPU load will be lessened. So pick between using renderer or CPU to do color conversion depending on your hardware
ReClock
This is very useful filter, that I'm wondering why didn't I use this sooner? Anyway, I just recently got this, and I'm still tweaking stuff, but basically, ReClock's main purpose is to eliminate jitter/judder/jerky playback caused by different frame rate of video and video card's refresh rate. I must say, I haven't fully understood the theory behind that, but it does show noticeable improvement in playback smoothness, by sppeding up 23.976fps to 24fps, and 29.97fps to 30fps. Of course, playback becomes 1% faster, but I can't think there's anyone who will notice it.
It also allows WASAPI exclusive mode, which is a mode to bypass Direct Sound. What this means is, it will bypass any settings and enhancements done in your sound driver settings, and output exact uncompressed stream directly.
There's also an option for bitstreaming, though to be honest, I don't understand the concept behind this at all. I think it also requires expensive sound card to work properly, or ATI 5*** GPU.
So yeah, I don't know about this little thing all that much, but I do use it to eliminate jitter and WASAPI exclusive.
How to use:
Install ReClock, then open up it's Configuration (it should be in the Start Menu).
I won't go into the audio since I myself is confused wtf I just did (thankfully it works), so I'll just get into the part for adjusting frame rate.
Set your configuration windows like these screenshots:
Open up MPC-HC, press 'O', go to 'Output', then select ReClock Audio Renderer as your audio renderer. There, you're set to go.
Anyway, if anyone understands this matter more, please do leave a comment so I can fix and add stuffs too.
Recommendation
To get the maximum performance at a highest possible quality for your hardware, there are some tips that I can suggest.
- If you have at least 2.4GHz Core2Duo CPU, you can safely use CoreAVC(without CUDA) with DirectVobSub to play 1080p @ 10mbps bitrate files without noticeable lag. This is assuming that the encoder is actually reasonable enough not to put fancy karaoke. I tested using THORA's 1080p Eden of the East OP and 1080p Casshern Sins OP, both work without any noticeable lag at all. Notice that this is only for the CPU part, it's possible that it still lags, which may be caused by GPU lag, not CPU lag.
- If you have at least 256MB GPU memory and supports Pixel Shader 2, you can try out madVR. Tweak out the upscaling/downscaling settings so it will run well without lag. My setting: chroma upscaling = Softcubic 80, luma upscaling = Bicubic 60, luma downscaling = Bilinear. It may still lag though, for which I suggest to use the 'trade quality for performance' option, or just swtich to another renderer.
- If you get lag, determine whether it's CPU lag or GPU lag. Easiest way is to switch you renderer to Overlay Mixer, which will almost never cause GPU lag. If it still lags, most likely it's CPU that's causing it. If it doesn't, then most likely it's the renderer that causes the lag.
- In the case of CPU lag, try to use DXVA or CUDA if possible. This will actually increase GPU load, in which case you should tweak the renderer's settings if it still lags (which I doubt will happen anyway, since most DXVA/CUDA capable GPUs should be quite decent). Most important is to tweak the resizer option. CUDA is recommended, but DXVA should only be used as a last resort, since DXVA tend to be rather glitchy sometimes.
- If you can't use DXVA nor CUDA and you get CPU lag, I can only suggest you use either CoreAVC or ffdshow-mt, and use MPC's internal subtitle filter (either by using Haali renderer, EVR CP, or VMR renderless). This way, subtitle processing will be done in GPU, thus reducing CPU load.
- If you got GPU lag, use a lighter renderer, and/or disable internal MPC subtitle (use VSFilter instead). Personally, the only time I've ever experienced GPU lag is when using madVR, but I do have a decent graphics card.
- If all else fails, then try to clean up your system. Still fails, then either get a lower bitrate/resolution release, or get a new PC. That means your PC is just too old or you're using a crappy netbook.
Conclusion
I think that's it for now. I might make more updates as I research more, remember some stuffs I forgot to include, or got information that I wrote something wrong here. Feedback is greatly appreciated. Thanks for reading! (If you read this anyway).
Credits
* Doom9 forums. 70% of the information here comes from there.
* imouto.my, a site that includes a lot of explanations about DXVA and CUDA.
* EADFAGLOLZ (yeah, that's the name), a guide hosted at animemusicvideos.org with lots of theories and other things.
* My own experiments.
* Google.
* Reader.
Table of Contents
Changelog
To-Do list
Preface
Required Knowledge, and Knowledge Base
Preparations
Installing Stuffs
Configuring Your Setup
- Disabling Internal MPC-HC Matroska Splitter
- Change Your Video Renderer
- Change Your Subtitle Renderer
- Change Your Codecs
Custom Filter Chains
Post Processing
Shaders
madVR
Output Levels
Changelog
04-01-2011
Updated some information.
01-15-2011
Added information ReClock.
Update for 64 bit components.
Update some information.
12-09-2010
Made the guide.
To-Do List
- Adds more information as I research more.
- Add screenshots to better illustrate the guide.
Preface
I believe that most of you have ever tried CCCP, K-Lite, KMPlayer, VLC, or many other one-click playback solutions, and somehow it just works (or, it just doesn't work). Now, have you ever wondered the more advanced options to your playback setup? Or, have you ever found that none of those one-click playback solution works flawlessly for you? If the answer is yes, then this guide is for you.
Note that this is not a step-by-step guide. I will only provide information on configurations, you should pick the setup that fits you best. This way, you will have better understanding, and can deal with many different computer instead of just yours. Who knows, maybe when one of your friends said that his/her laptop can't play video files properly, you can come to the rescue!!
This is an update to the previous guide which covers the topic on how to play HD files smoothly, but I decided to take it further and just put everything I know of how to properly configure your playback setup. Although it says advanced, I think even casual user can benefit to some extent with this guide.
Note that this guide is liable to mistakes, but as Full Frontal said, "Don't let past mistakes weigh you down. Just accept it and move forward. That is the privilege of being an adult."
...Yeah so just inform me if I put up a wrong information here.
Required Knowledge, and Knowledge Base
Of course, you need to know quite a bit about computers in general. If you can't install even a simple program, there's no use for you to be here.
For some more advanced knowledge that will help your understanding, I'll try to explain some of it here. This is important, as many of the technical stuffs I mentioned here are explained there. Or, just Google them.
Preparations
Uninstall any codec packs you might have (including K-Lite and CCCP). Then, get these stuffs.
Required:
Media Player:
Media Player Classic - Home Cinema. This is the official public release. You might also want to get latest build here. (The site is in Russian, but there's enough English for you to get what you want.) If you're not sure, then just get the public release. Get the 32-bit version even if you have 64-bit system. This will be our main media player. You might ask, "Why not [insert your favorite player]?" Well, from my experiments, MPC-HC is the only one that works perfectly and best suited for this guide. Other player tend to have their own shortcomings.
Source Filter (aka Media Splitter):
Haali Splitter (Matroska Splitter). Mainly for .mkv files, because some .mkv files tend to have some features such as ordered chapters, editions, etc that may not work with the built-in splitter for just about any player. Can also be used for splitting other media files.
Optional:
Multi-Purpose Decoder:
ffdshow tryouts.. As with MPC-HC, get the latest 32-bit version. This one can be used as multi-purpose decoder or for post processing. If you have a multi-threaded CPU (Dual Core, Quad Core, Core 2 Duo etc), it also have an option to use multi-threaded h.264 decoding to speed up h.264 decoding process.
H264 Decoder:
CoreAVC. This is NOT free. But it is the fastest decoder for h.264, and it can also use CUDA to utilize GPU to assist CPU in decoding.
Video Renderer:
madVR. A very high quality video renderer with extensive configuration. It's rather heavy on the GPU though, depending on your settings.
Subtitle Renderer:
VSFilter (DirectVobSub). MPC-HC internal subtitle can only be used with certain video renderers. So if you want to use other video renderers (madVR included), you must use vsfilter to show subtitles. The link I gave is version 2.39, there's a version 2.40 available, but I forgot where I got it :P
FLAC Decoder
madFLAC. From the same author as madVR, this one is a high quality FLAC decoder. Though, it does have a problem with audio switching, so if you have a dual-audio FLAC files and you want to switch audio, it's not recommended to use this.
Audio Renderer
ReClock. This is a special filter that enables several things, most importantly, to eliminate judder on playback by adjusting frame rate (Ex: Speed up 23.976fps to 24fps). This will result in smooth playback, at the cost of 1% faster playback speed. Also, enables WASAPI exclusive and bitstreaming.
UPDATE 01-14-2011:The components above except for madVR and madFLAC also have x64 versions. CoreAVC and Haali Splitter installs the x64 versions by default in x64 systems. For the rest of them, you need to get the x64 installers. Note that x64 components only works with x64 MPC-HC, and x86 components only works with x86 MPC-HC.
While there are codec packs such as K-Lite and CCCP that install some of the things I mentioned here, installing them yourself means you can pick what you want yourself, and you don't have to wait for the pack itself to be updated if you want to update the components.
Installing Stuffs
Most of the stuffs above are just like normal installation, but madVR and madFLAC are different. With both of those, you'll get a .rar file. Extract the .rar file somewhere, preferably 'C:Program Files' so it's easy to find later, then double-click on install.bat. A prompt will say that you've successfully installed madVR/madFLAC. Don't move/rename/delete the folder now, or else you will have to reinstall it again.
When installing ffdshow, just enable all components. You don't know when you might need those components.
When installing DirectVobSub, untick 'Prebuffer subpictures' option.
When installing CoreAVC, make sure you untick 'Haali Media Splitter.' We should install this individually, because the one in CoreAVC is outdated already (by the time of writing).
When installing Haali Splitter, make sure to untick 'Associate .mkv and .mka files with Windows Media Player'. If you want to use Haali to split other files other than .mkv, like .avi, .mp4 et cetera, just tick the respective option.
Configuring Your Setup
I will only provide some options, I honestly can't determine the optimal setup for you, since your hardware and mine are most certainly different, you should try these options and see what works best.
Disabling Internal MPC-HC Matroska Splitter
Open up MPC-HC. Press 'O' to open the options menu. Go to 'Internal Filters', and untick 'Matroska' option. If you ticked other file types in Haali installer settings, untick them here as well. This will prevent MPC-HC from using it's internal splitter, and will use Haali Splitter instead. This step is a must; or else many .mkv features will not be supported.
Change Your Renderer
Go to 'Playback'->'Output'. Here, you can pick what video renderer to use. You can look here for the comparison. I recommend Overlay Mixer, VMR7/9 renderless, Haali Renderer, EVR, EVR Custom Presenter, or madVR.
Overlay Mixer
+ Lightest renderer.
+ Can use DXVA on XP.
- Aero will be disabled.
- Does not support MPC internal subtitle.
- Scaling algorithm is not the best.
Recommended for: PC with very low spec that all other renderer fail to work smoothly. This is more like failsafe if anything. With DXVA, you won't get any subtitles at all.
Configurations: None, as far as I know.
VMR7 renderless
+ Support MPC internal subtitle.
+ Can use DXVA on XP. (not on Vista/7)
+ Light; still heavier than Overlay Mixer and EVR though.
+ Can use MPC shaders.
- Picture quality is not as good as with some other renderers.
- Outdated compared to EVR.
Recommended for: PC with XP and you wish to use DXVA. Not recommended for anything else.
Configuration:
Surfaces -> Always go with the recommended option.
VMR9 renderless
+ Support MPC internal subtitle.
+ Can use DXVA on XP. (not n Vista/7)
+ Wide selection of upscaling algorithm, better algorithm means better picture quality.
+ Can use MPC shaders.
- Heavy, especially with better upscaling algorithm.
- Outdated compared to EVR.
Recommended for: PC with XP and you wish to use DXVA. Not recommended for anything else.
Configuration:
Surfaces: Always go with the recommended option.
Resizer: Nearest Neighbour is fastest , but looks ugly as hell. Bilinear is fast, slower than Nearest Neighbour, but gives acceptable PQ. Bilinear PS 2.0 uses PIxel Shader 2.0, it's basically the same as simple Bilinear. Bicubic 1=-0.60 is slower than Bilinear, but gives sharper image. Bicubic A=-1.00 is slowest, but gives sharpest image. You should pick what suits your hardware and your eye the most.
Resizer with PS 2.0 will not work if your graphic card does not support Pixel Shader 2.0.
Reinitialize when changing display -> When changing your display monitor, ticking this option means that the renderer will be reinitialized.
D3D Fullscreen: Will use Direct3D to render your video, like when you play video games. Context menus are disabled. This option is used to remove tearing.
Alternative VSync: Another option to remove tearing.
VMR-9 Mixer Mode: Enabling this option will enable VMR9 to use color controls in 'Options'->'Miscelaneous'.
EVR
+ Light renderer.
+ Can use DXVA on Vista/7. (not on XP)
+ Better for Vista/7 than VMR.
- Does not support MPC internal subtitle renderer.
Recommended for: PC with limited specs.With DXVA, you will get no subtitles.
Configuration: None, as far as I know.
EVR custom pres
+ Support MPC internal subtitle.
+ Many additional features.
+ More options in resizer algorithm, which may results in sharper image when full-screening.
+ Can use DXVA on Vista/7. (not on XP)
+ Can use MPC shaders.
- Heavy, especially with better resize algorithm.
Recommended for: PC with decent specs.
Configuration:
Resizer: Nearest Neighbour is fastest , but looks ugly as hell. Bilinear is fast, slower than Nearest Neighbour, but gives acceptable PQ. Bilinear PS 2.0 uses PIxel Shader 2.0, it's basically the same as simple Bilinear. Bicubic 1=-0.60 is slower than Bilinear, but gives sharper image. Bicubic A=-1.00 is slowest, but gives sharpest image. You should pick what suits your hardware and your eye the most.
Resizer with PS 2.0 will not work if your graphic card does not support Pixel Shader 2.0.
Reinitialize when changing display -> When changing your display monitor, ticking this option means that the renderer will be reinitialized.
D3D Fullscreen: Will use Direct3D to render your video, like when you play video games. Context menus are disabled. This option is used to remove tearing.
Alternative VSync: Another option to remove tearing.
EVR buffer: How many frames will be buffered. Leave this on default setting, unless your hardware is not strong enough.
Haali renderer
+ Option to adjust backbuffer, frame buffer, sharpness, colorspace, color range, and offset color plane. (When playing video, right click->'Filters'->'Haali Renderer').
+ Good upscaling algorithm; uses Bicubic upscaler.
+ Support MPC internal subtitle.
- Does not support DXVA at all.
- Heavy.
- Can only accept YUY2 and RGB32 input correctly.
Recommended for: PC with decent specs. Personally I prefer this than EVR-CP.
Configuration (When playing video, right click->'Filters'->'Haali Renderer'):
Buffers: Determine the size of buffer in your GPU. Reduce this if your playback lags.
Frames: Number of frames to be stored in the buffer.
Sharpness: Sharpness of the video.
YUV Colorspace: Pick BT.601 for SD, or BT.709 for HD. Or just use Auto and hope it results in correct colorpace.
Luma Range: Output color range, though I think the option is reversed. Here, TV actually gives 0-255 range, and PC actually give 16-235 range.
Color planes offset: If you notice color bleeding (certain color is shifted to one direction), use this to correct the bleeding.
madVR
+ Very high quality frame processing, with dithering and 16 bit instead of 8 bit processing.
+ Widest range of scaling algorithm; can select different ones for luma upscaling, chroma upscaling, and luma downscaling.
+ Option to use 3dLUT for accurate color conversion. Making 3dLUT is very advanced though.
+ Support for MPC-HC internal subtitle filter (requires MPC-HC version 1.5.2.2988 or newer)
- Requires video card with full support for Direct3D9, at least 128MB video card memory; recommended at least 256MB; with CUDA at least 512MB.
- Can only accept YV12 input.
Recommended for: PC with good specs.
Configuration will be explained in a later section due to the extensive configuration presented.
==================================================
Pick one that won't be too heavy on your computer, and one that looks best to you. Try taking screenshots of different renderers then compare them to see what you like most.
I mentioned scaling algorithm several times before. This is the algorithm used to upscale/downscale your video when you fullscreen/zoom/resize the video screen. These resizes are done by the renderer, and the quality of the resulting image depends on the scaling algorithm used.
Note that rendering is purely affected by GPU. This have nothing to do with CPU work. You might have a very strong CPU that can decode the video with ease, but your renderer is too heavy for your GPU, especially when you use more complicated scaling algorithm. This will cause a bottleneck. CUDA with madVR is not recommended unless you have at least 512MB video memory because the load on GPU will be too much.
Change Your Subtitle Renderer
You have 2 choice: MPC internal subtitle, or DirectVobSub.
MPC internal
How to use:
1. Press 'O', go to 'Playback' and tick 'Auto load subtitles'
2. Go to 'Subtitles', set 'Sub pictures to buffer' to 5 (lower if your RAM is below 512MB) and tick 'Allow animation when buffering.'
3. Still in the same page, set 'Maximum texture resolution' to Desktop (lower this if you still notice lag with softsubs).
4. Go to 'Default styles', fully tick 'Position subtitles relative to video frame.'
+ Better quality.
+ Can be used with DXVA.
- Only available in some video renderer.
- Subtitle effect sometimes still have some bug.
MPC Internal subtitle works in the rendering process. This means that it will put load on the GPU instead of CPU. When you zoom/fullscreen, the renderer will resize the video first, then overlay the subtitle on the final frame. This means that even when you resize much (e.g. 480p video to 1080p screen), the subtitle will still look great. But since the video is resized before, positional/angled subtitles might appear weird.
DirectVobSub
How to use:
1. Press 'O', go to 'External Filters', click on 'Add Filter', select 'DirectVobSub (auto loading version).'
2. Set it to 'Prefer', double click on it to open menu.
3. In the 'Main' tab, make sure 'PAR compensation' is set to 'Accurate Size.'
4. In the 'Misc' tab, untick 'Pre-buffer subpictures.'
5. If you have other filters here, make sure that you put DirectVobSub at the very bottom of the chain.
6. Go to 'Playback' and untick 'Auto load subtitles' if you use video renderers that support MPC internal subtitle filter.
+ Can be used with any video renderer.
+ Better subtitle effect.
- Lower quality.
- Cannot be used with DXVA.
VSFilter works before rendering process, and is done by the CPU. Because this works before rendering, if you fullscreen/zoom/resize your video player too much, the subtitle might look bad, since it'll get resized as well. But n the other hand, there will be absolutely no problem with positional/angled subtitles since no resizing is done before the subtitle is overlaid.
Change Your Codec
I will only focus on codec for H.264 videos, since HD files are always in H.264, and other codecs are not CPU-heavy.
I recommend between MPC Video Decoder, Microsoft DTV-DVD Decoder, CoreAVC, or ffdshow-mt.
MPC Video Decoder
+ Built-in, you don't need to install anything other than MPC-HC to use this.
+ Can use DXVA.
+ Can decode many other video other than H.264.
- Without DXVA, it's rather slow.
- DXVA has many limitations.
- Rather glitchy.
Usage recommendation:
* You don't want to install too many stuff on your PC.
* Your computer supports DXVA,, but doesn't support CUDA.
How to use:
This is actually the default setting, so you don't need to do anything if you want to use this. However, if you already set other decoder to use, then you want to revert back to MPC Video Decoder, then:
1. Press 'O', go to 'Internal Filters', make sure that the video codec that you want to be decoded with this is ticked.
2. Go to 'External Filters', make sure there are no video decoder that will take over MPC Decoder's work is in the chain. (CoreAVC, ffdshow, etc.)
3. For DXVA, make sure you use a video renderer that supports DXVA.
Microsoft DTV-DVD Decoder
+ Built-in on Windows 7, you don't need to install anthing at all.
+ Can use DXVA.
+ Better quality and less glitchy for DXVA than MPC Video Decoder.
- Without DXVA, it's rather slow.
- DXVA has many limitations.
Usage recommendations:
* You have Windows 7 installed.
* You want to use DXVA.
* You don't want to install to many stuff.
How to use:
1. Press 'O', go to 'External Filters', click 'Add filters', then select 'Microsoft DTV-DVD decoder.'
2. Make sure you use a renderer that supports DXVA.
CoreAVC
+ Can use CUDA.
+ Even without CUDA, the decoding performance is still the best.
+ Many options to pick, such as colorspace, color range, deblocking, etc.
- Payware
Usage recommendation:
* You can pay for it.
* Your computer supports CUDA.
* Your computer doesn't support CUDA nor DXVA; in which case you will use this for it's very fast software decoding performance.
A very recommended decoder, even if you don't use CUDA, it still has the fastest decoding performance.
How to use:
1. Press 'O', go to 'External Filters', click 'Add Filter', then select 'CoreAVC Video Decoder'.
2. Set to 'Prefer', then double click on it to open it's settings menu.
3. Set the options like this:
Input Format: Check everything.
Output Format: Check YV12 only (if you want to use Haali renderer, YUY2 only).
Input levels: TV levels.
Output levels: TV levels, even if you output to PC. We will tweak this somewhere else.
Deinterlacing: Hardware, or Bob if you use madVR.
Input Colorspace: Auto-detect. Or if you want to do it manually, usually SD sources use BT.601, while HD sources use BT.709.
Deblocking: Standard is slowest, but gives best PQ. Skip always is fastest, but may produce artifacts. Pick your choice.
Aggresice Deinterlacing: Tick this.
Crop 1088 to 1080: Tick this.
Force VMR AR correction: Untick this.
Preferred decoder: Tick this.
Use Tray Icon: Tick this.
Prefer CUDA acceleration: Depends. If your computer supports CUDA, then tick this. But if you use madVR and your graphic card has less than 512MB memory, I suggest to untick this even if your computer supports CUDA.
ffdshow-mt
+ Utilizes multi-threaded CPU (Dual Core, Core 2 Duo, Quad Core, i3-i7 series) to speed up decoding. On my laptop, the decoding speed is roughly the same as CoreAVC.
+ Comes from ffdshow, which includes many post processing filters.
- Cannot use CUDA nor DXVA.
- On single threaded CPU (P4, etc.) will slow down encoding a little instead of speed up.
Usage scenario:
* Your computer doesn't support CUDA nor DXVA.
* You don't want to pay for CoreAVC.
* You have a computer with multi-threaded CPU.
Just remember not to use this when you have a single threaded CPU.
How to use:
1. Press 'O', go to 'External Filters'. Click 'Add Filter', then select 'ffdshow Video Decoder'.
2. Set it to 'Prefer', then double click on 'ffdshow Video Decoder' to open up a menu.
3. In 'Codecs', change 'H.264/AVC' decoder from 'libavcodec' to 'ffmpeg-mt'.
4. While you're here, you might want to set up the post processing options.
5. If you use Haali renderer, be sure to go to 'Output' and untick YV12.
Custom Filter Chains
I assume you have read the other blog that explains quite a number of things. If you haven't, then read that now. This section is for making your own filter chain (in the "External Filters' section) so it will play files with filter chain of your preferences. If you have read the guide, you should understand the basics of it by now. Now, to explain further, I'll put an example of a filter chain.
So, what does this mean? Basically, MPC will look from top to bottom to decide what filter to use. Say I am going to play a file with H.264 video and AC3 audio with ASS subs.
* MPC will detect the first filter - CoreAVC, recognize it as a filter that can decode H.264, and use it to decode H.264.
* After the video have been decoded to it's uncompressed form, MPC detects the second filter - ffdshow Video decoder. ffdshow Video decoder does not support uncompressed video (it does with some tweaks though), so it will be skipped. Notice that CoreAVC is used to decode instead of ffdshow even if ffdshow can decode H.264 as well.
* Then, we have DirectVobSub. This will overlay the subtitles on the uncompressed video. Remember that this must be put below all other video transformation filter. By now, we have one uncompressed video stream, one uncompressed audio stream.
* Below that, we have ffdshow Audio decoder. This filter can decode almost any audio codec, including AC3. So MPC will use this to decode our audio track.
* After this, the resulting streams are sent to their respective renderer.
It's rather hard to explain, but that's basically how you configure custom filter chains. Experiment yourself to see what you like.
Post Processing
The file you have may not be to your liking, whether it's the video or audio. Using post processing, we can apply post processing filters to process the video or audio. This includes, but not limited to:
Video:
Resizing
Sharpen
Denoise
Deinterlace
Color Correction
etc.
Audio:
Down/Upmixing
Normalize
Resample
Volume Boost
Equalizer
etc.
Notice that different post processing will result in increase in CPU usage.
How to enable:
The best way IMO is to use ffdshow post processing capabilities. In both ffdshow video decoder and audio decoder settings, there are many filtering options available.
Post processing can be used if you think a source is not up to your liking, then you can use this to make it look better. Even so, I suggest not to use too much post processing. Not only it increase load on CPU, I can't expect someone to manually adjust their post processing options for every different files they encounter so it will look exactly what they want, since different videos will have different 'imperfections'. You can't expect to have one global setting that will work for all; a setting meant to play blurred video will look oversharpened on a sharp video. A setting meant to play noisy video will destroy details on video with little noise.
The only thing I would recommend to be always enabled is the 'Mixer' filter in Audio processing, to down/upmix audio channels to suit your speaker setup, e.g. 5.1 audio channels downmixed to 2.0 channels. Another one is 'DeBand' filter, to fix banding artifacts (where gradients looks like color bands instead of smooth transition). This filter is not that heavy and doesn't have any bad effect on your video (as long as you keep it under 2.0), but make sure to turn it off on 1080p videos, it's too heavy to DeBand 1080p video.
AviSynth
This is what I prefer for video post processing. It gives much more options, and often run faster than the included post-processing filters in ffdshow. To use this open up ffdshow configuration, go to 'AviSynth', then write your AviSynth script here. It's rather difficult to use if you don't know anything about AviSynth, so I don't recommend this for casual user. I might make another guide about this sometimes later.
Post Processing for other decoder
Remember my custom filter chain above? There, I set up my filter so it will only use ffdshow Video for non-H.264 videos, and ffdshow Audio for non-FLAC audio. So, how do I enable post processing for H.264 video and FLAC audio? Simple, we tweak the options in ffdshow so it will accept input from uncompressed video/audio. To do this, open up ffdshow Video decoder settings, go to 'Codecs', scroll to the bottom and set 'Raw Video' to 'all supported'. This way, after CoreAVC decodes the H.264 stream, it will pass it to ffdshow Video decoder to apply the post-processing. Do the same for ffdshow Audio decoder, set 'Raw Audio' to 'all supported'.
Shaders
When using DXVA, you can't use intermediate filter between your video decoder and video renderer. This means you can't use post processing the way I mentioned above. The only way to enable post-processing with DXVA is to use shaders. This has several disadvantages compared to ffdshow post processing, namely:
- Less configurable than ffdshow; unless you know how to write yout own shader.
- Can only be used with VMR7/9 renderless and EVR CP (no big deal, since you will most likely use those for DXVA anyway).
- Shader operations are done in GPU; this means with DXVA, you give a huge load to GPU, depending on the video and shader used. Without DXVA, you have less load in GPU, but you're better off with ffdshow post processing.
Even so, it has one (small) advantage, that is:
+ Able to use some 'strange' effect, such as emboss, wave, etc. Not important if you're watching normally, but might be useful if your laptop is used in a con and you want to show a video with those effects.
To use this, simply set your renderer to VMR7/9 renderless or EVR CP, play a video, pause, right click->'Shaders' then pick your desired shader.
To use more than one shader, select 'Combine Shaders' and use it to combine your desired shaders. Note that the more shader you use, more load will be given to the GPU.
To disable all shaders, simply select 'Shaders Disabled' option.
To be honest I almost never use shaders, so I can't really provide much useful information. If I got the time to test it, I will be sure to update it here.
madVR Settings
Why does this one renderer get a whole section for itself? Because it has the most extensive configuration. madVR is a very high quality video renderer. If you are looking for quality, then this renderer is for you. Though it comes at a price: It's very GPU heavy. Whether to use it or not, decide for yourself. I suggest to use this if you have at least 256MB GPU memory, or 512MB if you intend to use it with hardware acceleration.
Configurations (When playing a video, right click->'Filters'->'madVR Renderer'->'Edit settings'):
Devices: Adjust output settings for different display devices.
Devices->[Display Name]->Identification: I suggest to not touch anything here. (Tbh I also don't understand wtf is this.)
Devices->[Display Name]->Levels: Adjust output color levels. Pick PC levels if you output to PC, or pick TV levels if you output to TV.
Devices->[Display Name]->3DLUT: Use a 3DLUT file for color conversion. This will make madVR a bit longet to load since it will read the 3DLUT file first, but will result in better and faster color conversion. If you know how, you can also make a 3DLUT file specifically calibrated o your display.
Scaling Algorithm: Determines scaling algorithm to use. It is ordered roughly from fastest to slowest.
Scaling Algorithm->Chroma Upscaling: Determines what scaling algorithm to upscale chroma (color). Recommended to use SoftCubic softness: 100. Lower the softness if you find your computer not powerful enough, or further, pick Catmull-Rom, or even Bilinear.
Scaling Algorithm->Luma Upscaling: Determines what scaling algorithm to upscale luma (luminance). Unlike chroma, this one is more preference based. I prefer Bicubic 60, but what you like might differ. Also take note of whether your hardware can handle it or not.
Scaling Algorithm->Luma Downscaling: Determines what scaling algorithm to downscale luma (luminance). Again, this one is preference based. I prefer Bilinear for this, but that's mostly because downscaling usually means the source is very heavy, so I pick the lightest scaler for this.
A rule of the thumb is to resort to Bilinear if you find your hardware not strong enough. Though if you still want better scaler, resort to EVR CP or Haali renderer. Another is that upscaling can usually use slower algorithm than downscaling. You can see the rough difference between different scalers in the graph provided (props to madshi, really a great author).
Rendering: Configures rendering options (well, duh).
Rendering->General Settings->Use managed upload textures (XP only): Enable this if you are on XP.
Rendering->General Settings->Upload frames in render thread: Enable this as well. I read somewhere that in a very low end computer, disabling this will help, though I can't confirm that.
Rendering->General Settings->Enable automatic fullscreen exclusive mode: Like D3D fullscreen option in EVR CP/ VMR9, this one is also used to prevent tearing. 'Show seek bar' is to show a madVR exclusive seek bar so you don't have to switch out of exclusive mode whenever you want to seek. Delay switch to exclusive mode by 3 seconds should be self-explanatory.
Rendering->Windowed mode tweaks: I suggest to refrain from changing anything here.
Rendering->Trade quality for performance: Pretty self explanatory, enable these options if you find your computer not strong enough.
*don't use dither: Disables dithering. Dithering is a process to reduce color banding, by using additional color to simulate another color. Can't explain it very well, try search on wiki.
* use 10 bit chroma processing: The video's color information are processed only in 10 bit instead of 16bit. This might introduce more banding than using 16bit processing, although chroma bandings are usually less noticeable.
* use 10 bit luma processing: The video's luminance information are processed only in 10 bit instead of 16 bit. Least recommended to option to enable, since luma banding are much more noticeable than chroma banding. Note that 10 bit processing is still higher than standard renderers' 8 bit processing.
If you feel the need to use these options, then try them one by one from the topmost.
Output Levels
This is actually quite simple, but I feel the need to elaborate further so people can get the correct output level.
Basically this is the range at which color will be presented. Full range is 0-255, usually PCs can display this no problem, but TV usually can only display 16-235. Since most of video files are meant to be played in a standalone player connected to TV, sources will almost always have TV range. To properly display on PC monitor, we need to do levels conversion, from 16-235 to 0-255 (Photoshop users should understand what this is).
Problem is, in a filter chain, the option to do this conversion can sometimes be found in more than one filter. Take an example, if you use CoreAVC to decode, use ffdshow for post processing, and use Haali renderer, you have 3 filters that can do this conversion. Enabling conversion on all 3 will result in shitty color. You must only enable this conversion once. I prefer to do this in the renderer setting, though some renderer do not have this setting. On the other filter, you must set input and output as TV range.
How to enable color conversion on different renderers:
VMR7 renderless: No option for this. Use ffdshow to convert the output levels
VMR9 renderless: No option, but will always output at PC levels. If you want to output at TV levels, use ffdshow.
EVR: Again, no option. Will always output at PC levels. Use ffdshow to output TV levels
EVR CP: While playing, right click->'Renderer option'->'Output Range' then pick what you want.
Haali Renderer: Explained in the Haali renderer section.
madVR: Explained in the madVR section.
This is why I wrote to set Output levels in CoreAVC as TV levels.
How to use ffdshow to output PC levels
Note that this will NOT work with madVR, since madVR requires YV12 input, and this step involves doing colorspace conversion to RGB.
- Go to ffdshow video settings window.
- Go to 'Output'.
- In hte supported output colospaces, untick every Planar YUV, Packed YUV, and RGB except for RGB32.
- You may want to untick 'High quality YV12 to RGB conversion' if your PC's CPU is not strong enough.
- Go to RGB conversion, in the 'Output levels', pick between Computer or TV.
Since the feed to the renderer is RGB, renderer don't have to do any RGB conversion anymore, thus bypassing the levels conversion as well. Downside is, this method is heavier on the CPU. Though GPU load will be lessened. So pick between using renderer or CPU to do color conversion depending on your hardware
ReClock
This is very useful filter, that I'm wondering why didn't I use this sooner? Anyway, I just recently got this, and I'm still tweaking stuff, but basically, ReClock's main purpose is to eliminate jitter/judder/jerky playback caused by different frame rate of video and video card's refresh rate. I must say, I haven't fully understood the theory behind that, but it does show noticeable improvement in playback smoothness, by sppeding up 23.976fps to 24fps, and 29.97fps to 30fps. Of course, playback becomes 1% faster, but I can't think there's anyone who will notice it.
It also allows WASAPI exclusive mode, which is a mode to bypass Direct Sound. What this means is, it will bypass any settings and enhancements done in your sound driver settings, and output exact uncompressed stream directly.
There's also an option for bitstreaming, though to be honest, I don't understand the concept behind this at all. I think it also requires expensive sound card to work properly, or ATI 5*** GPU.
So yeah, I don't know about this little thing all that much, but I do use it to eliminate jitter and WASAPI exclusive.
How to use:
Install ReClock, then open up it's Configuration (it should be in the Start Menu).
I won't go into the audio since I myself is confused wtf I just did (thankfully it works), so I'll just get into the part for adjusting frame rate.
Set your configuration windows like these screenshots:
Open up MPC-HC, press 'O', go to 'Output', then select ReClock Audio Renderer as your audio renderer. There, you're set to go.
Anyway, if anyone understands this matter more, please do leave a comment so I can fix and add stuffs too.
Recommendation
To get the maximum performance at a highest possible quality for your hardware, there are some tips that I can suggest.
- If you have at least 2.4GHz Core2Duo CPU, you can safely use CoreAVC(without CUDA) with DirectVobSub to play 1080p @ 10mbps bitrate files without noticeable lag. This is assuming that the encoder is actually reasonable enough not to put fancy karaoke. I tested using THORA's 1080p Eden of the East OP and 1080p Casshern Sins OP, both work without any noticeable lag at all. Notice that this is only for the CPU part, it's possible that it still lags, which may be caused by GPU lag, not CPU lag.
- If you have at least 256MB GPU memory and supports Pixel Shader 2, you can try out madVR. Tweak out the upscaling/downscaling settings so it will run well without lag. My setting: chroma upscaling = Softcubic 80, luma upscaling = Bicubic 60, luma downscaling = Bilinear. It may still lag though, for which I suggest to use the 'trade quality for performance' option, or just swtich to another renderer.
- If you get lag, determine whether it's CPU lag or GPU lag. Easiest way is to switch you renderer to Overlay Mixer, which will almost never cause GPU lag. If it still lags, most likely it's CPU that's causing it. If it doesn't, then most likely it's the renderer that causes the lag.
- In the case of CPU lag, try to use DXVA or CUDA if possible. This will actually increase GPU load, in which case you should tweak the renderer's settings if it still lags (which I doubt will happen anyway, since most DXVA/CUDA capable GPUs should be quite decent). Most important is to tweak the resizer option. CUDA is recommended, but DXVA should only be used as a last resort, since DXVA tend to be rather glitchy sometimes.
- If you can't use DXVA nor CUDA and you get CPU lag, I can only suggest you use either CoreAVC or ffdshow-mt, and use MPC's internal subtitle filter (either by using Haali renderer, EVR CP, or VMR renderless). This way, subtitle processing will be done in GPU, thus reducing CPU load.
- If you got GPU lag, use a lighter renderer, and/or disable internal MPC subtitle (use VSFilter instead). Personally, the only time I've ever experienced GPU lag is when using madVR, but I do have a decent graphics card.
- If all else fails, then try to clean up your system. Still fails, then either get a lower bitrate/resolution release, or get a new PC. That means your PC is just too old or you're using a crappy netbook.
Conclusion
I think that's it for now. I might make more updates as I research more, remember some stuffs I forgot to include, or got information that I wrote something wrong here. Feedback is greatly appreciated. Thanks for reading! (If you read this anyway).
Credits
* Doom9 forums. 70% of the information here comes from there.
* imouto.my, a site that includes a lot of explanations about DXVA and CUDA.
* EADFAGLOLZ (yeah, that's the name), a guide hosted at animemusicvideos.org with lots of theories and other things.
* My own experiments.
* Google.
* Reader.
Posted by
RedSuisei
| Dec 8, 2010 9:43 PM |
Add a comment