With upcoming changes to data protection and privacy laws in Europe coming into effect soon, we thought this would be a good time to remind everyone that we do have a privacy policy.
This applies to all users and visitors world-wide.

We have made a few changes to the language to make it clearer in relation to this new regulation but fundamentally, the terms and your rights are unchanged.

If you have any questions about this, please feel free to ask in the General Forum

Ripping BR/DVD as HEVC 10/12-bit?

General discussion of HandBrake, Video and/or audio transcoding, trends etc.
Forum rules
Please be aware, this forum is not for support or help related to HandBrake. Please keep such discussions to the Community Support forum sections.
Post Reply
oRBIT2002
Posts: 67
Joined: Sun Nov 01, 2009 11:22 am

Ripping BR/DVD as HEVC 10/12-bit?

Post by oRBIT2002 » Sun Jan 14, 2018 11:34 am

Is there a reason to encode BR/DVD-rips as 10/12-bits HEVC? I don't think there is but still I am not sure if there's a quality-gain of some sort...?

User avatar
BradleyS
Moderator
Posts: 1279
Joined: Thu Aug 09, 2007 12:16 pm

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by BradleyS » Sun Jan 14, 2018 3:00 pm

Not really. BD/DVD are 8-bit and so is HandBrake’s pipeline.

Woodstock
Veteran User
Posts: 2540
Joined: Tue Aug 27, 2013 6:39 am

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by Woodstock » Sun Jan 14, 2018 10:47 pm

But, but, but! With 12-bit encodes, you can more precisely portray the artifacts! :)

Jonny G
New User
Posts: 1
Joined: Mon Jan 15, 2018 4:06 pm

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by Jonny G » Mon Jan 15, 2018 4:10 pm

What if I’m re-encoding a 4K 10 bit video file? If I select the h265 10 bit encoder (from the nightly build), will the resulting file retain the information from the original, or does the fact that HB’s pipeline is 8 bit make it pointless?

User avatar
BradleyS
Moderator
Posts: 1279
Joined: Thu Aug 09, 2007 12:16 pm

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by BradleyS » Mon Jan 15, 2018 6:36 pm

Down the road it won't be pointless, but no ETA on that. Currently, anything HandBrake opens is converted to 8-bit at some point.

User avatar
JohnAStebbins
HandBrake Team
Posts: 5117
Joined: Sat Feb 09, 2008 7:21 pm

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by JohnAStebbins » Mon Jan 15, 2018 7:35 pm

Keep in mind that what is being stored in 10/12 bits is not the original spatial domain pixel values, but rather the temporal domain coefficients. When converting from spatial to temporal, there are rounding errors where information is lost. Also, coefficients are deliberately quantized (more information loss). By storing 10/12 bit coefficients, there is less loss and the reconstruction tends to have less banding artefacts. Also, due to less loss, the reconstruction is more accurate which, under some circumstances, allows for greater compression at the same bitrate.

User avatar
BradleyS
Moderator
Posts: 1279
Joined: Thu Aug 09, 2007 12:16 pm

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by BradleyS » Mon Jan 15, 2018 8:04 pm

Indeed. In practice, 10-/12-bit files sometimes turn out smaller even with an 8-bit source. So your mileage may vary.

rollin_eng
Veteran User
Posts: 2737
Joined: Wed May 04, 2011 11:06 pm

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by rollin_eng » Mon Jan 15, 2018 8:39 pm

I guess a good question is “Can a 10/12 bit encode ever be worse/bigger than an 8 bit encode?”

User avatar
BradleyS
Moderator
Posts: 1279
Joined: Thu Aug 09, 2007 12:16 pm

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by BradleyS » Mon Jan 15, 2018 8:41 pm

In theory, they should always be smaller given 8-bit input. In practice, I've seen some larger.

User avatar
Rodeo
HandBrake Team
Posts: 11862
Joined: Tue Mar 03, 2009 8:55 pm

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by Rodeo » Mon Jan 15, 2018 8:43 pm

All other settings being the same, my guess would be no, speaking in terms of compression efficiency (additional detail could be retained, pushing the output size up a bit). Not sure what the encoding performance hit of higher bit depths is nowadays though.

mduell
Veteran User
Posts: 5953
Joined: Sat Apr 21, 2007 8:54 pm

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by mduell » Mon Jan 15, 2018 10:43 pm

JohnAStebbins wrote:
Mon Jan 15, 2018 7:35 pm
Also, due to less loss, the reconstruction is more accurate which, under some circumstances, allows for greater compression at the same bitrate.
So why aren't they doing 16-bit or more...

User avatar
Rodeo
HandBrake Team
Posts: 11862
Joined: Tue Mar 03, 2009 8:55 pm

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by Rodeo » Mon Jan 15, 2018 11:08 pm

Diminishing returns and encoding performance?

musicvid
Veteran User
Posts: 3049
Joined: Sat Jun 27, 2009 1:19 am

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by musicvid » Tue Jan 16, 2018 3:37 am

