Jump to content

Compressing with Handbrake


Bingie

Recommended Posts

Bingie

Hi all,

Up until now, I was solidly in the "just add more disk space" camp, since drives keep getting bigger faster cheaper.

I recently purchased an old sci fi series I loved ("The Universe"), been wanting to watch it.  First, I bought it on dvd.  The quality was horrible, they cropped it on all sides, using maybe the middle 75%? of the screen.  Appalling.  Should've sent it back for a refund.  Then luckily the series was also available on blu ray, so I purchased that.  YAY!  1080p.  So I ripped it with makemkv, and realized that with each episode being at least 8gb in size, and over 100 episodes, I would be dedicating a full terabyte for one tv show.  DOH!  That's just too much.  Time to up my game.

So I've been learning handbrake, went thru the whole use gpu vs cpu only (cpu takes 10 times longer, but the quality is better and the file size is much much smaller).  Sticking with mkv (for quality and multi audio/subs option), h.264 (for compatibility), run it at maximum quality settings, then dial back the RF to 22, and voila!  File size reduced 80%, from 8+gb to <2gb, and quality looks identical, no dropouts, artifacts, etc.  Sure it takes over an hour to process each episode, but that's okay.  Should be good forever.  Not like this old series will ever be re-released in 4k.

So before I begin processing the entire series, I wanted to check with others here first, that have already gone thru all of this.  I'm still learning all of the audio and video settings, it's a lot to take in.  I've discovered tools like mkvtoolnix and mediainfo, still learning those.  I don't want to become an expert at this stuff, but then again, don't want to redo this entire process later, because I missed something, an option I'd really like to have later.

Our tv's are still just 1080p, haven't gone to 4k yet, don't really need it.  Don't have a big sound system either, live in an apartment, so try to keep the noise down, have a sound bar but don't always turn it on, so our needs are pretty basic.

One question, I noticed handbrake on the high quality setting creates two audio options, an AAC and AC3.  I've read up on them, and it seems a matter of preference.  Wondering if I should delete one maybe, to free up disk space.  AC3 seems the more common, from what I can tell, and either can drive my tv speakers and/or soundbar.

Also, handbrake recommends use constant quality, but been reading for some videos that have both a lot of high speed action (stars exploding) and slow scenes (people talking), they make the case for variable bit rates.  No idea where to begin on this option though, but should probably explore it.

I'd love to hear what others are doing.

Cheers

 

Link to comment
Share on other sites

roaku

I would spend time considering h265, if you haven't already. It's a very good option, *if* all your devices support it. Takes longer to encode, but generally offers a better file size to quality ratio.

For AAC vs AC3, if you're re-encoding surround content, you should go with AC3 or possibly EAC3 (dd+). In my experience, client *multi-channel* AAC support is very hit and miss, in which case, Emby's going to end up transcoding your AAC to AC3 on the fly anyway.

Also worth mentioning, if your source material is already AC3, make sure you use the passthru option in Handbrake, rather than re-encoding AC3 to AC3.

  • Like 1
  • Agree 1
Link to comment
Share on other sites

Bingie

h.265:

I was under the impression that emby will always transcode h.265, so didn't want to unnecessarily burden the emby server with every play.  Don't like those temporary transcode files hitting the drive either.  As it is now, the above first episode I made plays direct to our roku/tv's, no need to transcode.  I should at least test a h.265 version, see if it plays okay.  I'm not worried about longer encode time, and an even smaller file is always good.

ac3:

The makemkv ripped source file has video in AVC, and audio in PCM.  Handbrake by default (on super high quality setting), defaults to making both AAC and AC3.  Both work on our tv's, so don't need both.  Maybe I'll delete the AAC, and go with AC3.  Don't think soundbars can handle better than that, so not really worried about higher settings, and this series comes in only stereo.

 

Link to comment
Share on other sites

roaku

Emby will happily direct play h265 on devices that support it.

For Rokus, I think all the '4k' models support it. I have both Roku streaming sticks and boxes and get direct play for all my h265 content.

I don't want to push you toward it or anything, it's just one of those things that might lead to regret down the road if you don't consider it now.

 

On the audio, ya, if it's only stereo, I don't think it makes much difference which one you choose.

For Handbrake, it's worth tweaking the 'Selection Behavior' for audio to get it to always load things the way you want, so you don't have to manually adjust it for each episode:

https://handbrake.fr/docs/en/latest/advanced/audio-subtitle-defaults.html

Edited by roaku
Link to comment
Share on other sites

Bingie

edit: We have Roku Ultra 2020, they support 4k, so should direct play h.265 too, I'll try it and see.

Thanks for that link :)  I haven't gotten to the automation part yet, but will definitely need it for 100+ episodes.

 

Edited by Bingie
  • Like 1
Link to comment
Share on other sites

daldana

Hi Bingie,

I use Handbrake as well, so I thought I would share a couple of settings pages. The attached are from  a DVD conversion of Crouching Tiger, Hidden Dragon (I also upscaled it to 1080p and it looks very good!). In the Audio page, I use the passthrough option mentioned above, there were originally two other tracks that were both in stereo only, so I deleted those. In the Video page, I use the H.264 QSV encoder option with the Same as Source framerate which automatically changes it to the variable framerate setting. Also, I find changing the Constant Quality to 20 works fine for me.

My two cents...

HandbrakeAudioSettings.jpg.a028677e1db643944a3ed026c92a444c.jpgHandbrakeVideoSettings.jpg.f30f7f5e5962d5f8b51ef1ea6ac888b7.jpg

Link to comment
Share on other sites

Bingie

Hi @daldana

Sorry for the delayed response, I've been doing testing.  I started with those default settings are you using, and have since moved on to just using the cpu for encoding h.264 (don't use hardware).  Sure it takes 10 times longer to process, but the quality is better, and the file size is much smaller, almost half.  I also crank up the encoder preset to very slow... that gives even more higher quality and even smaller file.  I also set the encoder profile to high, again to allow the cpu to provide higher quality.  After doing that, I can adjust the constant quality setting lower, and run it at different levels, to see when picture quality begins to suffer, then dial it back up a bit.  Takes a long time testing, many runs, but it's a good learning experience.

Link to comment
Share on other sites

Bingie

Hi @roaku

I tried h.265 a few times, and ran into an apparent common problem of color being wrong.  People's faces appear burnt orange.  Looks this way on both my pc/vlc and emby direct play to my roku ultra.  I googled it, and many others have this problem.  After a number of tests, I gave up.  Sure, h.265 will produce a file roughly 2/3's the size as h.264, and that would be nice, but the color problems, and the encode time jumping from an hour to a day is too much.  Sure I can adjust the quality level to shorten the time, but even with long time the color problem was still there, so I eventually gave up on h.265.

Thank you everyone for your help!!!

Cheers

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...