Log in

View Full Version : x265: Should I set Blu-ray settings?


Forteen88
3rd December 2019, 13:38
I wonder, should I always set,
--colorprim bt709 --colormatrix bt709 --transfer bt709 --range limitedwhen I make x265-reencodes of Blu-ray sources, even though some Blu-ray sources don't have those settings listed when I check with MediaInfo?

excellentswordfight
3rd December 2019, 14:06
I wonder, should I always set,
when I make x265-reencodes of Blu-ray sources, even though some Blu-ray sources don't have those settings listed when I check with MediaInfo?
This is a bit of an strange question, you can ofc set it to those flags if you want the decoder to decode it like that. But ff you want the decoder to handle it the same way as the soruce (which you should want to) use the flags that corresponds with the source, unless you are converting it to something else before encoding.

So for example if you set --range limited for an source that is full range without converting it to limited range, you will get incorrect levels on playback.

Forteen88
3rd December 2019, 19:56
...
But ff you want the decoder to handle it the same way as the source (which you should want to) use the flags that corresponds with the source, unless you are converting it to something else before encoding.
...I want the reencode to be as close to the source as possible. Sometimes, those flags are not listed at all in the source Blu-ray though. Should I not set those flags when they're not set in the HD Blu-ray source-video?

microchip8
3rd December 2019, 20:44
I want the reencode to be as close to the source as possible. Sometimes, those flags are not listed at all in the source Blu-ray though. Should I not set those flags when they're not set in the HD Blu-ray source-video?

From my experience, virtually all Full HD Blu-rays come in BT709 colorspace, even if mediainfo reports nothing (there are other ways to find out but I only have tools for Linux). The color range is a bit more tricky and needs to be set on a per-file basis

Forteen88
3rd December 2019, 22:03
Thanks froggy1, I'll make frame-comparisons then (when color range is not set in Full HD Blu-rays source when I look in MediaInfo).

EDIT: Thanks FranceBB too!

FranceBB
6th December 2019, 21:55
Thanks froggy1, I'll make frame-comparisons then (when color range is not set in Full HD Blu-rays source when I look in MediaInfo).

The range is the easiest thing to check.
The vast majority of FULL HD H.264 BD are in Limited TV Range 16-235 8bit as it's often required to pass the QC, anyway you can check it with Histogram() or with VideoTek() (https://forum.doom9.org/showthread.php?p=1832846) which will show you the waveform. The big fat brown "lines" show you the border of the 16-235 limit and if the waveform stays inside those brackets, then it's Limited, if it goes outside, then it's probably Full. The bottom shows the black level, the top shows the white level.
This is for Luma, for Chroma is pretty much the same, but you'll have to check the circle with the colors in it instead.

Below you'll find two frames shot with my crappy camera a few days ago in Berlin:

Full Range (8bit) 0-255:

https://i.imgur.com/2Jeo2Tj.png

Limited TV Range (8bit) 16-235:

https://i.imgur.com/kYJliph.png

As to the colormatrix, there are others ways in which you can check whether they mastered it in BT709 or not, but it's almost always the case that they used BT709. By the way, if you don't specify anything, the decoder will have to guess and the vast majority of decoders guess BT601 for SD and BT709 for HD and FULL HD.