Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
The Perfect Play
When playing video, a "reference clock" is used to make sure video syncs up with audio. This reference clock is usually derived from your audio card and typically runs at a slightly different speed to your system clock. Your display also has a "clock" of its own - i.e. the refresh rate. If that's not complicated enough, you also have your video frame rate. To get the perfect playback, you need to make all these "clocks" work harmoniously.
Most avid HTPC users would have heard of ReClock. It was an attempt to solve the clock problem by changing the reference clock during playback. While it worked in most cases, there was a lot of problems. For starters, there's no 64-bit version and SlySoft have no plans to make one. It also doesn't use the actual display refresh rate detected by the video renderer when correcting the mismatch. More importantly, it simply doesn't work with MPDN given the fact that MPDN runs the audio and video graphs separately.
Rate Tuner aims to give MPDN users the main benefits of ReClock without any of these problems.
Rate Tuner vs Fluid Motion
While Fluid Motion serves the same purpose (to remove stutter caused by rate mismatch), it is not as "pure" as running the video at your display's native refresh rate. How is it not "pure" is beyond the purpose of this article but one important feature you'd be missing out on would be the frame rate conversion (FRC) feature of your TV. Samsung call it Clear Motion Rate (CMR), Sony call it MotionFlow, LG call it TruMotion...
As such, Fluid Motion should only be used as a last resort if you want the perfect HTPC experience.
How to Use Rate Tuner
The general steps are as follows (you should really try to understand this before going to the specific use-cases / examples).
- Set your display refresh rate to as close as possible to your video frame rate
- Make sure Rate Tuner is not activated
- Play your video for 5 minutes
- By playing the video continuously for 5 minutes (i.e. don't pause, seek or stop it), you allow MPDN to collect enough data to give you meaningful values in your rate calculator, which you will use next
- Open the Rate Tuner calculator
- Click "Copy" and close the calculator
- Under "Video Type", enter the video type to match for this clock adjustment
- Paste the copied adjustment value in the "Speed %" column
- Activate Rate Tuner and reopen the video (or hit stop and play).
You can add adjustments for more video types by simply adding another row.
Example: 23.976 FPS Video on a 24Hz Display
Since this has been the most asked use case in the forum, we will start with it.
- Set your display refresh rate to 24Hz
- Run your 23.976 FPS video for 5 minutes (make sure you don't seek / pause -- just let it run continuously)
- Once you have let it run for 5 minutes, open the calculator with the video still running
- At this point, the calculator will give you very accurate values which will make your 23.976 FPS input run at exactly at your display refresh rate
- Copy the result and paste it into the "Speed %" column
- Enter "p23" (without quotes) as the "Video Type"
If your video has a frame rate of 24.000 FPS, you'll need to enter "p24" as the video type instead. "p23" matches anything from 23.000 to 23.999 FPS while "p24" matches anything from 24.000 to 24.999. Similarly, "p25" matches anything from 25.000 to 25.999 and so on.
Now that you have your video frame rate perfectly in-sync with your display refresh rate, you can now enable your TV's FRC feature. With absolutely no repeated / dropped frames, your TV's FRC feature won't interpolate the wrong frames - in other words, the FRC feature will work in its most ideal condition.
Example: 23.976 FPS Video on a 25Hz Display
If you have a display capable of 25Hz but not 24Hz, you can still use the same steps as above to run your 23.976 FPS video as 25 FPS so you don't get any dropped / repeated frames. This is exactly what PAL conversion does. Most TVs don't support 25Hz but can do 50Hz. In which case, all you have to do is manually divide your Display Rate value by 2 in the calculator. This will give you 25 FPS on a 50Hz display - i.e. each frame will be "shown" exactly twice, giving you the impression that your display is running at 25Hz.
What this means is, you can disable fluid motion and still have perfectly fluid video playback.
Example: 23.976 FPS Video on a 60Hz Display
There's not much you can do about a display that can only do 60Hz. In this situation, you'd have to resort to using Fluid Motion. However, most 60Hz can be "overclocked". If you can get it to run as high as 72Hz, you'll end up with a refresh rate that is 3 times of 24Hz (i.e. each frame will be "shown" exactly 3 times). Remember to divide your display refresh rate in the calculator by 3.
What if your monitor won't go that high? Personally I have an older LCD monitor that would only go as high as 68.5Hz. That is still perfectly fine. Simply divide the display refresh rate by 3 in the calculator just as above. You'll end up with the video running at 22.833 FPS, which is around 5% slower than a normal playback. This coincidentally is the opposite of what a PAL conversion does.
Example: 50 FPS Video on a 50Hz Display
If you think playing back 50 FPS materials on a 50Hz display wouldn't need the rate tuner at all, you are sorely mistaken. What you will find is your display refresh rate will probably not be exactly 50.00000000Hz. So over a length of time, frame repeat/drop will occur which is exactly what Rate Tuner aims to eradicate. To match all 50 FPS materials, enter "p50" (without quotes) under the "Video Type" column.
Example: 60 FPS Video on a 60Hz Display
Most of you probably know that some displays / Windows / drivers always sets its refresh rate at 59.95Hz even when you've explicitly asked it to run at 60Hz. If you try to play 60 FPS materials on 59.95Hz, you'll get a dropped frame every ~3 seconds. In this situation, Rate Tuner comes in extremely handy - simply use it to play the video at 59.95Hz and Bob's your uncle!
Bitstreaming is not supported since there's no audio clock per se (the source clock comes from your AV receiver and cannot be adjusted). However, LPCM via HDMI will work just fine. Using MPC Audio Renderer with WASAPI exclusive mode output where your audio card's sample rate can be set directly, no pitch shift will occur. If you use the DirectSound audio renderer, the audio pitch will be shifted. Whether this is discernible is up to you but if PAL speedup is an acceptable practise (and has been for a very long time), then you should have no problem with the same slight shift in pitch.