Maximum PC

MASTER HANDBRAKE

- –nick peers

Make your videos silky smooth everywhere

You’ll need this

Plex Media Server Get this from www.plex.tv if you’re

building your first media server.

Handbrake

Head to https://handbrake.fr to download your copy.

The bane of any media

server’s life is the need to transcode. Imagine this: You’ve converted your movies to one format already, only for your media server to waste precious CPU cycles converting it to a format that can be played back on your target device. Sometimes this process is inevitable—you want to watch a 1080p HD movie on an older 720p screen, for example—but in most cases, you should be looking to minimize the need to transcode. You’ll not only reduce the load on your server (allowing it to serve multiple streams simultaneo­usly without breaking a sweat), but often you’ll make things easier for your playback devices, too.

But how do you go about avoiding the need to transcode unnecessar­ily? First, you need to prepare your media so it’s in the most universal format possible. We’ll show you the settings you need to convert great video that will play on the widest possible devices natively. We’ll also reveal how to optimize your server and playback devices to avoid unnecessar­y transcodin­g, too. Our media server of choice is Plex, but the techniques and tips below can be translated to cover your own specific media server.

1 Tools of the trade

When it comes to converting or ripping your media in a universal format, there’s no better tool than Handbrake, the brilliant open-source transcoder for Windows, Mac, and Linux. If you plan to rip from DVD, you can do so directly from within the program once you’ve installed a library called “libdvdcss.”

>> Windows users need to download this file: http://download. videolan. org/ pub/ libdvdcss/ 1.2.11/ win64/ libdvdcss-2. dll (substitute “win32” for “win64” in the URL if you’re running the 32-bit version of Handbrake). Save it to your “Downloads” folder, then copy it to “C:\Program Files\Handbrake” [ Image A]— you need administra­tor access to do this, which is why you can’t download directly to the “Program Files” folder. Job done.

>> Linux users should visit www.videolan.org/developers/

libdvdcss.html for instructio­ns on obtaining the latest version. MacOS users should open a Terminal window and issue the following three commands, following the prompts to install Xcode and Homebrew: $ xcode-select --install

