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?
First of all we need to understand what causes the problem
Frames per second - Refresh rate mismatch:
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.
Audio / Video clock drifting
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.
Let me introduce you to the concept of smooth video playback:
Adjust the refresh rate of the display
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.
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:
- Microsoft DTV DVD Audio codec
The Microsoft DTV DVD Audio codec will not send the audio to any other renderer except the Mircrosoft DirectSound Renderer. This is not a technical limitation, but a license restriction from Dolby Labs. This means that you cannot use the Microsoft DTV DVD Audio codec together with the MP Audio Renderer (http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx). But there are plenty of alternatives.
- bit streaming: input
Since the MediaPortal Audio Renderer must adjust the reference clock, the audio itself has to be processed. However, it is impossible to process an encoded audio stream. That's why the audio data must be decoded before it can be processed. This must be done by the audio codec. If you use the MPC-MPA codec, then you have to go to the codec configuration inside MediaPortal and set it to "decode to speakers" for DTS and DolbyDigital. For ffdshow audio decoder the same can be done by disabling all passthru related options in output settings.
- Multichannel support for SPDIF
The MediaPortal Audio Renderer is able to encode the audio again to AC3, so you can output the processed audio through SPDIF to your receiver as a Dolby Digital
This page has no comments.