Presets for reducing 18Gb, 1920x1080, MKV video file to ca. 9Gb?!

HandBrake for Windows support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
MovieDude17
Posts: 7
Joined: Wed Aug 16, 2017 7:21 am

Presets for reducing 18Gb, 1920x1080, MKV video file to ca. 9Gb?!

Post by MovieDude17 »

Hi Forum:

First off I'm a Handbrake newbie, the installed Handbrake version is 1.0.7 x64 and I use Win7 x64.

I'm trying to reduce a 18Gb, 1920x1080 MKV video file to ca. 9Gb with as close to lossless as possible within a time span of (hopefully not more than) 10 to 12 hours.

After quite a bit of googling I did find two pages with step-by-step instructions, which did appear a bit contradictory, though :?. Also, Handbrake Forum's 'User Documentation' such as "Opening a video source" and "Quick start" (and searching the Forum, e.g. the 'reducing video size' thread) weren't very helpful either, because these seem to be the basics I don't think I have too much of a problem with.

Anyway, I applied the settings suggested by the above mentioned 'step-by-step instructions' but now, after about 8 hours, Handbrake is at Pass 2 of 2 and says it's about 28% done (Time Remaining is still more than 24 hours). Also, the how-tos I found didn't provide anything about the approximate output size when applying these settings.

Are there presets available, or experiences with such settings, that would allow me to reduce the 18Gb MKV file to ca. 9Gb within about 10 to 12 hours and as lossless as possible? Or in more general terms, what presets should I apply to reduce 1920x1080 MKV video files, with sizes between approx. 17Gb and 30Gb, to 8Gb to 9Gb? I've seen 8Gb to 9Gb MKV video files that were basically indistinguishable from Blu-Rays 8).

Many thanks!

MovieDude 17 aka John

P.S. I'm sorry but I'm not entirely clear what "Provide the activity log - Please use a Pastebin Website (registration is usually optional) and post the URL it provides.." means. Anyway, this is the link I received after creating a Pastebin account: https://pastebin.com/activate_account.p ... ovieLuva17. If "Providing the activity log" is essential to receiving Forum support, please let me know how to provide it :D. Thanks so much!
rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: Presets for reducing 18Gb, 1920x1080, MKV video file to ca. 9Gb?!

Post by rollin_eng »

Can you provide the link to your log or post your log here, thanks.
MovieDude17
Posts: 7
Joined: Wed Aug 16, 2017 7:21 am

Presets for reducing 18Gb, 1920x1080, MKV video file to ca. 9Gb?!

Post by MovieDude17 »

Hi Rollin_eng:

Thanks for your reply.

I'm sorry for perhaps being rather dense but which log link or log are you talking about :oops:?

I guess, I'm rather flummoxed because that kind of issue never came up in the other forums (Linux and Windoze) I joined.

Thanks again.

MovieDude17 aka John
rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: Presets for reducing 18Gb, 1920x1080, MKV video file to ca. 9Gb?!

Post by rollin_eng »

The link above does not point to your log, so can you please post the correct link.

If you can't figure that out just paste the log in your next post.

We need your HB log, instructions on how to find it can be found here:

https://handbrake.fr/docs/en/latest/hel ... y-log.html
MovieDude17
Posts: 7
Joined: Wed Aug 16, 2017 7:21 am

Presets for reducing 18Gb, 1920x1080, MKV video file to ca. 9Gb?!

Post by MovieDude17 »

Hi Rollin_eng:

Here you go: https://pastebin.com/mW7ySwCw.

I'm really sorry it took me so long to get what you wanted me to do :(. I guess, for you guys it's obvious that the 'log' refers to the data that Handbrake collects during an encoding activity. I also understand now what the Pastebin is. At first I thought it was some shopping site... :oops:. I just didn't know that there are sites where you can temporarily store data; I only knew about sites (clouds) where you can upload files, etc. to.

Anyways, I hope the log helps you to answer my questions.

Many thanks again.

MovieDude 17 aka John
rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: Presets for reducing 18Gb, 1920x1080, MKV video file to ca. 9Gb?!

Post by rollin_eng »

You are doing a quality based encode (which is a good thing) thus you won't be able to predict your file size before encoding.

From my personal observations encoding Blu rays after about 25% your file will be about 1/4 its final size.

Doing encodes this way means your encodes will vary in size but be of roughly the same quality.

Speed wise you are using the 'very slow' encoder preset, if you want a faster encode you will need to adjust this to a faster setting, but this will come at a trade off of quality and/or size.

Speed, Quality, Size pick 2 of them.
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: Presets for reducing 18Gb, 1920x1080, MKV video file to ca. 9Gb?!

Post by Woodstock »

CPU: Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz
For speed, the CPU you're using is not going to break many speed records. You can help it a little by eliminating unneeded filters.

Example, if your source is from a Bluray, 99% of the time it is not going to be interlaced. So you can set the Deinterlace on the Filters tab to "None", and Detelecine to "Off". Sometimes this can make a minor difference in file size, but that is rare. If the picture is not "noisy", leaving Denoise "Off" is faster, but some sources will be a lot smaller if you use a denoise filter... at the cost of speed (sometimes a LOT on low-capability CPUs).
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Presets for reducing 18Gb, 1920x1080, MKV video file to ca. 9Gb?!

Post by BradleyS »

If you really need to hit a file size target, you'll need to use a bit rate calculator, abr + 2-pass. Don't forget to take audio track(s) size into account.

Generally speaking, though, it's better to use a sane RF value that gets you close enough.
MovieDude17
Posts: 7
Joined: Wed Aug 16, 2017 7:21 am

Presets for reducing 18Gb, 1920x1080, MKV video file to ca. 9Gb?!

Post by MovieDude17 »

Hi Rollin_eng, Woodstock and BradleyS,

Many thanks for your feedback. In the meantime I've completed the first 'decoding trial run'... In part the video seems to be pretty good, actually :).

