Optimal Handbrake for Plex Settings (2019)

Although I’m a purest and normally go for the highest quality media storage possible (storing about 300 movies via MakeMKV without any re-encoding or recompression). I’m consuming disk space at an alarming rate. I have nearly 1000 movies stored on my 4 Disk QX2 (RAID-5). On some movies that are less critical I’m interested in running them through Handbrake. However, the number of HB settings are staggering and I feel like I’m painting myself into a corner. That is a bad HB setting will be baked in and will affect the media for life. It’s a lot of work to RIP these movies and capture all of the extras so I don’t ever want to too this again. Can you recommend HB settings for Blu Ray and DVD sources that does not require a NASA scientist?

Thanks,

Rob

1 Like

What are your goals?

You could cut your movie library entirely in half now since H.265 is a thing, and you’d lose very little if any quality. (H.265 compresses twice as well as H.264 at the same quality level). Some on here will tell you not to do it, because when it transcodes, it will eat up a ton of CPU to transcode it back to 264, however, I don’t have the problem, because everything directplays just fine, and there are more devices that support H.265 than there are devices that do not. (PS4 for instance does not support H.265 for some reason).

Also, something to consider is encode times, do you have an NVIDIA card or an AMD card in your computer? In either scenario (H.264 or H.265) you can greatly increase the speed at which you transcode using your GPU through Handbrake.

If you have a goal in mind, I will be more than happy to help you with profiles and settings and whatnot…

Here’s some comparison:

17.65 Mbit Raw BluRay File 264 VC-1 Total File Size 563MB

8.82 Mbit Avg bitrate H.265 File Single-Pass no Filters Total File Size 254MB (192 FPS encode rate)

8.82 Mbit Avg bitrate H.264 File Single-Pass no Filters Total File Size 295MB (313 FPS encode rate)

These were captured as 100% .bmp files, converted to .png, and then the forums turned them into .jpg (blegh) … So, consider some of the artifacting on all of them is the result of the .jpg compression… That’s why I provided screens from the original file for comparison…

I’d give you links to the video files, but I am not sure that’s allowed here…

You could get (unlimited) cloud storage at Google and never worry about size anymore.

Here are my current settings for h.264, where the movie Kitchen was reduced from 31.3GB to 4.2GB.

I’m thinking the following changes:
-All filters set to Off fro Bu Ray
-Constant Quality changed from RF 20 to RF 22
-Frame Rate changed to constant
-Encoder Tune set to “Film” (not sure what this does)
-Level changed from 4.0 to 4.1 (not sure what this does)

The original settings seem to work pretty well but my Subtitle track was not in there since I deselected the default checkbox. How to add ST track without setting it to default?

Also, I’m thinking use passthrough audio (DTS HD or DTS or AC3) and not make a Stereo mix since my iPhone seems to play DTS HD or perhaps the Plex app is translating this on the fly.

I will have to experiment with h.265 encodes. I’m currently serving this on a 2014 Mac mini so power is limited. Later I can see a more powerful computer processing media over the LAN.

Other encoding thoughts?

If you include subs from within Handbrake - they will be ASS subs. You do NOT want ASS subs.

Unfortunately, a second mux is required to add Text subs - I use Xmedia Recode, but surely there must be something similar for Mac that’ll mux up some subs… Shirley?

ALL my stuff goes through XR before Plex anyway to normalize audio volume so adding some subs at that time is not a big deal. I suggest an additional remux to add subs is way better than ASS subs. <—they transcode on everything I own.

.ass/.ssa are text based subtitles that can also have styling and act like image based subtitles in that respect… most of the time subs that come from a bluray are .pgs and subs that come from a dvd are vobsub (.idx/.sub), and handbrake will just copy these over…

None of these is exclusive to handbrake. Infact, 99.9% of the content I pull from BluRay gets .pgs subs muxed in, not .ass/.ssa. If you want to convert your subtitles ahead of time, you can

  1. MakeMKV to get your initial .mkv file from the BluRay/DVD in question
  2. MKVCleaver to extract the subtitle track(s) of your choice
  3. Use Subtitle Edit on .pgs/.sub to convert from the image based format to .srt
  4. Use Handbrake, click on “Import subtitle” and import your .srt file
  5. Handbrake will mux in the .srt file as instructed

You can sidestep subtitle edit if they’re truly .ass/.ssa files and just use Aegisub to open them and then save as .srt (this saves you the trouble of having to run the image based subtitles through tesseract, and then going through the lines of subtitles to do spelling and character corrections for the things tesseract got wrong.)

Just as a reminder, higher RF = More compression and Lower quality (Though 22 is a good choice for optimal compression/visual fidelity)

This setting lets it know you’re working with 23.976 frame rates and that it may have filmgrain, so it tunes the encoding parameters for those scenarios

This changes the level of .264 that is used, some devices are not compatible the higher up you go but I’ve never run into an issue, I leave it on Auto.

On the subtitles tab go to:
Selection Behavior
Move over the languages you want in order
Choose “All Matching Selected language” or “First Matching Selected Language” (I use English and the Latter for movies without foreign parts)
Burn in Behavior = None

This will grab the selected language and mux it in without making it forced/default

AutoPassthrough works fine in most cases, and plex will transcode just the audio track if it needs to for compatibility sake.

The only other thought I have is changing from Constant Quality to Average Bitrate, this will give you more consistent filesizes…

Edit: One more thing, I generally move the 5.1 AC3 track to the top/Default position, and the HD Audio track lower, just to avoid the audio transcodes on all the other devices… This does have me selecting audio to HD Audio when watching in the room with the high end stereo, but since the majority of movies watched are not in that room, it does save Cycles on the CPU…

1 Like

