Best way to compress blu ray mkv to something smaller without dramatic loss of quality?

MKV playback, recompression, remuxing, codec packs, players, howtos, etc.
Post Reply
kiiwii
Posts: 1
Joined: Sat Apr 25, 2020 5:42 pm

Best way to compress blu ray mkv to something smaller without dramatic loss of quality?

Post by kiiwii » Sat Apr 25, 2020 5:49 pm

Hi everyone, as the title states, I'm wanting to know how to compress my 1080p blu rays down to a smaller file size, as they take up over 25% of my plex server! (~530GB out of 1.8tb is just blu rays) How can I compress these files down to something smaller without reducing the quality by a lot? I'm also wanting to do this as my server is too wimpy to transcode on the fly with multiple streams so I'm hoping to get it to a somewhat good quality.

Thank you!

Woodstock
Posts: 10333
Joined: Sun Jul 24, 2011 11:21 pm

Re: Best way to compress blu ray mkv to something smaller without dramatic loss of quality?

Post by Woodstock » Sat Apr 25, 2020 7:46 pm

https://handbrake.fr/

Unless you get involved with UHD disks with HDR, but you didn't say that.

Lots of presets you can use, based on what your choices are. Every thing I get on disk goes through handbrake on the way to the media server. That's why I am only about half way through filling the 70TB server.

StormMeows
Posts: 47
Joined: Thu Apr 23, 2020 10:06 pm

Re: Best way to compress blu ray mkv to something smaller without dramatic loss of quality?

Post by StormMeows » Mon Apr 27, 2020 9:26 pm

Hi guys,

I'm going to be backing up a lot of 4K UHDs and Blurays soonand I'm looking for the highest possible quality without taking up full size MKV file sizes. From what I have been reading, an average bluray will be around 26 to 27GB with TV series being around 10GB per episodes and 4K UHDs are around 50 to 55GB all in the MKV format.

I have a lot of space on my NAS server but 27GB to 55GB is going to fill up quickly. I am a video/audio enthusiast so I would prefer the end file to be as close to the discs as possible. So if I could make the 27GB average bluray file even 20GB compressed, while maintaining the best quality using something like H265 that would be preferred. Keep in mind I will always want to keep the full uncompressed Audio HD file and I'm only talking about compressing the 1080p or 4K video files.

I know there are other programs that I could stack on top of MakeMKV (encode the MKV file to compress it further). Is the best program still Handbrake or is there a better alternative now? I do not want to take a file that's let's say 26GB from MAKEMKV and during it into 5GB, that's just too much compression for me. I am really looking for the highest possible size file when compressing so it barely compresses the files, which of course is less than the full MKV file. I would also like to point out I'm only trying to extract the movie portion only via MakeMKV.

I know this might have all sounded confusing but in summary, I want to use MakeMKV to extract the main movie from bluray and 4K discs. Then I want to compress down the video portion file to a more reasonable size but as little of compression using something like H265 and I'm fine with a big file still (around 20GB for bluray and 35GB for 4K).

Any help would be appreciated. I want the file to look close to the orginal disc and have a high bitrate of course.

Edit: I saw someone mention Handbrake but what presets exactly and how much loss in quality?

Thanks for the help!

Woodstock
Posts: 10333
Joined: Sun Jul 24, 2011 11:21 pm

Re: Best way to compress blu ray mkv to something smaller without dramatic loss of quality?

Post by Woodstock » Tue Apr 28, 2020 3:58 am

Handbrake has a lot of presets, and the ones that have "HQ" in their name minimize loss of quality. I use them as the basis for my personal presets, which have some changes to the selection of tracks.

The really nice thing is that you don't have to encode a whole movie to determine what presets work for your eyes. Pick a chapter that has a fair amount of complex detail and motion, and encode it with different presets. You can also adjust the "RF" value (determines how much quality is retained) to see what YOU can tolerate.

With anime, I see 80-90% reduction with no irritating compression artifacts. Movies can be 20-50%, depending on the action level.

StormMeows
Posts: 47
Joined: Thu Apr 23, 2020 10:06 pm

Re: Best way to compress blu ray mkv to something smaller without dramatic loss of quality?

Post by StormMeows » Tue Apr 28, 2020 4:44 am

Woodstock wrote:
Tue Apr 28, 2020 3:58 am
Handbrake has a lot of presets, and the ones that have "HQ" in their name minimize loss of quality. I use them as the basis for my personal presets, which have some changes to the selection of tracks.

The really nice thing is that you don't have to encode a whole movie to determine what presets work for your eyes. Pick a chapter that has a fair amount of complex detail and motion, and encode it with different presets. You can also adjust the "RF" value (determines how much quality is retained) to see what YOU can tolerate.

With anime, I see 80-90% reduction with no irritating compression artifacts. Movies can be 20-50%, depending on the action level.
Thank you so much for this insight. I will just have to mess around with the different presets and see which encode has the least amount of quality loss. I'm assuming if i choose a setting in handbrake that encodes it at the slowest rate, this will maintain more quality too, right ? When you say 80 to 90% reduction, are you referring to quality or file size? Thanks!

