APC Australia

PERFECT VIDEO PLAYBACK

Neil Mohr takes you on a tour of video codecs for the ultimate theater-quality experience.

-

Your total guide to playing any media file perfectly, with pro-tips for HDR, subtitles, and more.

Why is playing video so complicate­d? Why does it play smoothly in one program, but not another? Why can you play it on this system, but not that one? Why does it stream OK, but not play locally? How can the video play, but not sound? How do you get subtitles to display? Why is the audio only in stereo, not surround? How come the colors are drab? All those questions have come from the mouths of people who had the audacity to try to play video on their PC. Before you throw your PC out the

window, we’re offering you a masterclas­s in video playback. We’ll explain the complexiti­es of the Windows video pipeline (you’ll see why things can become so difficult to diagnose), and discuss what software you need to get the best playback without the hassle, along with how to install and tweak it to perfection. Along the way, we’ll see what hardware accelerati­on you can use, discuss the madness of the codec world, ensure sound isn’t neglected, and cover 4K and HDR content, too.

You could very easily argue that local video playback has become redundant anyway, because streaming services have pushed content online, and that’s where most people consume their entertainm­ent. We’re not going to argue with that, but if you still want to retain ownership of your paid-for movies and video, the only true way to do so is to have a local copy, otherwise you’re really only borrowing it from a copyright holder under the guise of a license. We don’t want to get bogged down in the philosophy of it all, so instead we’re going to get bogged down in codecs – this should be fun....

There’s no such thing as a video player. Anything you think is a video player is actually just an elaborate black box, which happens to pull together a host of functions and features to make a moving image appear on your screen and audio pour out your speakers – all at the same time, incredibly, and in sync, down to the millisecon­d.

To understand how that black box works, we’ll kick things off by taking a look at what goes into the video pipeline, from source to target. This will help us understand how the various elements plug together to decode, manipulate, and output our video and audio. We can then drill down into the individual blocks of the pipeline, and explain how to get the best from each part, and what’s really needed.

The language used tends to be flexible. Microsoft DirectShow is the Windows system used to manage the flow of video data, and it refers to codecs as filters—largely because “codec” is a redundant term, as it means “(en)COderDECod­er,” and in this context, they’re largely just decoder filters. We’ll cover different terms as we come across them. Alongside that, read the “Just Get This…” box, and grab the suggested codec pack, plus Media Player Classic (MPC) from https:// mpc-hc.org, to ensure we’re all using the same software whenever we talk about settings and so on.

At the start is the source. That’s usually a single video file, but even this is complicate­d. When dealing with a player such as MPC, you can specify separate video, audio, and subtitle files, and it combines them into a cohesive output. Video and audio tracks in MPC are loaded via “File > Open File,” with subtitles loaded via “File > Subtitles,” though subtitles contained within a file are controlled via the Demux and Subtitle filter, which we’ll come to.

These days, a single video file is actually a container file format. Famously, there’s AVI, MP4, and MKV. Ideally, a container format should offer a flexible way for a single file to contain multiple video, audio, and subtitle tracks. This largely explains the rise in popularity of MKV; it’s open source, and supports almost all the features you could want, over and above AVI and MP4.

Before we can do anything with the container file, we need a filter that can split the various parts into separate streams. This is called demultiple­xing, or the Demux stage – a more layman’s term is a splitter. If you’re following our advice in the “Just Get This” box, it’s the LAV Splitter – other splitters exist, such as the Haali Media Splitter. Settings (via the LAV Splitter preference­s) can largely be set to default here, unless you happen not to be an English speaker, in which case you need to specify your preferred language for any audio and subtitles, so they can be picked up automatica­lly if available.

SUBTITLES

We’re going to tackle the subtitle stream first, as it’s quite straightfo­rward. Subtitles can be internal ones or external ones you’ve downloaded – for the latter, these are just text files with timestamps and translated lines. And, yes, you can create your own comedy ones if you like. K-Lite uses the long-standing DirectVobS­ub filter, which offers placement, typeface, aspect ratio, and loading controls. It looks for suitably named subtitle files in the same folder as the video file, in a “\subtitle” folder alongside the video file, or in a “c:\ subtitles” folder. The file needs to be named exactly the same as the original video file, minus any extension, such as

“Typically, the display doesn’t realise it’s being fed HDR, but the PC can be equally clueless. ”

.mkv or .mp4. If you have issues with your vision, the placement and size settings can be very useful. For internal subtitles, use the MPC settings. Choose the required subtitles from “Play > Subtitles track.” It has very similar controls under “View > Options > Subtitles settings.”

SOUND

Getting the correct surround sound from a Windows system to an external amp or device can be frustratin­g. This is largely down to the number of non-obvious drivers, different settings at each stage, physical outputs, and compatibil­ity issues with DRM and modern digital audio formats.

The first step is to check Windows is outputting audio to the correct device. Right-click the notificati­on “Speaker” icon, and select “Playback devices.” Windows lists all the audio devices it thinks it can send audio to. Built-in audio typically offers separate analog and digital output. Suitable HDMI digital devices are also listed, while there may be additional devices with audio output, too. If there’s no sound to be heard, it’s likely the wrong device is selected here. You can also configure the basic setup, and tell Windows whether this is a stereo or surround system. However, systems running Realtek audio might have the company’s proprietar­y preference

system, where all this can be configured, too.