Making ASS subs out of them.
ASS subs transcode/burn in on everything I own:

Import UTF-8 Text Subs:

Result:

Is HB unable to create NON-ASS subs on PC?
IF so, the process eludes me.

Is HB able to create NON-ASS subs on Mac?
Beats me.

ASS subs transcode on everything I own.

If you do that - and I do - give it a Turbo/Two Pass, so HB can make the best decisions it can with the bit rate you choose. <—pick a bit rate that works well for your eyeballs and displays. I enjoy having consistent file sizes. Average Bit Rate works for me.

Note:
My eyeballs see no further improvement in HD material above about 3250kbps so I give HD stuff 3750kbps and call it a day. 480p fails to improve for me above 1050kbps so that’s what I use. Do what your eyeballs tell you.

That’s interesting, I never noticed… apparently everything I have plays without transcoding… but it’s definitelyt ssa even though I know the input file was .srt… Good to know…

Just fyi, this option is not available for Hardware Encoding (NVENC, etc), so if you are using NVENC, and you don’t see it, that’s why…

I didn’t notice right away either - as I was going on a subtitle quest, had about 300 episodes of various shows ON THE SERVER - ALL ASSED UP - and boy was I sad…

I’ve fixed most of those now - Subtitle Edit to re-strip ASS subs out, strip out the formatting HB includes (gee thanks, HB) and remux standard subs back in for the Direct Play. Whew!

I felt duty bound to warn others…lol

Hot Tip Edit:
Let’s say you have a Forced Sub track. Burn those dudes right in during the encode, but first!:

Strip 'em outta the original, along with the full sub track as separate srt files. Put the full subs in Subtitle Edit (or similar mac equivalent) open the Forced Subs with (a) Notepad (thingy - or something) and remove the forced sub lines from the full subs so you won’t be sad when the subs double up during foreign language sections. You can then discard the forced srts, and burn the text/pgs/vob forced subs in during the encode.

You then can mux the full subs into the final - after the encode - without fear of sadness, ASS or otherwise.

Yes, folks, you gotta be dedicated…lol

2 Likes

Wow, I’m so confused now. It seems like I can add the PGS Subtitle via HB by selecting it and selecting the default option too. The default flag does not seem to do anything. Anyway, the ST added this way seems to work, what’s the benefit of having ASS or SRT files??? See this is why I’ve been keeping the raw MKV files remixed from the Blu Ray so I don’t have to make these decisions.

some clients don’t support Graphics based subtitles (.pgs, .sub/.idx) and some clients transcode even styled text based subs (.ssa/.ass). The only one that seems to work consistently without transcoding are the .srt files, because they’re the easiest for everything to decode…

However, if you’ve been carrying on fine with just using the raw .mkv files and the .pgs subtitles from your BluRay collection, there’s no need to go with .srt or .ass

Here’s where the trouble starts. IF, you run into clients/devices that won’t Direct Play the subs you’re feeding them and a transcode ensues, along with a lot of buffering, you’re gonna wish you had some text based subs <—I Guarantee it.

Better test your clients/devices rather closely or that powerful server you’re thinking about will need to be funded sooner than you thought.

So no transcoding with text based subs?

Handbrake settings for DVDs?

R

for me personally?

Assuming an actual DVD which is Standard Definition resolution, I use 1 Mbit H.265 HEVC @ 23.976 Frames per second Constant Framerate, I use Unsharp filter with settings of Light and UltraFine, I Auto Pass Thru The best quality Audio, and I burn in subs for foreign language, but don’t use subtitles otherwise…

You’re going to want to test 1Mbit for your eyes though, move up or down from there depending on whatever filesize you’re shooting for vs where you notice the quality isn’t good enough for your eyes… 1Mbit is fine for me, but I don’t have hardly any SD content on my server, the few I do are older cartoons for the most part so they look crystal clear (being that there’s no textures)

I use: 264 at 1050kbps

^^That will ensure all your DVD rips have the proper aspect ratio and they’ll all be 480p. Sometimes HB will freak a little on crops during extended dark scenes, so check, use Custom and adjust top and bottom crop if necessary to maintain a sane display width - 16:9 is about 853, 4:3 is exactly 640 - get as close as you can, but for wider widths HB will compute the proper width - just make sure the base stays 720x480 at all times. Extreme HB cropping may change those, but change them back if that happens. Maintain 480p.

with the LapSharp Filter <—why? First one I tried and it’s wonderful. I can’t really see what’s better about it, but family, friends and myself agree it’s better. I Use a 2 pass with turbo. I want to give HB every opportunity to put all the little dots where they need to go… and for 480p you want every dot just right.

If you need to know why to do a 2 pass - encode the first 15 seconds of an HBO show - with the static on the TV - single pass - hellish nightmare - 2 pass - good to go. That should tell you all you need to know…lol

Lapsharp is a traditional sharpness filter, with a single parameter, the amount of sharpening; the “Tune” for it is just telling it what to watch out for (hence film, animation, etc).

Unsharp has 2 parameters, the amount of sharpening, and the scale at which it applies that sharpening (ie the distance/amount of pixels), which they’ve chosen to label ultrafine (2 pixels), fine (3 pixels), etc… Unsharp just gives you more control over the overall process…

I’ll try it, but one thing I don’t need in that area is more control - I need less. I don’t have to know what it’s doing or why. I just have to know it looks better than the Source DVD and it does…lol

1 Like

Oh yeah, Juice, we work off the same mantra, what looks better to our own eyes… You were just unsure of the difference, so I explained the difference… For me, being in the Photo-Retouching and Photography Industry as a side business for 15+ years, Unsharp is always the way I go because I know what affects what, and what has been overall more pleasing to my eye… :slight_smile: