Good rule of thumb for compressing a DVD using H.265
Good rule of thumb for compressing a DVD using H.265
I have a huge library of ripped DVDs (that I purchased) on an almost full 20TB NAS box. For each DVD all I did was strip out the encryption and just pick out the main movie - so everything is still in it's original audio/video (AC3/VOB) format and the file sizes are big, typically 6GB/movie. The video compression used in DVDs is (by today's standards) primitive, and I've always been scared about further compressing the video until the codecs got way better. I think I'm now ready to convert everything to HEVC (H.265) - this is also partially motivated because I'm finding more and more software has abandoned or deprecated their VOB support (especially regarding subtitles) and my existing file sizes are too large for practical remote viewing. I'm on the Mac and plan on using HandBrake for all the compressions.
I realize my movie library is already "butchered" having been compressed with the continuously evolving versions of H.264 over the years. I have tried many rounds of further compression using various H.264 settings in HandBrake and just can't get away from things like awful banding/blocking effects in dimly lit sunrise/sunset scenes etc. that aren't too noticeable in the source material. In previous HandBrake forum posts I've been told this is pretty much a limitation of H.264, so I'm going to go the H.265 route for my compressions because it's my understanding it deals with such things much better.
I'm looking for a sensible guideline for a target compression percentage. Let's say e.g. H.265 generally produces files half the size of H.264 for the same perceived quality, and that I want to effectively maintain as much of the source quality as possible. Is it then reasonable to target a H.265 compressed version of my natively H.264 compressed file to be about half of what I started with i.e. a 6GB file becomes a 3GB file? Is my 50% factor for H.265 about right, or is it too conservative?
I realize my movie library is already "butchered" having been compressed with the continuously evolving versions of H.264 over the years. I have tried many rounds of further compression using various H.264 settings in HandBrake and just can't get away from things like awful banding/blocking effects in dimly lit sunrise/sunset scenes etc. that aren't too noticeable in the source material. In previous HandBrake forum posts I've been told this is pretty much a limitation of H.264, so I'm going to go the H.265 route for my compressions because it's my understanding it deals with such things much better.
I'm looking for a sensible guideline for a target compression percentage. Let's say e.g. H.265 generally produces files half the size of H.264 for the same perceived quality, and that I want to effectively maintain as much of the source quality as possible. Is it then reasonable to target a H.265 compressed version of my natively H.264 compressed file to be about half of what I started with i.e. a 6GB file becomes a 3GB file? Is my 50% factor for H.265 about right, or is it too conservative?
Re: Good rule of thumb for compressing a DVD using H.265
The good rule of thumb is don't use H.265 for compressing DVDs. It does not produce half size files as the same quality at 480p, for anything resembling watchable content.
Re: Good rule of thumb for compressing a DVD using H.265
Just to clarify, you're intending to go from DVD disc --> H264 --> H265 ?
In other words, it's starting now from an already H264 compressed file ?
I'm not the expert but I've been using the H265 480p MKV preset for DVDs, at Q21, which has so far worked out fine for me (and I'm probably not as discriminating), although the H265 files were only about 20% smaller than the H264's, and took over 3x as long to compress.
The usual recommendation for Constant Quality is 18 to 21 I believe.
But others will have more expert advice, and I'd be interested to see the comments on the wisdom of recompressing H264 to H265.
In other words, it's starting now from an already H264 compressed file ?
I'm not the expert but I've been using the H265 480p MKV preset for DVDs, at Q21, which has so far worked out fine for me (and I'm probably not as discriminating), although the H265 files were only about 20% smaller than the H264's, and took over 3x as long to compress.
The usual recommendation for Constant Quality is 18 to 21 I believe.
But others will have more expert advice, and I'd be interested to see the comments on the wisdom of recompressing H264 to H265.
Re: Good rule of thumb for compressing a DVD using H.265
kbarb: "Just to clarify, you're intending to go from DVD disc --> H264 --> H265 ?"
No - I'm effectively going from DVD file (natively compressed using H.264) --> H.265
mduell: thanks - I appreciate your insight. Do you have a suggestion for how I might proceed?
No - I'm effectively going from DVD file (natively compressed using H.264) --> H.265
mduell: thanks - I appreciate your insight. Do you have a suggestion for how I might proceed?
-
- Veteran User
- Posts: 4854
- Joined: Wed May 04, 2011 11:06 pm
Re: Good rule of thumb for compressing a DVD using H.265
Could you please post your HB logs, instructions can be found here:
https://handbrake.fr/docs/en/latest/hel ... y-log.html
https://handbrake.fr/docs/en/latest/hel ... y-log.html
Re: Good rule of thumb for compressing a DVD using H.265
rollin_eng: I don't actually have any logs for you at the moment, I was mostly looking to get validation on that H.265 path forward. In earlier forum posts I recall people saying H.264 inherently didn't perform well in mostly monochromatic or dimly lit scenes. While I realize the DVD source material (already compressed using some version of H.264) looked OK enough to not be an issue, it also appeared that such source material couldn't survive a subsequent H.264 compression to about half the original size without the awful looking banding/blocking effects for the scenes previously mentioned.
Now since those days, I have also upgraded my TV from a 2008 67" Samsung DLP rear projection to a 2021 75" Samsung QLED. The new TV has all sorts of internal filtering that apparently does an OK job "smoothing out" many of those banding effects, so properly evaluating the compression artifacts as seen on the big screen is now an even more mirky TV-dependent thing.
Anyway, the only actionable feedback I have from the forums so far is that H.264 is known to do a poor job for those mostly monochromatic or dimly lit scenes (implying perhaps that H.265 is better), and now also (via mduell) that compressing DVDs to half size with H.265 won't produce anything "resembling watchable content". Sigh.
Now since those days, I have also upgraded my TV from a 2008 67" Samsung DLP rear projection to a 2021 75" Samsung QLED. The new TV has all sorts of internal filtering that apparently does an OK job "smoothing out" many of those banding effects, so properly evaluating the compression artifacts as seen on the big screen is now an even more mirky TV-dependent thing.
Anyway, the only actionable feedback I have from the forums so far is that H.264 is known to do a poor job for those mostly monochromatic or dimly lit scenes (implying perhaps that H.265 is better), and now also (via mduell) that compressing DVDs to half size with H.265 won't produce anything "resembling watchable content". Sigh.
Re: Good rule of thumb for compressing a DVD using H.265
Reasonable x264 settings to encode from the DVD rips. HQ 480p preset is a great starting point, adjust to your personal preferences for quality, size, and encoding time.
Re: Good rule of thumb for compressing a DVD using H.265
Thanks for the advice - frankly in all the horsing around I've done so far with HandBrake I never actually started with a preset as low as any version of 480p. in an effort to keep any possible artifacts to a minimum I've usually started with a 720p or better. That wasn't based on anything other than a likely perverted sense of intuition...
Re: Good rule of thumb for compressing a DVD using H.265
That's a bad approach, since the 720p presets have lower quality-per-pixel targets, tuned for the larger frame sizes.
Re: Good rule of thumb for compressing a DVD using H.265
I’ve been using the HQ 1080p preset and have been getting reasonable results. Some DVD’s, particularly of old BBC programmes have just bad quality video. I’ve compared dvds playing side by side on the Mac screen with the encodes and not seen much difference. You must remember to select the audio ac3 track to none or they won’t play in QuickTime or Appletv. 30mins/800mb encode for an hour programme on an old 09 Mac Pro.
Re: Good rule of thumb for compressing a DVD using H.265
Thanks Iwio. I guess this is highlighting something about the polar extremes between how people use HandBrake. I understand that dvds are natively 480p resolution and it therefore makes perfect sense to target 480p presets because anything higher is like getting blood from a stone. I also get that even cheap TVs these days are way better than 480p (typically 1080p) so picking a preset that matches the TV might help if HandBrake brings some clever interpolating into the process (although TVs themselves also routinely do such interpolations). I've agonized over this for long enough to realize that unless you know what you're doing you're only just going to make a dumb choice, but the learning curve too enormous for the average Joe. My biggest fear is deciding on some preset and dedicating months to compressing my huge library only to find out afterwards I did something dumb. I've already done that once! I just wish some expert had made a HQ preset for compressing a dvd that is to be viewed on a 1080p TV set and put me out of my misery!
Re: Good rule of thumb for compressing a DVD using H.265
The preset isn't about the TV resolution, it's about the actual content. HB isn't doing any clever interpolating, or generally any interpolating at all since the GUI won't upscale.
Re: Good rule of thumb for compressing a DVD using H.265
So, as was the case when I was assuming a 720p preset might be a good place to start, by extension it stands to reason that you'd say a 1080p preset is an even worse place to start. I'm not looking to tar and feather Iwio, just driving home your point about starting with a 480p preset.
Also, I was a little surprised about you saying HB doesn't do any interpolating. If you started with a 480p DVD source but used a 1080p HB preset (like Iwio did) i.e. you're mapping a 480p image onto a 1080p canvas, then I would have thought applying a video filter in HB when compressing that source would yield a "smoother" looking picture on a 1080p TV than if you started with a 480p preset. Filtering would seem to be a form of interpolation in this case, yes/no?
Fingers crossed that I haven't crossed the PITA line yet...
Also, I was a little surprised about you saying HB doesn't do any interpolating. If you started with a 480p DVD source but used a 1080p HB preset (like Iwio did) i.e. you're mapping a 480p image onto a 1080p canvas, then I would have thought applying a video filter in HB when compressing that source would yield a "smoother" looking picture on a 1080p TV than if you started with a 480p preset. Filtering would seem to be a form of interpolation in this case, yes/no?
Fingers crossed that I haven't crossed the PITA line yet...
Re: Good rule of thumb for compressing a DVD using H.265
You're not mapping 480p into 1080p. You are limiting the output to a maximum resolution of 1080p. If the input is smaller, it will remain at the original resolution. If it's bigger, it will be scaled down to 1080p.
If you want upscaling, then you need to consider learning the command line interface.
Oh, and the real benefits of h.265 encoding won't be seen below 1080p in normal usage.
If you want upscaling, then you need to consider learning the command line interface.
Oh, and the real benefits of h.265 encoding won't be seen below 1080p in normal usage.
Re: Good rule of thumb for compressing a DVD using H.265
No, HB isn't doing any of that with the GUI that most users use. A 480p input with a 1080p preset produces at 480p output at relatively low quality.MickM wrote: ↑Sat Jan 29, 2022 12:12 amAlso, I was a little surprised about you saying HB doesn't do any interpolating. If you started with a 480p DVD source but used a 1080p HB preset (like Iwio did) i.e. you're mapping a 480p image onto a 1080p canvas, then I would have thought applying a video filter in HB when compressing that source would yield a "smoother" looking picture on a 1080p TV than if you started with a 480p preset. Filtering would seem to be a form of interpolation in this case, yes/no?
Not until 4K for typical cases. 1080p/1440p for lower quality encodes, perhaps.
Re: Good rule of thumb for compressing a DVD using H.265
Interestingly, in my last very lengthy, but flawed, attempt to compress my library I used HandBrakeCLI and a bash script (because HandBrake's batch capabilities were so inadequate, from memory). Here's where my understanding gets a little mirky. I was told in the forums that the HandBrake GUI was no longer a front end for HandBrakeCLI and I assumed therefore that the GUI was capable of configurations simply no longer possible to describe in HandBrakeCLI i.e. HandBrake had progressed, leaving behind HandBrakeCLI. I was advised to create my own preset in the GUI and then simply invoke it in HandBrakeCLI so I could get the batch capability I needed. Based on your comments, it sounds like HandBrake and HandBrakeCLI have mutually exclusive capabilities which (if true) is disappointingly "messy".
So I totally get that h.265 (the original purpose of this thread) is a lost cause, and that's fine. However, my quest to get the best looking DVD source material on a 1k/4k TV is still fuzzy. If I use HandBrake then a HQ 480p preset is the way to go, but apparently there are benefits to upscaling a DVD for viewing on a 1k/4k TV (and that can only be realized using HandBrakeCLI). Do I have that right? Given that I'm going to be using HandBrakeCLI anyway, are there any corresponding tips? Am I falling down a rathole?
With every post I feel guiltier and guiltier about taxing the time and knowledge of the two obvious experts helping me out...
So I totally get that h.265 (the original purpose of this thread) is a lost cause, and that's fine. However, my quest to get the best looking DVD source material on a 1k/4k TV is still fuzzy. If I use HandBrake then a HQ 480p preset is the way to go, but apparently there are benefits to upscaling a DVD for viewing on a 1k/4k TV (and that can only be realized using HandBrakeCLI). Do I have that right? Given that I'm going to be using HandBrakeCLI anyway, are there any corresponding tips? Am I falling down a rathole?
With every post I feel guiltier and guiltier about taxing the time and knowledge of the two obvious experts helping me out...
-
- Veteran User
- Posts: 4854
- Joined: Wed May 04, 2011 11:06 pm
Re: Good rule of thumb for compressing a DVD using H.265
I believe you can now upscale in the GUI.
Regarding the GUI vs CLI, there are sometimes different features/settings but I believe the developers try to keep them similar.
Upscaling is generally best left to the playback device as they are usually better at it.
Regarding the GUI vs CLI, there are sometimes different features/settings but I believe the developers try to keep them similar.
Upscaling is generally best left to the playback device as they are usually better at it.
Re: Good rule of thumb for compressing a DVD using H.265
Hey, don't go calling me an expert! ![Smile :)](./images/smilies/icon_smile.gif)
h.265 is the "new hotness", so everyone thinks it is the way to go. For some devices, that may be. Others older than 4 years, not so much. In theory, any device that can display 4K should have h.265 hardware decode, but that isn't really the case. Several of my displays are fine up to 24Hz refresh, but degrade badly at 30Hz.
Upscaling has its own issues. Some devices work really well at upscaling a 480p source to 1080p, but not so much going all the way to 2160p. You're essentially making every pixel in the source be a 5x5 pixel on the screen. Edge softening has its limits, so the result is going to look blocky up close. The further you are from the display, though, the more your brain smooths that out to make it "acceptable".
My philosophy on this video stuff: It's all entertainment, including the game of getting what I consider "best results". I'm the only one I have to please, and the "playing pieces" are free. If at first I don't succeed, there's another round coming up.What pleases me won't necessarily please anyone else, unless they're trying to do the same thing as me. Even then, it's their brain interpreting the results. My brain isn't a "universal fit" model.
The GUI is intended for "most" people who do not want to tweak a lot. In the old days, the GUI simply created a command line for you, then passed that to the CLI. It deliberately does NOT do everything handbrake allows, without getting into territory of "advanced options" that don't make sense unless you understand how individual encoders work. A lot of videos on YouTube are the result, leading people down paths they don't understand, because "someone" thought it was useful.
The CLI where you can do things the GUI hides from novices. 99% of the time, I use the CLI, not because I want to do something the GUI cannot do, but because I want to script it.
The presets built as default for the GUI were intended to cover the majority of encoding jobs. People who know exactly what tweaking parameter X does created them, so they're good places to start when you hit a case where they don't quite do what you want.
![Smile :)](./images/smilies/icon_smile.gif)
h.265 is the "new hotness", so everyone thinks it is the way to go. For some devices, that may be. Others older than 4 years, not so much. In theory, any device that can display 4K should have h.265 hardware decode, but that isn't really the case. Several of my displays are fine up to 24Hz refresh, but degrade badly at 30Hz.
Upscaling has its own issues. Some devices work really well at upscaling a 480p source to 1080p, but not so much going all the way to 2160p. You're essentially making every pixel in the source be a 5x5 pixel on the screen. Edge softening has its limits, so the result is going to look blocky up close. The further you are from the display, though, the more your brain smooths that out to make it "acceptable".
My philosophy on this video stuff: It's all entertainment, including the game of getting what I consider "best results". I'm the only one I have to please, and the "playing pieces" are free. If at first I don't succeed, there's another round coming up.What pleases me won't necessarily please anyone else, unless they're trying to do the same thing as me. Even then, it's their brain interpreting the results. My brain isn't a "universal fit" model.
The GUI is intended for "most" people who do not want to tweak a lot. In the old days, the GUI simply created a command line for you, then passed that to the CLI. It deliberately does NOT do everything handbrake allows, without getting into territory of "advanced options" that don't make sense unless you understand how individual encoders work. A lot of videos on YouTube are the result, leading people down paths they don't understand, because "someone" thought it was useful.
The CLI where you can do things the GUI hides from novices. 99% of the time, I use the CLI, not because I want to do something the GUI cannot do, but because I want to script it.
The presets built as default for the GUI were intended to cover the majority of encoding jobs. People who know exactly what tweaking parameter X does created them, so they're good places to start when you hit a case where they don't quite do what you want.
Re: Good rule of thumb for compressing a DVD using H.265
OK, I think my thoughts have crystallized. I have long ago drawn the same conclusion as Woodstock for my music library i.e. I reduced my library size by 75% just by tossing all the songs I didn't like vs keeping everything on every album for completeness sake. Now I can listen to an artist or randomize my playback and I like everything I hear (and screw everybody else who I might share my library with, which frankly has proven to be nobody).
I'm going to let my smart TV deal with all the interpolating/upscaling and fall back onto a HQ 480p preset. Job done, agonizing over. Hopefully VLC will also do similar upscaling as my TV if I choose to do my playback on my Mac or iPad (not sure about VLC's capabilities regarding that). That approach will just leave me with the disgusting, ugly soft/forced subtitles issue that HandBrake can't clean up:
viewtopic.php?t=42085
This is fixable via Subler's OCR capability (that I sorely wish HB had), but it's only available in the GUI and missing in SublerCLI i.e. it's a manual operation.
Many thanks to the experts (everything is relative!) regarding the video compression. Once I get the forced subtitles issue sorted out I'll be ready to go.
I'm going to let my smart TV deal with all the interpolating/upscaling and fall back onto a HQ 480p preset. Job done, agonizing over. Hopefully VLC will also do similar upscaling as my TV if I choose to do my playback on my Mac or iPad (not sure about VLC's capabilities regarding that). That approach will just leave me with the disgusting, ugly soft/forced subtitles issue that HandBrake can't clean up:
viewtopic.php?t=42085
This is fixable via Subler's OCR capability (that I sorely wish HB had), but it's only available in the GUI and missing in SublerCLI i.e. it's a manual operation.
Many thanks to the experts (everything is relative!) regarding the video compression. Once I get the forced subtitles issue sorted out I'll be ready to go.
Re: Good rule of thumb for compressing a DVD using H.265
HB GUI generally lags behind the CLI in terms of features and capabilities. The change you're referring to is the HB GUI no longer generates a call to the HB CLI to run an encode, but now calls the same underlying libraries itself.MickM wrote: ↑Sat Jan 29, 2022 4:58 pm Interestingly, in my last very lengthy, but flawed, attempt to compress my library I used HandBrakeCLI and a bash script (because HandBrake's batch capabilities were so inadequate, from memory). Here's where my understanding gets a little mirky. I was told in the forums that the HandBrake GUI was no longer a front end for HandBrakeCLI and I assumed therefore that the GUI was capable of configurations simply no longer possible to describe in HandBrakeCLI i.e. HandBrake had progressed, leaving behind HandBrakeCLI. I was advised to create my own preset in the GUI and then simply invoke it in HandBrakeCLI so I could get the batch capability I needed. Based on your comments, it sounds like HandBrake and HandBrakeCLI have mutually exclusive capabilities which (if true) is disappointingly "messy".
So I totally get that h.265 (the original purpose of this thread) is a lost cause, and that's fine. However, my quest to get the best looking DVD source material on a 1k/4k TV is still fuzzy. If I use HandBrake then a HQ 480p preset is the way to go, but apparently there are benefits to upscaling a DVD for viewing on a 1k/4k TV (and that can only be realized using HandBrakeCLI). Do I have that right? Given that I'm going to be using HandBrakeCLI anyway, are there any corresponding tips? Am I falling down a rathole?
With every post I feel guiltier and guiltier about taxing the time and knowledge of the two obvious experts helping me out...
Upscaling at encode time is not the best practice, unless you have a broken playback environment that is incapable of upscaling or does especially poorly at it.
Re: Good rule of thumb for compressing a DVD using H.265
Only because you cracked open the can of worms a little
![Wink ;-)](./images/smilies/icon_wink.gif)
(all this coming from somebody who has absolutely no idea about what's involved, and doesn't appreciate the reasons the two diverged in the first place)
Re: Good rule of thumb for compressing a DVD using H.265
The HB libraries the GUI calls has all the features that are exposed in the CLI, they're just not exposed in the GUI.
Re: Good rule of thumb for compressing a DVD using H.265
If I'm interpreting your post right, that would imply the GUI *could* indeed write out a completely equivalent HandBrakeCLI command line. Now I'm back to being confused - I was told earlier in the forums that wasn't doable. Sorry if I'm flogging a dead horse.
Re: Good rule of thumb for compressing a DVD using H.265
The GUI used to write out a command line. It was changed a few years ago to use the same underlying library as the CLI rather than compositing a command line to call.
But the features of the GUI haven't matched the features of the CLI, historically, regardless of the interface.
But the features of the GUI haven't matched the features of the CLI, historically, regardless of the interface.
-
- Veteran User
- Posts: 4854
- Joined: Wed May 04, 2011 11:06 pm
Re: Good rule of thumb for compressing a DVD using H.265
Going back to your initial issues of not great quality DVD encodes on a big screen 4k TV, I'd argue the problems may not be with the encoder or settings it may just be that DVDs are getting to be an old format. You might be better off just remuxing them to mkv's to preserve quality.