We’re behind the times with audio, so we’re still running a 5.1 surround system using stereo analog jacks – that’s a jack per speaker pair, and one to handle both the sub and center speakers. The main reason is it forces decoding of any digital audio to the discrete surround channels. Otherwise, you need to pipe the raw digital signal down whatever digital connection you’re using. The problem is, if your amp doesn’t support that digital signal, you hear nothing, or the output device could fall back to stereo PCM audio, which won’t make anyone happy.

As part of the K-Lite pack, LAV Audio is the main filter control for your audio. We’ll look at using a digital audio device – think HDMI-connected device like a TV, or an AV amp via HDMI or optical – otherwise it’s an analog connection. For digital movies, you’ll want to enable bit-streaming – as long as your external device supports those formats – so the digital audio is streamed unmolested.

For analog targets, things aren’t much more complex, but you’ll want to specify the correct surround setup within the LAV Audio “Mixer” tab. Additional­ly, MPC has extended audio controls, if you need them, under “View > Options > Internal Filters > Audio Switcher.” Normalisat­ion helps boost quiet dialog; there’s also a custom channel mixer, so you can specify what channel goes to which speaker. When it comes to playing video, if there are multiple audio tracks – such as director’s commentary, English audio, or descriptio­n audio – select alternativ­es using “Play > Audio track.”

“For digital movies, you’ll want to enable bit-streaming – as long as your external device supports those formats – so the digital audio is streamed unmolested. ”

VIDEO

Subtitles are reading right, audio sounds super, now we can turn to the video. LAV Video is the decode filter that delivers support for all the major formats, along with hardware accelerati­on support for Intel Quick Sync, Nvidia CUVID, and DXVA2 native/copy-back. If you don’t have a GPU, Intel Quick Sync is better than nothing, but it can cause quality issues on older processors; Nvidia CUVID is somewhat outdated; while DXVA2 is the favored option.

DXVA2 copy-back mode can enable higher quality video than native, as more filters can be applied, but it can increase the GPU load by three times. Native mode is faster, as the video data never leaves the GPU memory. You’ll find the LAV Video settings tool in the K-Lite folder. Outside of hardware accelerati­on, you don’t need to adjust anything, though we’d set “RGB Output Levels” to “PC (0 to 255),” otherwise you’ll get pointless color space conversion­s.

We’ve largely been ignoring the need for a player, until now, but as we’ve come to actually playing video, it’s worth hauling MPC into view. The open-source Media Player Classic has been the first choice of video player for years, but unfortunat­ely, the 2017 release was the final one of the original maintainer. Thankfully, it seems some of the developers on http://forum. doom9.org are maintainin­g it with bug fixes.

MPC has loads of settings, but for video playback, we want “Options > Playback > Output” – the DirectShow Video pull-down enables you to select a renderer. The Enhanced Video Renderer (custom presenter) would do, but we’re here to cover 4K HDR

playback, which throws up issues that standard PC players can’t handle. The current solution is to use a renderer called MadVR, selected from here, but it has its own setting tool in the K-Lite folder.

HDR HEADACHES

What’s the issue with HDR, then? If you’re viewing HDR content from a PC, there can easily be a breakdown of communicat­ion between the display and the PC, even with an HDR setup. Typically, it’s the display not realising it’s being fed an HDR signal, but the PC can be equally clueless about having an HDR-capable display attached. The solution is to process the HDR video file as it’s being displayed to a standard color range. This isn’t a simple process – every frame has to be processed, and when you’re dealing with a 4K resolution, that requires some serious CPU/GPU grunt, which is exactly what MadVR delivers, along with a bunch of other abilities.

MadVR’s full name is Madshi Video Renderer, and it’s registered as a DirectShow Renderer Filter. As mentioned, you select it within MPC and other compatible players as the renderer. You’ll find a MadVR setting tool within the K-Lite app folder, and when a video is playing, a control icon appears in the notificati­on area, with shortcuts to the settings.

The short answer on how to get correct HDR playback using MadVR is to pop into “Settings > Devices > [your display] > Identifica­tion.” Select the correct device type – it’ll get a pretty icon as a reward. “Properties” are probably correct, unless you have a display with 10-bit color depth; “RGB levels” should be 0 to 255, as always. Jump to “HDR,” as the rest should be fine with defaults. You can stick with “Let MadVR decide,” and it’ll do its best to try to detect what your GPU and display are capable of. But if colors are really muted, you need to manually select the correct mode. If you have an HDR-capable display and GPU, selecting “Passthroug­h HDR content to the display” is your best choice, because it allows the display to do the processing, and is your only option for Dolby Vision content.

 ??  ??
 ??  ?? Compare the output of HDR content with and without processing.
Compare the output of HDR content with and without processing.
 ??  ?? Custom Comic Sans subtitles is what the world was crying out for.
Custom Comic Sans subtitles is what the world was crying out for.
 ??  ?? Mad, you say? The number of options for settings is completely crazy.
Mad, you say? The number of options for settings is completely crazy.
 ??  ?? You need to select the MadVR renderer from within MPC.
You need to select the MadVR renderer from within MPC.
 ??  ?? The main video filter controls add a little hardware accelerati­on here.
The main video filter controls add a little hardware accelerati­on here.
 ??  ?? Ensure you get decent sound levels and the correct channel mixing.
Ensure you get decent sound levels and the correct channel mixing.

Newspapers in English

Newspapers from Australia