Handbrake Vs little or no loss of quality?

HandBrake for Mac 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
EightyEight
Posts: 2
Joined: Tue Jul 14, 2009 11:30 am

Handbrake Vs little or no loss of quality?

Post by EightyEight »

Yes another noob here. I’ve been playing with the svn2592 build of Handbrake and Plex over the last week and so far I’ve had no problems. But the more I read the more I get confused or concerned about video quality and audio formats.

I want the best quality rips from my DVDs I can get with little or no loss of sound quality – as the MacMini (Running PLEX) will be connected to a home-cinema-receiver via an optical cable then the receiver will be connected to a 50" Plasma.

I’ve done some rips using various settings listed on these forums. I’ve settled on:
70% Consistent Quality
6 Reference frames
3 B-Frames
CABAC: Checked
Detelecine: Default
Decomb: Default
Anamorphic: Loose
Everything else untouched.

When it comes to Audio-settings I’m less convinced and have questions: I’ve tried ripping ‘The Bourne Identity’ which has a DTS audio track. This is where I get confused – I’ve read (on here I think) that a MacMini can’t output AAC through the optical cable – is this correct? Is AC3 better than AAC? And lastly, if I want to keep the DTS audio then should I be using MacTheRipper for those DTS disks instead of Handbrake? Likewise, should I be using Handbrake if I want the best quality possible?

I’ve search many forums about video and audio quality using Handbrake and got a whole bunch of different info. I hope someone can help me out.

Thanks in advance.
hunterk
Bright Spark User
Posts: 179
Joined: Tue Jun 03, 2008 2:27 pm

Re: Handbrake Vs little or no loss of quality?

Post by hunterk »

You can maintain DVD-exact audio quality using passthru, either DTS (only available in mkv container using recent developer snapshot; not available in 0.9.3) or AC3 (m4v or mkv). With either of these options, the audio won't be reencoded, so there will be no quality loss. This is obviously the best option, quality-wise. Encoding to AAC will incur a quality loss no matter what.

Also, if those video settings are working for you, that's fine, but you could play around with other advanced x264 options to achieve smaller filesizes without sacrificing quality (big ones include setting subme to 9 and trellis to 2; checking mixed-refs and pyramidal b-frames can also help, as well as using umh for the motion estimation method). Like I said though: it's up to you.
And lastly, if I want to keep the DTS audio then should I be using MacTheRipper for those DTS disks instead of Handbrake? Likewise, should I be using Handbrake if I want the best quality possible?
Using Handbrake will result in some video quality loss since x264 is a lossy codec, though how much depends on your settings (constant quality of ~62% or higher is generally considered quality-transparent). If you don't mind your movies taking up a ton of space, leaving an untouched rip from MacTheRipper (for example) will not incur this loss.
EightyEight
Posts: 2
Joined: Tue Jul 14, 2009 11:30 am

Re: Handbrake Vs little or no loss of quality?

Post by EightyEight »

Excellent. Thanks for the reply. I couldn’t figure out why when I selected DTS as the source and it wouldn’t let select DTS or AC3 passthrough – so thanks for pointing me in the right direction of ‘mkv’ Thats the sound issues sorted, I’ll now experiment with the other x264 options you suggested.

All those settings and options baffle me – will settings be consistent for all films or will I need to experiment (The only source will be DVD)?

Thanks
hunterk
Bright Spark User
Posts: 179
Joined: Tue Jun 03, 2008 2:27 pm

Re: Handbrake Vs little or no loss of quality?

Post by hunterk »

The settings will not always be exactly consistent, but people often find a good setup or two that work for most things. All of the esoteric options can definitely be daunting at first, but the HandBrake wiki does a great job of explaining them. A couple of major things to keep in mind are:

live action vs. animation: animation can benefit from many more B-frames (I crank it up to 16 b-frames and use adaptive b-frames to let HandBrake decide how many to use), deblocking can be more aggressive (I often use 2,2 for animation), and no-fast-pskip can help get rid of some blocking on wide patches of color that are common in animation.

lots of motion vs. not much motion: you can tweak the motion detection settings for sources with a lot of motion. This isn't something I know much about, but you can do some experimenting on your own to find what works for you.

I personally have 2 self-made presets that I like, 1 for animation and 1 for live action. Depending on the source, I may tweak these a bit but they're usually pretty close to my preferences. Video encoding is subjective, so just use whatever works for you.
btmub
Posts: 5
Joined: Mon Sep 20, 2010 4:21 pm

