1

I have a 10-bit XAVC-HS file encoded with yuv422p10le pixel format and would like to render it out of my NLE, but my GPU does not support this. It does, however, support yuv444p and yuv444p16. Can I encode in either of those without losing information, since 16 bits should just straight up save more information?

I need to reencode in a format that preserves everything because due to workflow we need to chain two different NLEs. This is out of my hands. However, since there are a lot of files, I would rather render for five hours on the GPU than for 50 hours on my CPU.

Additional Details in case they are useful

The input file is straight out of a Sony ILME-FX3 in XAVC-HS 4k 200M 4:2:2 mode, which to my understanding outputs 10-bit h.265 files. I am rendering on an NVIDIA card under GNU/Linux, which severely limits compatibility. The program with which I am exporting gives me the choice between "h.265/HEVC", "ProRes", and "DNxHD". I figured that since I am already in h.265, the former would probably be the best choice for lossless conversion, but I may well be wrong there.

The files are in slog, and LUTs and colour grading are done on the reencoded files, so I really do not want to lose colour information in this step.

Edit: choosing the h.265 yuv444p16le rendering shrinks my test file from 2.3G to 1.5G, which makes me rather suspicious.

2 Answers 2

0

No, bit depth reduction always results in information loss, and even the chroma upscaling, while usually reversible with knowledge about the upscaling algorithm and the right algorithm to reverse it, is, without that special knowledge, technically not lossless either.

However, for practical use cases, the perceptual loss in such a conversion can be virtually nonexistent, if dithering is used in the conversion step, as should always be done during bit depth reductions.

But I'm not sure that you actually want lossless encoding, because except for H.265, none of the mentioned formats are able to encode losslessly, and H.265 is not particularly good at lossless encoding. So, be careful how you use that word. If you mean perceptually lossless, don't call it lossless.

For lossy encoding, using the same format as the input format indeed provides advantages, although it's probably not that important here, considering that your camera encoder should have very different behaviour from a proper CPU encoder like the common x265.

H.265 does not support 16 bit, the highest it supports is 12 bits. And every encoder has at least two important parameters that should always be set consciously by the user: effort/speed and quality/bitrate. In this case you want to set the effort/speed parameter "preset" (I highly recommend value "slow"), and the quality parameter "crf" (lower means higher quality). Always make sure to encode in a bit depth of at least 10 when doing lossy encoding, if possible, to prevent ugly banding artifacts.

0

Shot answer: No, not really. While 16-bit does allow for a wider range compared to 10-bit, you won't be able to recover the information that has been lost when saving it in 10-bit initially. Therefore, converting to yub444p16 will involve some form of interpolation/upsampling. This could introduce some quality differences, but in my experience they are very subtle. You will have to try for yourself if they are acceptable though.

You can use the following two commands to change the format:

ffmpeg -i input.yuv -pix_fmt yuv444p output.yuv
ffmpeg -i input.yuv -pix_fmt yuv444p16 output.yuv

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.