Is the x265 10-bit workflow pipeline 10-bit ENTIRELY in Handbrake?

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
BobbyBoberton
Posts: 4
Joined: Sun Jul 26, 2020 8:36 pm

Is the x265 10-bit workflow pipeline 10-bit ENTIRELY in Handbrake?

Post by BobbyBoberton »

Description of problem or question:

I was recently told that handbrake could not handle HDR10 metadata properly because the workflow pipeline is not entirely 10-bit and therefore could not possibly support HDR10 metadata conservation from the source material. I have solved the problem of conserving HDR10 metadata by using FFmpeg through CLI or something like StaxRip but I have gotten conflicting info as to whether the handbrake x265 10-bit pipeline is ENTIRELY 10-bit or not. Can you answer it?


Steps to reproduce the problem (If Applicable):

N/A


HandBrake version (e.g., 1.0.0):

Currently installed version 1.3.3


Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):

Windows 10 1909 pro-64-bit (feature update 2004 hasn't been 'compatible' yet)


HandBrake Activity Log ***required*** (see How-to get an activity log)

no logs required, just asking questions about the general program x265 10-bit pipeline.
Deleted User 11865

Re: Is the x265 10-bit workflow pipeline 10-bit ENTIRELY in Handbrake?

Post by Deleted User 11865 »

No. HandBrake is 8-bit throughout, the 10-bit encoder receives 8-bit input.
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Is the x265 10-bit workflow pipeline 10-bit ENTIRELY in Handbrake?

Post by mduell »

The bit depth issue is independent of the HDR metadata issue.
BobbyBoberton
Posts: 4
Joined: Sun Jul 26, 2020 8:36 pm

Re: Is the x265 10-bit workflow pipeline 10-bit ENTIRELY in Handbrake?

Post by BobbyBoberton »

ok, so would a video that is 10-bit to start with lose some information/quality by running it through handbrake as it must be taken as an 8-bit source?

The overall picture here is are my '10-bit' encodes actually 10-bit (using libx265 main 10) or not really?

If I ran it through something like staxrip which is basically just a GUI for FFmpeg/x265/other codecs be better if I am looking to preserve all the 10-bit info from a 10-bit source? I get it if I am starting out with an 8-bit source then I am not really losing anything by using handbrake but if the source is already 10-bit would I be better served using something else?
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Is the x265 10-bit workflow pipeline 10-bit ENTIRELY in Handbrake?

Post by mduell »

Any 10 bit HDR input will be converted to 8 bit SDR in HB, and then output as 10 bit SDR if you choose a 10 bit encoder.

Yes, if you want 10 bit (optionally HDR), you're better with something other than HB that supports 10 bit and optionally HDR.
BobbyBoberton
Posts: 4
Joined: Sun Jul 26, 2020 8:36 pm

Re: Is the x265 10-bit workflow pipeline 10-bit ENTIRELY in Handbrake?

Post by BobbyBoberton »

ok but if the 10-bit input was already SDR is there any actual info lost? Because I can definitely generate 10-bit SDR x265 files through handbrake by using x265 main 10 profile, so as long as the 10-bit source wasn't HDR then there is no actual loss?
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Is the x265 10-bit workflow pipeline 10-bit ENTIRELY in Handbrake?

Post by mduell »

Yes, as stated several places above, all 10 bit input will be converted to 8 bit in HB, regardless of your output bit depth.
BobbyBoberton
Posts: 4
Joined: Sun Jul 26, 2020 8:36 pm

Re: Is the x265 10-bit workflow pipeline 10-bit ENTIRELY in Handbrake?

Post by BobbyBoberton »

Ok, I am not trying to be difficult, I am just having a hard time understanding why you would allow 10 or 12 bit depth output but force 8-bit depth input.

These are serious questions, they may seem dumb or like I am trolling you but I am just trying to get the truth.

If the source is 8-bit SDR x264 and you convert to 10-bit SDR x265 there should be no 'loss' of quality or information from the source as it was 8-bit to begin with yes? (pixel-wise at least, obviously there can be loss of quality/info from the encoder being used)

If the source is 10-bit SDR x264 and you convert to 10-bit SDR x265 then some 'loss' of quality or information should be expected as the 10-bit SDR x264 has to be changed to 8-bit YUV420p bitstream instead of YUV420p10le right?

I know the 'preservation of HDR' is a bit different than these questions so I will leave it like that. I just didn't want you to think I was trolling you or trying to make this a repetitive nightmare thread with the same questions over and over again.
Deleted User 11865

Re: Is the x265 10-bit workflow pipeline 10-bit ENTIRELY in Handbrake?

Post by Deleted User 11865 »

Because the code to support a 10-bit pipeline hasn't been written yet and the volunteer developers do not have enough time to work on it.
Deleted User 13735

Re: Is the x265 10-bit workflow pipeline 10-bit ENTIRELY in Handbrake?

Post by Deleted User 13735 »

I might add that that is a major undertaking. Pretty much ground-up according to other developers.
You may get a little residual banding from the 8 bit pipeline, but having done the tests, Handbrake's dither algorithm is already the best.
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Is the x265 10-bit workflow pipeline 10-bit ENTIRELY in Handbrake?

Post by mduell »

BobbyBoberton wrote: Mon Jul 27, 2020 7:36 pm Ok, I am not trying to be difficult, I am just having a hard time understanding why you would allow 10 or 12 bit depth output but force 8-bit depth input.

These are serious questions, they may seem dumb or like I am trolling you but I am just trying to get the truth.

If the source is 8-bit SDR x264 and you convert to 10-bit SDR x265 there should be no 'loss' of quality or information from the source as it was 8-bit to begin with yes? (pixel-wise at least, obviously there can be loss of quality/info from the encoder being used)

If the source is 10-bit SDR x264 and you convert to 10-bit SDR x265 then some 'loss' of quality or information should be expected as the 10-bit SDR x264 has to be changed to 8-bit YUV420p bitstream instead of YUV420p10le right?

I know the 'preservation of HDR' is a bit different than these questions so I will leave it like that. I just didn't want you to think I was trolling you or trying to make this a repetitive nightmare thread with the same questions over and over again.
10 bit output was mostly just dropping in the new encoder libraries, so it was easy.
Nobody has proposed a patch for a 10 bit video pipeline.
paulanderegg
Posts: 16
Joined: Sat Oct 06, 2018 9:27 pm

Re: Is the x265 10-bit workflow pipeline 10-bit ENTIRELY in Handbrake?

Post by paulanderegg »

I shoot 8 bit 4:2:0 4K HLG on my Sony camera. I convert my footage to HDR10, and looking for a final file that is 10 bit 4:2:0 1080p HDR10. If I am downsampling 4K 8 bit to 1080p 10 bit, since I am putting 8 bit into the pipeline...am I generating new 1080p 10 bit pixel values averaged from the 8 bit 4K input? I am on the line between shooting 8 bit 4K downsampling to 1080p, or shooting 10 bit 1080p for my HDR work. The downsampled detail is better, but am I missing out on true end to end 10 bit WCG on my end product? I am not sure how to test this. My expecations are either four 8 bit
pixel values are averaged for a new and unique single 10 bit HD pixel, or there is binning going on, and three of the four pixel data are simply discarded and a single pizel is chosen and converter to it's exact 10 bit value.

Beside being sharper, downsizing from 4K to HD also allows me to better use noise reduction and stabilization in post without blurring the more imited amoutn of pixels availabkle in HD.

Paul
Deleted User 13735

Re: Is the x265 10-bit workflow pipeline 10-bit ENTIRELY in Handbrake?

Post by Deleted User 13735 »

Handbrake can use Lanczos scaling. I prefer it to Bicubic for most work.

Downsampling real ten bit source to 8 bit introduces some rounding jitter that may appear as smoother banding, sometimes at the collateral of increased shadow noise and appearance of graininess. However, Handbrake may dither better than some high-priced editors, making it entirely a personal choice based on one's own testing.
paulanderegg
Posts: 16
Joined: Sat Oct 06, 2018 9:27 pm

Re: Is the x265 10-bit workflow pipeline 10-bit ENTIRELY in Handbrake?

Post by paulanderegg »

Trieed throwing the 4K 8 bit file at Handbrake as 4K 8 bit and 4K 10 bit ProRes....downsampled to 10 bit 1080p...the ProRes version has much less banding, even though the original data was always 8 bit camera raw. :-\

Paul
Post Reply