We all know the situation - no matter if you use a HTPC or not, movies and TV shows are only enjoyable if the video playback is nice and smooth.
Nothing is more annoying than having your favorite actor (or actress) 'stuttering' on the screen because several frames are dropped or repeated to keep the video and audio in sync.
Smooth video playback is one of the key requirements of all movie enthusiasts; but even if you have the right hardware, it is still a big challenge to achieve it.
So, our developers set out to create a solution for MediaPortal. It is called the "MediaPortal Audio Renderer".
But wait a minute. We are talking about smooth video playback here, so how is an audio renderer supposed to help?
One of the most common reasons of jittery video playback is that the refresh rate of display is different from the frame rate of the video being played. Sounds complex, but it is very simple. Assume that your display is running at 60Hz. This means that in one second, the display will rebuild the image you see 60 times.
So if you play a video which has 60 frames per second, then this means that your playback will be smooth since the display running at 60 Hz has 60 frames available to paint in one second.
So far so good. But here is the catch. Videos do not use 60 frames per second! Videos are actually created with 23.976, 24, 25, 29.97, 30 and 50 frames per second.
When you play a video where the fps is different than the refresh rate of the display, some frames can not be painted by the display and so they get dropped. This is required to keep the audio and the video in sync.
Imagine watching a video where a car drives from the left to the right side of the display. Now remove four frames of that video - the car suddenly makes a jump! This is the jitter we want to eliminate.
One of the basic issues with almost every PC is that audio and video clocks are based on different hardware crystals (time sources in hardware). Normally this can be overcome only by either dropping or inserting silence into the audio stream. However, inserting silence causes pops & clicks in the audio stream, while dropping or repeating video frames results in the playback issues you want to avoid.
The first step is to adjust the refresh rate of your display to match the frames per second of the video as closely as possible.
MediaPortal includes a feature called Dynamic Refresh Rate. What this feature does is change the refresh rate of the display to the closest match of the video playing.
So if a video with 23.976 frames per second is playing, then the Dynamic Refresh Rate switcher will change the refresh rate to 23.976 Hz (if the display does not support this refresh rate, you can configure the Switcher to change the refresh rate to the closest match the device supports).
The closer the gap between frames per second of the video and the refresh rate of the device, the easier it is to compensate the mismatch for the MediaPortal Audio Renderer.
A. Solve the refresh rate - frames per second mismatch
The MediaPortal Audio Renderer is able to increase or decrease the playback speed of the video to make the videos FPS match the display refresh rate or its whole number multiplier.
B. Solve Audio / Video clock drifting
The MediaPortal Audio renderer adjusts the reference clock a bit and resamples the audio to match the result.
C. DTS and DolbyDigital audio formats: