Over the past week we've been compressing our Blu-ray library to save space on our 8TB Seagate Ironwolf NAS drive. After around 8 months we managed to almost fill the drive, the vast majority of space being taken up by MKV files created from our Blu-ray library. A solution was needed, and buying a new larger drive wasn't an option at this point. Enter Handbrake-cli, the command-line version of the popular DVD-ripping and compression program Handbrake. Initial tests showed positive compression results with very good quality at 1080p using the h264 codec. After a week of compressing our library we have the results from 18 files we've compressed over this period.
If you rip Blu-rays using MakeMKV the resulting file size can be huge. File sizes of Blu-ray movies in our collection range from 16GB to over 36GB. This was fine a year ago when we added an 8TB hard drive to our KODI server, but in less than a year we managed to whittle the free space on that drive down to 250GB. Buying more/larger drives is one approach to solving the free space problem, but we've already done this several times, going from a 1TB drive to a 2TB drive, then a 3TB drive, and another 3TB drive, before replacing them all with the 8TB drive. Another approach, the one we ulimately decided would be the right solution for us, was to encode those files - in this case using handbrake-cli, the command-line version of handbrake.
When you're working with Blu-ray media file sizes can be a nightmare. Back when I got my 8TB drive I had slightly over 5TB of files. Eight terabytes seemed like it would be enough at the time, but here it is less than a year later and the drive is dangerously close to full (308GB free). Drive space wasn't a problem when I was ripping my DVDs, but when I "rip" my Blu-ray discs it's more like dumping them to the drive, there's no re-encoding done.