Re: Handbrake Vs little or no loss of quality?

Post by btmub »

I also have a bunch of DVDs now being transcoded with HB. As in your case, I am also taking care of best quality for my transcodings while keeping compatibility of final results with the heterogeneous series of devices able to playback them.

Among the different x264 presets, I decided to tune up the Constant Quality one, with the following changes:

1. MKV (this lets me include AC3 passthrou, thus preserving original audio quality from the source; apart from selecting chapters and subtitles)
2. Quality slider adjusted to 65.20 (RF 17.75)
3. Picture settings adjusted to loose anamorphic (this lets x264 encoder work more efficiently, whereas the effect of re-calculating the Pixel Aspect Ratio to be multiple of 16 is neglictible for me in terms of quality loss) and autocrop

The rest of x264 settings were unchanged except the Analysis (changed to none) and DCT 8x8 (unchecked). I have read that these two settings might turn out in non-compliant MKV files for my iOS devices.

With these settings I am obtaining HQ MKVs with an average size of 1GB per movie hour aprox., with disk space savings rounding 50%. Apart from that, these settings also ensure me to have MKVs of less than 4GB in most of the cases, which is convenient for keeping compatibility (I read about this topic somewhere).

Hope this helps,
thompson
Bright Spark User
Posts: 356
Joined: Sat Dec 12, 2009 8:04 pm

Re: Handbrake Vs little or no loss of quality?

Post by thompson »

btmub wrote:2. Quality slider adjusted to 65.20 (RF 17.75)
That's overkill for SD material.
btmub wrote:3. Picture settings adjusted to loose anamorphic (this lets x264 encoder work more efficiently, whereas the effect of re-calculating the Pixel Aspect Ratio to be multiple of 16 is neglictible for me in terms of quality loss) and autocrop
and that's wrong. It used to be the case, but strict has been the preferable option for awhile now.
btmub wrote:With these settings I am obtaining HQ MKVs with an average size of 1GB per movie hour aprox., with disk space savings rounding 50%. Apart from that, these settings also ensure me to have MKVs of less than 4GB in most of the cases, which is convenient for keeping compatibility (I read about this topic somewhere).
That's pretty huge for most SD material.
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: Handbrake Vs little or no loss of quality?

Post by mduell »

btmub wrote:1. MKV (this lets me include AC3 passthrou, thus preserving original audio quality from the source; apart from selecting chapters and subtitles)
MP4 supports AC3 just fine, no need to go freetard.
btmub
Posts: 5
Joined: Mon Sep 20, 2010 4:21 pm

Re: Handbrake Vs little or no loss of quality?

Post by btmub »

mduell wrote:
btmub wrote:1. MKV (this lets me include AC3 passthrou, thus preserving original audio quality from the source; apart from selecting chapters and subtitles)
MP4 supports AC3 just fine, no need to go freetard.
Had to look for "freetard" in the urban dictionary (english is not my first language)...

Agreed, AC3 argument for choosing MKV is of no value against MP4... but try to manage chapters and subtitles with MP4/M4V and you will get into trouble.

You will have to accept at the end that MKV is a more flexible container than MP4, uh?
btmub
Posts: 5
Joined: Mon Sep 20, 2010 4:21 pm

Re: Handbrake Vs little or no loss of quality?

Post by btmub »

thompson wrote:
btmub wrote:3. Picture settings adjusted to loose anamorphic (this lets x264 encoder work more efficiently, whereas the effect of re-calculating the Pixel Aspect Ratio to be multiple of 16 is neglictible for me in terms of quality loss) and autocrop
and that's wrong. It used to be the case, but strict has been the preferable option for awhile now.
This point is still under debate... there are pros and cons for both models.

If strict appears to be on fashion, why High Profile presets are still using loose anamorphic as the default setting?
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: Handbrake Vs little or no loss of quality?

Post by mduell »

btmub wrote:
mduell wrote:
btmub wrote:1. MKV (this lets me include AC3 passthrou, thus preserving original audio quality from the source; apart from selecting chapters and subtitles)
MP4 supports AC3 just fine, no need to go freetard.
Had to look for "freetard" in the urban dictionary (english is not my first language)...

Agreed, AC3 argument for choosing MKV is of no value against MP4... but try to manage chapters and subtitles with MP4/M4V and you will get into trouble.