In addition to "the Log" :wink: here: https://pastebin.com/nFnTjd5p there are some of the settings I used:
- Size: almost 4.9Gb
- Decoding time: a little over 12 hrs.
- Source: 1920x1072 (I deselected Keep Aspect Ratio, otherwise no 1920x1072, only 1920x816); after the movie had been decoded I had to use MPC's (Media Player Classic) Pan&Scan/Increase Width feature to fix the aspect ratio.
- Quality/RF: 19 (which HB selected, probably because of other settings I'd picked)
- Optimize Video/Encoder Preset: Slow
- Encoder Profile: Auto
- Anamorphic: None
- Encoder Tune: None.

Which settings would I have to change to get a really good copy and ca. 8Gb size and would that also mean several additional hours in decoding time? For example setting RF to 22 or 23 and the 'Veryslow' encoder preset? As for image quality, is there a noticeable difference between 1920x1072 (the Blu-Ray) and 1920x816 (what HB had preselected)?

BTW, I created a list with Handbrake tech terms and a how-to: https://pastebin.com/9XH4T8Bv (Unfortunately, Pastebin removed all the formatting. I hope, it's not too difficult to read). Would you mind taking a look at it with regards to any mistakes I made?! Once that's been accomplished, maybe it can be added to the Forum's "Knowledge Base" (if there is such a thing :)) to enlighten other newbies to the mysteries of Handbrake usage :idea:?!

Many thanks again.

MovieDude17 aka John

P.S. What kind of CPU would I need to really make a dent in decoding times?
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Presets for reducing 18Gb, 1920x1080, MKV video file to ca. 9Gb?!

Post by BradleyS »

Log looks pretty sane to me, although it says RF 20 instead of 19 as your post suggests. Anyway, don't deselect Keep Aspect Ratio! If I read the log correctly, HandBrake is cropping black bars and then you're upscaling (not good, typically). I'm not sure why the GUI is allowing this, but it shouldn't.

HandBrake Documentation for 1.0.x is here: https://handbrake.fr/docs/en/1.0.0/

We have mostly moved away from technical definitions and to workflows. Though, some technical info will still be available; the docs are certainly a work in progress.
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: Presets for reducing 18Gb, 1920x1080, MKV video file to ca. 9Gb?!

Post by Woodstock »

CPU choice depends on budget, and somewhat on your target. Modern Intel CPUs have "Quick Sync Video", a hardware encoder that can make fast work of encoding video... assuming you can live with the output being around 10% larger than it would be with a software encode.

More cores help more than more RAM; An AMD 8-core processor will do better than an Intel 4-core at software encodes, but the Intel will (generally) make less heat in the process. And if you can afford an Intel 8-core, it will beat the older AMD 8-cores. Not sure about the latest AMD processors; they can do things the Intel's can't, but not a lot of software has been optimized to use those features yet.
agentrfr
Posts: 1
Joined: Tue Apr 04, 2017 5:08 pm

Re: Presets for reducing 18Gb, 1920x1080, MKV video file to ca. 9Gb?!

Post by agentrfr »

Why not encode as an x265?

From personal experience, I am re-encoding my whole library using H265. The results are astounding, visually transparent (to me anyway) and my BRs have gone from 30~ GB to 4-5 GB.

The settings I am using are x265 v.2.3 in 10bit, slow preset with CRF of 22. Also setting my audio to Opus with matching bitrates of source.

I have an older rig acting as plex server that does the encoding too (AMD Phenom 2 X6 1090T overclocked a little). It is on 24/7 so I might as well use it. Encode speeds are typically 2fps depending on source which is fine for my purposes
rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: Presets for reducing 18Gb, 1920x1080, MKV video file to ca. 9Gb?!

Post by rollin_eng »

h265 doesn't have the HW support h264 has yet.

Plus x264 is very mature and stable, x265 is still evolving.
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Presets for reducing 18Gb, 1920x1080, MKV video file to ca. 9Gb?!

Post by mduell »

MovieDude17 wrote: Sat Aug 19, 2017 9:25 pmIn addition to "the Log" :wink: here: https://pastebin.com/nFnTjd5p there are some of the settings I used:
- Size: almost 4.9Gb
- Decoding time: a little over 12 hrs.
- Source: 1920x1072 (I deselected Keep Aspect Ratio, otherwise no 1920x1072, only 1920x816); after the movie had been decoded I had to use MPC's (Media Player Classic) Pan&Scan/Increase Width feature to fix the aspect ratio.
- Quality/RF: 19 (which HB selected, probably because of other settings I'd picked)
- Optimize Video/Encoder Preset: Slow
- Encoder Profile: Auto
- Anamorphic: None
- Encoder Tune: None.

Which settings would I have to change to get a really good copy and ca. 8Gb size and would that also mean several additional hours in decoding time? For example setting RF to 22 or 23 and the 'Veryslow' encoder preset? As for image quality, is there a noticeable difference between 1920x1072 (the Blu-Ray) and 1920x816 (what HB had preselected)?

BTW, I created a list with Handbrake tech terms and a how-to: https://pastebin.com/9XH4T8Bv (Unfortunately, Pastebin removed all the formatting. I hope, it's not too difficult to read). Would you mind taking a look at it with regards to any mistakes I made?! Once that's been accomplished, maybe it can be added to the Forum's "Knowledge Base" (if there is such a thing :)) to enlighten other newbies to the mysteries of Handbrake usage :idea:?!

P.S. What kind of CPU would I need to really make a dent in decoding times?
Deselecting keep aspect ratio is not useful here, it's distorting the video, bloating the output, and requiring correction at playback time. Your actual content is only 816 tall, the rest is black bars, so there's no good reason to go taller than that.

RF 19 is based on whatever HB preset you selected, without reference to any settings you changed.

Output size and encoding time are independent, without other constraints. You're already at about the highest reasonable quality setting, so there's no point in making this movie any larger.

If you want faster encodes, pick a faster x264 preset like fast. Maybe drop the RF to 18, but I wouldn't bother going much lower.

Not every video will be 4GB. Saving Private Ryan might be 15-20, while The Social Network is 1-2. Aim for approximate average file sizes over the long term to be around your target/allowance.

More cores (up to 12 or so) or more Ghz will make a dent in encoding time, approximately proportionally.
agentrfr wrote: Sun Aug 20, 2017 10:30 amWhy not encode as an x265?
Slow encodes, limited compatibility, no real upside given the OP's tolerance for large files.
MovieDude17
Posts: 7
Joined: Wed Aug 16, 2017 7:21 am

Presets for reducing 18Gb, 1920x1080, MKV video file to ca. 9Gb?!

Post by MovieDude17 »

Hi guys:

Thanks again for all your feedback :D and sorry about being late in replying :oops:.

As far as I could tell, this time the movie came out very good. I haven't, though, watched it in it's entirety.

Anyways, here's the link to the log: https://pastebin.com/7cvThsYP. This time I made a few changes (compared to the first trial run): I checked 'Keep Aspect Ratio', Encoder Preset was set to Veryslow, RF was again 19, decoding took ca. 22 hrs and size was 4Gb. Your estimate, Rollin_eng, that after about 25% progress in encoding the file will be about 1/4 its final size seems to be quite accurate :)!

Right now I'm encoding another movie. All presets are the same except that I set RF to 17, just to see what it looks like when it's done. I guess, the old adage "Learning by doing" still holds true...

Btw, with the right codecs MPC apparently does do x265: here's the link to the download http://download.mediaplayercodecpack.co ... .setup.exe. It played the beginning of "The Forbidden Kingdom" (which I found on TPB) without a hitch (again, I didn't watch the movie in it's entirety).

And speaking about x265, what would the presets have to be if I wanted to decode in x265 :idea:? The same with the exception of setting Video Codec to x265 instead of to x264?

Again, thanks a lot.

MovieDude17 aka John
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Presets for reducing 18Gb, 1920x1080, MKV video file to ca. 9Gb?!

Post by mduell »

Yes, you should pick x265 if you want H.265.
rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: Presets for reducing 18Gb, 1920x1080, MKV video file to ca. 9Gb?!

Post by rollin_eng »

Give h265 a try, but with your CPU it will be very slow.
jamietre
Posts: 6
Joined: Sun Jul 23, 2017 4:06 am

Re: Presets for reducing 18Gb, 1920x1080, MKV video file to ca. 9Gb?!

Post by jamietre »

agentrfr wrote: Sun Aug 20, 2017 10:30 am The settings I am using are x265 v.2.3 in 10bit, slow preset with CRF of 22. Also setting my audio to Opus with matching bitrates of source.
Funny.. after I got a 10-bit HEVC capable streamer (Vero 4k), did much experimentation and this is exactly what I ended up with. To my eyes it is way better quality-wise then x264 is @ CRF 20, and files are sometimes half the size or less, especially with clean sources. Benefit is a bit less with grainy/older movies, but still significantly smaller and much better quality. The difference in banding and dark-gray/black rendering is night and day, h264 always suffered in those situations at @CRF 19 and that was as big as I was willing to go. Almost never see it with 10-bit 265 @ 22.

Even 10-bit 265 @ 23 is better than 264 @ 20 though I can start to see banding more often so I settled on 22.

But yeah. It is SLOW AF. I am now using a Ryzen 1700 and it's about 4-5 FPS using "slow". h264 is four times faster. But well worth it if you aren't in a hurry.
Deleted User 11865

Re: Presets for reducing 18Gb, 1920x1080, MKV video file to ca. 9Gb?!

Post by Deleted User 11865 »

jamietre wrote: Sun Aug 27, 2017 1:48 amEven 10-bit 265 @ 23 is better than 264 @ 20 though I can start to see banding more often so I settled on 22.
Are you comparing 10-bit HEVC to 10- or 8-bit H.264 though?
jamietre
Posts: 6
Joined: Sun Jul 23, 2017 4:06 am

Re: Presets for reducing 18Gb, 1920x1080, MKV video file to ca. 9Gb?!

Post by jamietre »

Rodeo wrote: Sun Aug 27, 2017 5:44 pm Are you comparing 10-bit HEVC to 10- or 8-bit H.264 though?
h.264 8-bit, sorry that wasn't clear. It would be interesting to see if it were possible to get better overall quality with h.264 10-bit at higher CRF vs 8-bit, e.g. without a big file size sacrifice. But since I had already switched to HEVC capable decoder I didn't see the point for my own purposes, since HEVC will always be better or smaller. So I never tried that.
MovieDude17
Posts: 7
Joined: Wed Aug 16, 2017 7:21 am

Presets for reducing 18Gb, 1920x1080, MKV video file to ca. 9Gb?!

Post by MovieDude17 »

Hi mduell, Rollin_eng and everybody else:

The other movie I decoded a few days ago, 'Kite' came out really nice with RF set to 17 8). Decoding time was, I think, about 22 to 24 hours, size 4.5Gb.

Right now I'm decoding the same movie with x265 (but the same presets otherwise) to see what difference it makes with regards to quality and decoding time. Handbrake's current estimate as to decoding time is about 2 days. But because I have 2 computers it doesn't really matter how long decoding takes.

What I still don't quite get is how to increase the output size. For my 24" monitor 4.5Gb/1920x800 movies are more than sufficient, but maybe not for much larger monitors.

So, which presets would I need to change if I wanted to get to an output size of roughly 8Gb instead of a bit more than 4Gb :?? Set RF to something like 10 instead of 17ish (while leaving all other presets)?

Btw, what about his "Even 10-bit 265 @ 23 is better than 264 @ 20" business :D ? Do these numbers refer to the RF settings?

Thanks!

Movie Dude 17 aka John
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Presets for reducing 18Gb, 1920x1080, MKV video file to ca. 9Gb?!

Post by mduell »

At 17 you're beyond reasonable quality settings for HD content. There's no point in making the file larger.

Setting the RF to ~11 should double the size compared to 17, but it's completely silly. Enjoy the file size on that movie, and you're still going to end up with ~20GB for Saving Private Ryan or similar.
rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: Presets for reducing 18Gb, 1920x1080, MKV video file to ca. 9Gb?!

Post by rollin_eng »

Stop worrying about size and focus on what it looks like.

If it looks good who cares what size it is.
jamietre
Posts: 6
Joined: Sun Jul 23, 2017 4:06 am

Re: Presets for reducing 18Gb, 1920x1080, MKV video file to ca. 9Gb?!

Post by jamietre »

rollin_eng wrote: Mon Aug 28, 2017 7:44 am Stop worrying about size and focus on what it looks like.
+1 - The size has very little to do with quality for a specific input. A clean source that compresses easily using HVEC could be 1/10th the original and to most eyes look identical. A dirty, grainy source might actually end up bigger than the input! (And, as you move to lower CRF values, it's not at all unlikely this could happen). I've had a few movies that were hardly smaller than the original with h264@20, and looked the same or worse. In those cases I just skip it and use the original.

Also if you really are interested in the nuts and bolts read this, pretty much the reference work for analysis of CRF vs quality: http://goughlui.com/2016/08/27/video-co ... ke-0-10-5/

At the end of the day it's unlikely you'll be able to tell the difference at 8-bit h264 or h265 CRF 19 or 20. Going to 10-bit changes the dynamics somewhat, and in my experience lets you bump up CRF a bit more without obvious negatives that appear in 8-bit encodes. All that really matters in practice is, are the results acceptable to you?
MovieDude17
Posts: 7
Joined: Wed Aug 16, 2017 7:21 am

Presets for reducing 18Gb, 1920x1080, MKV video file to ca. 9Gb?!

Post by MovieDude17 »

Hi mduell, rollin_eng and jamietre:

Thanks so much for your really helpful feedback and the 'Video Compression Testing' link :D.

Actually, I just watched about half of "The Forbidden Kingdom" (x265, 1080p, 4.2Gb) and I can't really see a difference between that and a x264 encoded video (assuming all other presets are the same or at least comparable). And "Kite", which came out at about 4.5Gb (x264, 1080p), looks just as good 8).

Maybe I'm not the only one that tends to overdo things when new to video encoding :oops:?!

Many thanks again.

MovieDude17 aka John
Post Reply