H.264 Encoding Versus H.265 Encoding
As I’ve mentioned previously I like to collect things. That includes DVD’s and Blu-Rays of my favourite movies and TV shows. As of this writing, my collection is currently 184 movies and 27 TV shows. Some TV shows are complete, while others are still individual seasons. Like most collections it’s a never-ending work in progress. I don’t have them catalogued yet, but once I do you’ll be able to see them on my Collections page.
To enjoy my media without being restricted to physical discs, I built a home media system that uses Kodi so that I can access all my content from any device on my network, digitally. I’ll dive into this setup in more detail in a future post.
I’ve had all my media ripped and stored on my central NAS server for awhile now. I’ve been using the Matroska (MKV) 1080P H.264 format preset in Handbrake for this, which maintains good video quality but also results in a file that’s typically 8GB+ for a standard 2-hour movie.
Recently, I decided to give the H.265 codec in handbrake a try, and while I was initially dismayed by the great increase in time required to encode, I was blown away by the reduction in file size that could be achieved without a reduction in quality.
Since my entire media collection is now exceeding 3TB in size, being able to potentially reduce my storage requirements will make backing up my media collection that much easier, not to mention of course that I will be able to store even more media content in the same amount of space!
To begin this project, I decided to start with any media files larger than 10GB on my NAS and re-encode them from source using the Matroska 1080P H.265 profile in Handbrake. As you can see from the spreadsheet below, the reduction in file size is extreme (file sizes below in GB).
Unfortunately, the time required to perform the encode using the H.265 codec is significantly greater than the H.264 encode. The computer I’m using for encoding is a desktop with an Intel Core I7 2600K processor. This is still a plenty fast processor for normal day to day computing, but being from 2011 means it’s a bit lacking in the media encoding department.
How lacking? On average, a standard 2-hour movie would take approximately 1.5 hours to encode using this processor and the H.264 profile. Using the H.265 profile, the encoding for a standard 2-hour movie will take anywhere from 8 to 16 hours. That’s a significant increase, and also means that even if I were able to encode 24-hours a day straight for 7 days a week for the foreseeable future, and assuming a very conservative 8 hours per encode, it would still take approximately 61 days to encode just my movie collection. Once you add individual TV episodes into the mix, we’re talking a significant number of months in order to fully convert my collection.
I don’t have a more recent Intel Core I7 desktop processor to test with, but I would be very interested in seeing the time difference that a newer processor would make. It would also be possible to encode faster if I had an Nvidia 10 series graphics card, as Handbrake supports handing off the encoding to the NVENC processor.
I have an older Nvidia GTX 760 GPU in this system, which does support NVENC but as far as I know Handbrake will not support this GPU for GPU Acceleration. If I come up with a solution (such as using FFMPEG to encode while also keeping the subtitles and audio tracks intact) I’ll update this post.
Until Later ^‿^