You will have to accept at the end that MKV is a more flexible container than MP4, uh?
I agree MKV is a more flexible container in general but the very first reason you provided was not a valid differentiator.
btmub wrote:If strict appears to be on fashion, why High Profile presets are still using loose anamorphic as the default setting?
Because the High Profile preset hasn't been updated in ages. All of the presets are pretty dated, none except High Profile turn on any filters by default.
btmub
Posts: 5
Joined: Mon Sep 20, 2010 4:21 pm

Re: Handbrake Vs little or no loss of quality?

Post by btmub »

mduell wrote:
btmub wrote:If strict appears to be on fashion, why High Profile presets are still using loose anamorphic as the default setting?
Because the High Profile preset hasn't been updated in ages. All of the presets are pretty dated, none except High Profile turn on any filters by default.
I still cannot see the difference in quality when encoding with loose instead of strict... apart from the fact that encoding with strict setting takes longer than when selecting loose.

The theory about encoding quality says that loose setting obliges the x264 encoder to add some garbage in order to get a mod16 frame size... but again, I cannot see special differences in quality whn compared to strict encodings. The other argument in favour of loose setting is to ensure compatibility with playback devices, as some of them might not feel comfortable with strict anamorphic encoded files...

I am using HB 0.9.4 32bits on an iMac late 2006 running Leopard 10.5.8... maybe some of the nightly builds can help me improve speed when encoding with strict setting? If so I am willing to give it a try.
TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: Handbrake Vs little or no loss of quality?

Post by TedJ »

No, loose anamorphic rescales the picture to mod16 (by default) and adjusts PAR to compensate... rescaling can cause artefacts. Strict anamorphic preserves the exact frame, minus cropping, at the (admittedly minor) expense of encoder efficiency.
creamyhorror
Enlightened
Posts: 134
Joined: Mon Jan 04, 2010 2:00 pm

Re: Handbrake Vs little or no loss of quality?

Post by creamyhorror »

To add to what TedJ said, the tradeoff between Strict and Loose is as follows:

Strict: prevents rescaling inaccuracies and artifacts (which always occur with non-multiple scalings). Resulting frame is invisibly padded with edge pixels to mod16 by x264. This padding, which consists of repeated edge pixels, is very efficient - more efficient than a black border.

Loose: Rescales to mod16, resulting in scaling artifacts. No padding is needed, because you've expanded or contracted the frame to mod16.

There's no reason to use Loose if compatibility isn't an issue. Loose involves rescaling the content when it isn't necessary (pointless), and scaling is damaging to quality, even if not to a large degree. Might as well let x264 pad the border efficiently and leave the exact resolution untouched.

I haven't heard any complaints about the playability of Strict anamorphic encodes, even though I've heard some old and crappy hardware might not be able to handle it. I'd be interested to hear if anyone's encountered compatibility problems with Strict.
Deleted User 11865

Re: Handbrake Vs little or no loss of quality?

Post by Deleted User 11865 »

creamyhorror wrote:I haven't heard any complaints about the playability of Strict anamorphic encodes, even though I've heard some old and crappy hardware might not be able to handle it. I'd be interested to hear if anyone's encountered compatibility problems with Strict.
Some devices (including H.264 decoding hardware on some graphics cards, and even some Blu-Ray players, IIRC) have trouble playing videos where the dimensions don't divide cleanly by 4. The PS3 reportedly also had similar issues but, AFAICT, it should be OK with current firmware.
btmub
Posts: 5
Joined: Mon Sep 20, 2010 4:21 pm

Re: Handbrake Vs little or no loss of quality?

Post by btmub »

I just changed my x264 settings thus applying your suggestions and comparing results with my former settings (see my first post above for details).

Now I am using the High Profile preset with MKV and RF 20, and applying Strict Anamorphic picture settings (rest of x264 parameters unchanged) to my DVD encodings. I am obtaining very good High Profile 3.0 files, with a reduction in file size rounding 30% compared to RF 17.75, which was defined as "overkilled". These High Profile 3.0 files are playable across all my devices, including PopcornHour A110 and a series of iPod Touch (2G and 3G) and iPad (HTTP streaming, not from local).

The only con is the significant increase in encoding times, but I cannot expect better performance due to my loved-but-rather old iMac late 2006 with Core 2 Duo 2.16GHz... maybe an upgrade is something I should start thinking of ;-)

Thank you all for your comments and suggestions, this has been a very positive thread, you just helped me to improve my encodings with HB.
Post Reply