Woodstock
Posts: 10333
Joined: Sun Jul 24, 2011 11:21 pm

Re: Best way to compress blu ray mkv to something smaller without dramatic loss of quality?

Post by Woodstock » Tue Apr 28, 2020 12:58 pm

File size reduction. Quality at RF=20 or RF=18 satisfies my tastes, but I'm also the kind of person that thinks, "If I'm looking for pixelation or blockiness in the black areas, what does that say about how interesting the story is? And why am I bothering to waste my time on it in the first place?"

Slower does not always mean smaller or higher quality.

LGans316
Posts: 75
Joined: Sun Apr 24, 2016 1:05 pm

Re: Best way to compress blu ray mkv to something smaller without dramatic loss of quality?

Post by LGans316 » Sun May 10, 2020 9:07 am

For BDs, I used to make sure that the compression has an average video bit rate of at least 17 Mbps unless the actual AVBR itself is under that.

I found this okay on a Panny 50 inch Plasma. On the LG 65 C8 OLED I noticed compression artifacts on near black scenes plus minor colour banding on difficult scenes.

This really put me off. So going forward I decided to go for 1:1 rips for BDs but since buying UHDs I have decided to go 1:1 as well as I don't want any compromises. I know I will fill up all my HDDs worth nearly 15 TB at this rate but quality comes first to me.

Sent from my Moto G (5S) Plus using Tapatalk


neo305
Posts: 4
Joined: Thu Jul 16, 2020 10:33 pm

Re: Best way to compress blu ray mkv to something smaller without dramatic loss of quality?

Post by neo305 » Mon Jul 27, 2020 4:10 pm

Any other options? Handbrake is a nightmare for me so far. Takes way too long. And the results are not amazing for the wait time.

Woodstock
Posts: 10333
Joined: Sun Jul 24, 2011 11:21 pm

Re: Best way to compress blu ray mkv to something smaller without dramatic loss of quality?

Post by Woodstock » Mon Jul 27, 2020 4:46 pm

Handbrake can do "fast", it can do "slow". The question is what is most important to you. Zero loss of quality is to not encode it again. But that doesn't reduce the size.

There is a saying with regard to compression in general, which comes down to choices - "Size of result", "Speed of compression", and "Quality of result". You get to select 2. Lossless compression is choosing "Quality" over everything else. Lossy compression comes down to how much quality loss is tolerable. Hardware encoders generally pick "Speed", and everything else is compromised.

Most of the free software encoders, including handbrake, are based on ffmpeg libraries. Even some of the commercial ones are ffmpeg-based, but not all.

Personally, I cannot tell the difference between "raw" BD video and a handbrake-compressed version at an RF=20 setting, without getting REALLY close to the screen and looking for potential compression artifacts. Even then, most of them will also be in the BD source, because it was compressed to begin with.

dcoke22
Posts: 3108
Joined: Wed Jul 22, 2020 11:25 pm

Re: Best way to compress blu ray mkv to something smaller without dramatic loss of quality?

Post by dcoke22 » Wed Aug 05, 2020 3:12 pm

I have used Handbrake with success in the past. Lately, however, I've been using Don Melton's Video Transcoding tools. https://github.com/donmelton/video_transcoding It is a set of command line tools that use Handbrake, but makes different choices about how to drive the encoding process.

The trick to making it really fly (both the Video Transcoding tools and Handbrake proper) is to use hardware encoding. https://github.com/donmelton/video_transcoding#faq This is what I use on my Mac. Since I'm on a Mac, I have to use the Apple Video Toolbox encoder and since my iMac is from 2017, I have what is essentially a mid range AMD GPU from 3 years ago. As an example, a 2 hour 1080p Blu-ray movie takes about 6 hours to encode on my CPU only (using the Video Transcoding tools). Enabling hardware encoding, that time drops down to about 20 minutes. The resulting outputs are generally indistinguishable from each other (that is not to say they're indistinguishable from the raw rip).

If you have the right set of hardware, essentially a modern Nvidia GPU running on Windows, Don Melton has another set of tools to produce h.265 encodes (as opposed to h.264 encodes) at higher quality with the same or smaller file sizes. These tools are cleverly named Other Video Transcoding. https://github.com/donmelton/other_video_transcoding It seems Nvidia cards with the 'Turing' architecture (Nvidia 1660 and higher cards) have a very good hardware h.265 encoder and produce outputs fast.

I don't really have a good hardware setup to re-encode all my movies in 10-bit h.265 files using Other Video Transcoding, but the results from the few I've tried are quite good. The movie The Edge of Seventeen has a scene around 1 hour, 28 minutes that has lots of noticeable color banding in the h.264 encodes I've made. The 10-bit h.265 I made (which took almost 4 hours on my computer) doesn't have any of the color banding and is 1.5GB smaller in size. For comparison, the h.264 encode I made with the Apple Video Toolbox hardware encoder took about 19 minutes.

The output produced from a hardware encoder depends on the particular hardware encoder. In my case, I've found the output generally acceptable. In the instances where the output is compromised in some noticeable way, I'll try alternate methods.

Post Reply