$ ruby -e “$(curl -fsSL https://raw.githubuser­content.com/ Homebrew/install/master/install)” (If you get any errors about folder ownership, run the recommende­d command, then repeat the “ruby” command.)

$ brew install libdvdcss

2 Pick a universal standard

This is the most important step of the entire process: picking the file format that will play natively on as wide a range of devices as possible. Remember, video files comprise three elements: separate video and audio codecs for handling the movie’s video and audio streams, plus a container to wrap them up in. Check your media server’s support pages to see whether they offer any advice (Plex users can get detailed guidance at https://support.plex.tv/

articles/203810286, for example).

>> In most cases, however, the following options represent the closest thing there is to a universal standard: Choose MP4 for your file format (or container), using H.264 for SD/HD video, and AAC for the audio stream. If you’re producing 4K content, substitute H.264 with HEVC/H.265 for the video codec.

>> Plex lists several additional requiremen­ts: H.264 codecs are available in multiple versions or profiles, known as “Levels.” The higher the number, the higher the supported video bit and frame rates. Plex recommends no higher than Level 4.0, which is the minimum required to support full HD. Handbrake defaults to version 4.1 for HD, and 3.1 for SD. The difference between 4.0 and 4.1 is basically one of maximum bitrates—4.1 supports 50–200Mbit/s compared to 4.0’s 20–80Mbit/s. For

streaming purposes, 4.0 is more than enough, but if—like us— you’ve been happily ripping away at 4.1, all may not be lost, as we’ll reveal later.

3 Set up Handbrake presets

When you come to rip or convert video in Handbrake, you’re confronted by a bewilderin­g array of choices spread across multiple tabs. Some settings are important for compatibil­ity purposes, while others affect the quality of the video and audio stream, plus allow you to incorporat­e subtitles and named chapters. While the compatibil­ity settings remain consistent across your video streams, you may want to apply different quality settings depending on the type of media being converted (for example, TV episodes versus movies).

>> Rather than manually setting these up each time you convert a different type of video, Handbrake enables you to store customized settings in the form of presets. Configure your settings—when it comes to audio and subtitle settings, make sure you configure these via the “Selection Behavior” button to ensure they’re stored with the preset [ Image B]— and then choose “Save New Preset” to give them a suitable name. Be sure to select “Custom” under “Dimensions” if you’ve configured a specific size (such as reducing 1080p HD streams to 720p to save disk space) before clicking “Add.”

>> How many presets you need is obviously up to you—for example, you may have different settings for NTSC and PAL DVD rips, or a range of UltraHD (4K) and HD settings, depending on specific movie genres (say action versus animation), or movie versus television.

4 Build your first universal preset

Open Handbrake and choose to open a disc, folder, or file. Use the “Title” drop-down to select the video you wish to convert, then it’s time to work your way through the various tabs of options.

>> Start with “Summary.” Make sure “MP4” is selected as the format, and check both “Web Optimized” and “Align A/ V Start.” On the “Dimensions” tab, leave the “Width” and “Height” boxes alone, unless resizing video as outlined above. Set “Anamorphic” to “Automatic” and “Modulus” to “2,” while leaving “Cropping” to “Automatic.”

>> The “Filters” tab is where you can correct problems with the original source material. The “Detelecine” and “Deinterlac­e and Decomb” filters deal with interlacin­g problems that are visible as “combing” effects. These are clearly visible in older broadcast material that’s converted to DVD, and should be visible in the preview on the “Summary” tab. If you need it, set “Detelecine” and “Interlace Detection” to “Default,” and “Deinterlac­e” to “Decomb” (default preset) to cover most bases [ ImageC ].

>> The other three primary filters—”Deblock,” “Denoise,” and “Sharpen”—should normally be left disabled, applied in extreme situations only. “Deblock” is a last-resort option for when the original video is so blocky it’s unwatchabl­e. Experiment with pushing the slider up one notch at a time, choosing the best trade-off between removing the artifacts and removing too much detail to leave the image “soft.”

>> “Denoise” works to reduce grain or blur. Choose the “NLMeans” filter—it’s slower than the other filter, but more effective. The “Sharpen” filter does what you’d expect, but the same rule applies to both filters: The stronger the settings, the greater the side effects. Start as low as possible (“Ultralight” or “Light”) and click “Preview > Live Preview” to encode a 45-second segment of your movie to see the effects of your tweak.

5 Ensure maxim um comp ati bilit y

The “Video” tab is a key part of making sure your media adheres to Plex’s direct-play recommenda­tions. Choose “H.264 (x264)” or “H.265 (x265)” depending on your source material. Ensure “Framerate (FPS)” is set to “Same as source” and that

“Constant Framerate” is selected. This should ensure your video stays within Plex’s recommende­d 30fps and 8-bit video depth setting. In terms of quality, this has no bearing on Plex’s ability to direct-play the video, but a rule of thumb is to choose “Constant Quality” and then experiment around 20–23, with a larger figure reducing the file size at the expense of quality. Again, consider experiment­ing with a 45-second preview clip to strike the right balance.

>> The “Encoder Options” section is again largely about quality rather than compatibil­ity, although remember that all-important “Level” setting (maximum 4.0 for HD; 3.1 for SD) [ Image D].

We also recommend checking “Fast Decode” here to improve playback on lower-powered devices.

>> When it comes to the “Audio” tab, the key option here is choosing “AAC” as your codec. From here, Plex seems happy to direct-play multi-channel (up to 7.1 in our tests) audio streams, although support for multiple audio streams enables you to provide a fallback basic stereo option—select the audio stream before playback on your target device by clicking or tapping “Audio” next to the currently selected stream. Other audio options are a matter of personal preference—we stray toward a bitrate of 160 for simple TV stereo channels, going up to 448 for surround-sound movie setups.

>> When it comes to adding subtitles, one setting often applied is the foreign audio scan—this ensures that subtitles are provided when non-English languages are spoken. If you have need of this feature, now is the perfect time to “burn” them into the video feed, so they’re part of the native video stream (thus reducing the need to transcode to include them later). Choose “Foreign Audio Scan” from the drop-down menu, and check both “Forced Only” and “Burn in.”

>> Review your settings one last time, then save your preset if necessary, before adding the title to the queue or starting the conversion process. Once complete, open the file in your media player to check it plays, looks, and sounds correct.

6 Tweak player settings

You’ve diligently created a media library with the above universal settings, but some streams still refuse to direct-play on certain devices. There’s not an awful lot you can do at the server level to force directplay—you need to take the time to go into each player’s settings and attempt to influence things from there.

>> If you’re accessing Plex on your browser or through the Windows or Mac app, click the “Settings” button followed by “Show Advanced.” Navigate to “Debug” under “Plex” in the left-hand pane to ensure both “Direct Play” and “Direct Stream” are checked. Switch to “Quality” to verify “Use recommende­d settings” is checked under “Home Streaming.” To minimize transcodin­g over the Internet, check “Play smaller videos at original quality” and set “Video quality” to “Maximum.”

>> It’s a similar situation for mobile use: Android, iOS, and Apple TV users should navigate first to “Settings > Quality” to set similar streaming settings to above, while heading on to “Settings > Advanced” to make sure “Allow Direct Play” has been enabled. Android users should also tap “Settings > Advanced > Player” to view the “H264 Maximum Level.” Remember, the app should direct-play all content encoded with all versions up to and including the maximum level specified.

>> If you attempt to set the maximum level to a higher setting on your device, you’ll get a warning that it may cause issues—but don’t let that stop you. On our Android phone, the recommende­d setting was 4.0, but we were able to bump it up to 4.1, at which point a 1080p movie

ripped with the H.264 Level set to 4.1 direct-played perfectly instead of transcodin­g (poorly). At the same time, the server’s CPU load dropped from 60 percent to 5 percent.

>> Most smart TVs—plus Plex for Roku and also the Plex add-in for Kodi (which we use on a Raspberry Pi 3 running LibreElec)— share a similar web-wrapped user interface, so the following settings should be broadly similar across all devices. Click your user account name at the top of the screen and choose “Settings > Video tab.” Set “Local, Remote, and Online” to “Original” and verify “Allow Direct Play” and “Allow Direct Stream” are both checked. If supported, you’ll find the “Maximum H.264 Level” setting here, too.

>> If you’re serving 4K content, you should also find “Allow 4K” and “Allow HEVC (h265)” options on compatible devices. If you’re confident your playback device can handle it, check both of these, too, to avoid transcodin­g.

7

Create optimi zed versions

Sometimes transcodin­g appears to be inevitable—for example, trying to play a 1080p movie on a 720p screen. Plex users can pre-empt these problems by having the server pre-transcode content based on your chosen settings, which is then served to those devices that can’t direct-play the original file.

>> To set this up, open the Plex app or web interface and navigate to the content you want to serve. Select one or more items using the check box at the upper-left of the episode or movie title, then click the “…” button and choose “Optimize.” You’ll see a drop-down currently set to “Optimized for Mobile”—click this and choose “Custom.” Use the middle drop-down to select the target device type, then use the right-hand menu to choose a bitrate and resolution that you’re confident will directplay on your target device [ Image E]. Give your preset an easily identifiab­le name, leave these converted files in the same folder as the originals, and click “Optimize.”

>> You can follow the progress of the optimizati­on— how long it takes depends on the power of your server. Once done, your player should detect the optimized version and attempt to play it directly. You can manage these optimized versions via “Settings > Optimized Versions” (look under “Manage”)—delete them all to free up space, or select one to perform additional actions, including editing the optimizati­on further.

 ??  ??
 ??  ??
 ??  ??
 ??  ??
 ??  ?? D
D
 ??  ??

Newspapers in English

Newspapers from United States