In any >8 bit -> 8 bit downconversion, whether at the beginning (from source) or end of the pipeline (to encoder), a transformation called dithering always takes place. This smooths repetitive pixel jaggies from downsampling to a more randomized pattern that is less obvious to the eye. It's been around as long as photographs began to be reproduced for newspapers in the 1800s and is present in every video encoding chain in one form or another.

This pixel randomization (noise) far exceeds the ability of any high bit source or float point processing to overcome the damage that has been, or will be done to the definition as a result of downconversion anywhere in the chain. For that reason, unless there is >=10 bit integrity from door to door, all other considerations would seem to be moot, or imaginative.

Even if dithering did not occur, losses from downsampling and pixel decimation are irreversible.

Some encoders do a better job of dithering than others, and Handbrake is one of them. So if I have to downconvert, I give Handbrake 10 bit source, because the output has less banding and dithering "wash" than my expensive NLE. If you are giving Handbrake a YUV digital intermediate, I always suggest 10 bit.

This impression is the result of tests I ran five years ago. If anyone has controlled, quantifiable results that challenge this impression, I welcome them.

User avatar
Rodeo
HandBrake Team
Posts: 11862
Joined: Tue Mar 03, 2009 8:55 pm

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by Rodeo » Tue Jan 16, 2018 8:44 am

Well, we're discussing 8-bit input here anyway :P

musicvid
Veteran User
Posts: 3049
Joined: Sat Jun 27, 2009 1:19 am

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by musicvid » Tue Jan 16, 2018 9:42 am

... which makes internal float processing or 10 bit encoding a nothing burger in this case, as people like to say. Lots of discussion on the internet, but quantified evidence is pretty slim.

User avatar
Rodeo
HandBrake Team
Posts: 11862
Joined: Tue Mar 03, 2009 8:55 pm

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by Rodeo » Tue Jan 16, 2018 10:13 am

Internal float processing?

musicvid
Veteran User
Posts: 3049
Joined: Sat Jun 27, 2009 1:19 am

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by musicvid » Tue Jan 16, 2018 4:31 pm

32-bit float internal processing is sometimes used in editing with 10/12 bit source for filtering and grading precision, even if the encode is to be 8-bit. The logic is to put the downsampling and dithering last.

That said, I think that most requests for this stuff are made for the wrong reasons. I personally would use it with 10 bit yuv intermediates from my editor. However, if someone asked "who among us" is enthusiastic about rewriting the encoding engine and filters in Handbrake from the ground up, the room would surely go silent. That's not a criticism, it just an astronomical undertaking to consider.

8-bit integer math is right for processing and rendering 8-bit source. I'm a big critic of alchemic thinking on the internet, which would sometimes have us believe otherwise. End of political speech, I'm going back in my hole until Groundhog Day.

User avatar
BradleyS
Moderator
Posts: 1279
Joined: Thu Aug 09, 2007 12:16 pm

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by BradleyS » Tue Jan 16, 2018 4:40 pm

Indeed, it's a bit heavy to rewrite HandBrake's pipeline to support 10-/12-bit YUV, not to mention other color formats. John's made some progress in private, if I recall correctly.

musicvid
Veteran User
Posts: 3049
Joined: Sat Jun 27, 2009 1:19 am

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by musicvid » Tue Jan 16, 2018 5:46 pm

I think getting x265 REC 2020 out the door uncompromised from 10 bit source would be a righteous goal, at least during my lifetime.

User avatar
BradleyS
Moderator
Posts: 1279
Joined: Thu Aug 09, 2007 12:16 pm

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by BradleyS » Tue Jan 16, 2018 6:03 pm

That's the plan. Takes time, and I don't know your age, but I think we can manage that. :D

musicvid
Veteran User
Posts: 3049
Joined: Sat Jun 27, 2009 1:19 am

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by musicvid » Tue Jan 16, 2018 6:48 pm

May want you hedge your bets a little, I'm 68.

User avatar
BradleyS
Moderator
Posts: 1279
Joined: Thu Aug 09, 2007 12:16 pm

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by BradleyS » Tue Jan 16, 2018 7:12 pm

Little over 30 years on me! Still, none of us knows what tomorrow holds, right? Hope you stay well!

oRBIT2002
Posts: 67
Joined: Sun Nov 01, 2009 11:22 am

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by oRBIT2002 » Wed Jan 17, 2018 7:50 pm

Perhaps a stupid question but if Handbrake only supports 8-bit, there's still 10/12-bit options available for HEVC-encoding. What's the point of that?

User avatar
JohnAStebbins
HandBrake Team
Posts: 5117
Joined: Sat Feb 09, 2008 7:21 pm

Re: Ripping BR/DVD as HEVC 10/12-bit?

Post by JohnAStebbins » Wed Jan 17, 2018 8:00 pm

oRBIT2002 wrote:
Wed Jan 17, 2018 7:50 pm
Perhaps a stupid question but if Handbrake only supports 8-bit, there's still 10/12-bit options available for HEVC-encoding. What's the point of that?
viewtopic.php?f=6&t=37297&p=176079#p176037

Post Reply