List of X265_CL Supported Switches

Support forum for DGDecNV
Post Reply
User avatar
AYColumbia
Posts: 87
Joined: Sun Feb 12, 2012 11:29 am

List of X265_CL Supported Switches

Post by AYColumbia »

Hi,
I just discovered the X265_CL in the DGI file and find it very useful as I use x265 software encoder. Thank you so much for adding this feature.

Is there a complete list of the switches supported? I ask because some files are different, i.e.,
source 1

Code: Select all

X265_CL --colorprim 9 --transfer 16 --colormatrix 9
   --master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,1)"
   --max-cll "866,52" --frames 2880 --chromaloc 2
source 2

Code: Select all

X265_CL --colorprim 9 --transfer 16 --colormatrix 9 --frames 2904 --chromaloc 2
Thanks again. :)
---
omay, arrylay, curlyq & associates
User avatar
Rocky
Posts: 3623
Joined: Fri Sep 06, 2019 12:57 pm

List of X265_CL Supported Switches

Post by Rocky »

Here is the algorithm for building X265_CL:

Code: Select all

if (stream is HDR PQ)
    add options for --colorprim, --transfer, and --colormatrix
    if (stream had mastering SEI)
        add option for --master-display
    if (stream had light level SEI)
        add option for --max-cll
    add options for --frames and --chromaloc
If you are not getting the mastering and light level options then the corresponding SEIs must not be present in the stream. If they are in fact present, then it is a bug and I'd like to get a stream sample.
User avatar
AYColumbia
Posts: 87
Joined: Sun Feb 12, 2012 11:29 am

List of X265_CL Supported Switches

Post by AYColumbia »

Apologies for the late response. Thanks very much for the info. So far haven't seen any issues. Seems to report correctly. I just did random checking with MediaInfo and was curious what all the available switches were. :)
---
omay, arrylay, curlyq & associates
User avatar
Rocky
Posts: 3623
Joined: Fri Sep 06, 2019 12:57 pm

List of X265_CL Supported Switches

Post by Rocky »

Great. Thank you for the update!
User avatar
AYColumbia
Posts: 87
Joined: Sun Feb 12, 2012 11:29 am

List of X265_CL Supported Switches

Post by AYColumbia »

Hi, one more question on this switch. The x265 docs have the values as strings so am wondering if it would be "better" to change the switches to use the string values rather than the number? Maybe add a switch/option that would write these as strings instead? Doing this would also help to use that info when using HW encoding via nv encoder. Thanks for the consideration.

Code: Select all

   --colormatrix <string>       undef, auto, auto_res, bt709, smpte170m
                                bt470bg, smpte240m, YCgCo, fcc, GBR
                                bt2020nc, bt2020c, derived-ncl, derived-cl
                                ictco, 2100-lms
                                 default: undef
   --colorprim <string>         undef, unknown, auto, auto_res, bt709
                                smpte170m, bt470m, bt470bg, smpte240m, film
                                bt2020, st428, st431-2, st432-1, ebu3213-e
                                 default: undef
   --transfer <string>          undef, unknown, auto, auto_res, bt709
                                smpte170m, bt470m, bt470bg, smpte240m
                                linear, log100, log316, iec61966-2-4
                                bt1361e, iec61966-2-1, bt2020-10, bt2020-12
                                smpte2084, smpte428, arib-std-b67
                                 default: undef
---
omay, arrylay, curlyq & associates
User avatar
Rocky
Posts: 3623
Joined: Fri Sep 06, 2019 12:57 pm

List of X265_CL Supported Switches

Post by Rocky »

Are you sure that x265.exe accepts the strings? If so, we could do it.
User avatar
AYColumbia
Posts: 87
Joined: Sun Feb 12, 2012 11:29 am

List of X265_CL Supported Switches

Post by AYColumbia »

I grabbed a log of one of my HD encodes that uses strings. I only use the x265 line from the dgi file for UHD sources btw.

Code: Select all

"E:\StaxRip\StaxRip-v2.29.0-x64\Apps\Encoders\x265\x265.exe" --reader-options library=E:\StaxRip\StaxRip-v2.29.0-x64\Apps\FrameServer\AviSynth\AviSynth.dll
  --crf 21 --crf-min 16.0 --crf-max 34.0 --frame-threads 0 --preset fast --output-depth 10 --fps 24000/1001
  --input-res 1920x1080   --profile main10 --ref 4 --bframes 3 --rc-lookahead 5 --lookahead-slices 6
  --subme 0 --early-skip --open-gop --scenecut 69 --scenecut-bias 0.1
  --vbv-maxrate 8000 --vbv-bufsize 10000
  --colorprim bt709 --transfer bt709 --range limited --colormatrix bt709   --chromaloc 2 --max-luma 1023
  --no-weightp --aq-mode 1 --aq-strength 0.00 --limit-refs 0 --no-signhide --no-sao --selective-sao 0
  --output "video.hevc" "video_enc.avs" 
The relevant lines:

Code: Select all

--colorprim bt709 --transfer bt709 --colormatrix bt709
I checked the docs too just to be sure and they do support both integer and string. The copy/paste doesn't copy the numbers so here's the link to the docs.

Code: Select all

--colorprim <integer|string>
Specify color primaries to use when converting to RGB. Default undefined (not signaled)

bt709
unknown
reserved
bt470m
bt470bg
smpte170m
smpte240m
film
bt2020
smpte428
smpte431
smpte432

--transfer <integer|string>
Specify transfer characteristics. Default undefined (not signaled)

bt709
unknown
reserved
bt470m
bt470bg
smpte170m
smpte240m
linear
log100
log316
iec61966-2-4
bt1361e
iec61966-2-1
bt2020-10
bt2020-12
smpte2084
smpte428
arib-std-b67

--colormatrix <integer|string>
Specify color matrix setting i.e set the matrix coefficients used in deriving the luma and chroma. Default undefined (not signaled)

gbr
bt709
unknown
reserved
fcc
bt470bg
smpte170m
smpte240m
ycgco
bt2020nc
bt2020c
smpte2085
chroma-derived-nc
chroma-derived-c
ictcp
I appreciate you being willing to do this. :)
---
omay, arrylay, curlyq & associates
User avatar
Rocky
Posts: 3623
Joined: Fri Sep 06, 2019 12:57 pm

List of X265_CL Supported Switches

Post by Rocky »

Didn't even have lunch yet. Boiled acorns and grubs coming right up. Yummy! :wow:
User avatar
Levi
Posts: 52
Joined: Sat Apr 18, 2020 6:12 pm

List of X265_CL Supported Switches

Post by Levi »

User avatar
Sherman
Posts: 578
Joined: Mon Jan 06, 2020 10:19 pm

List of X265_CL Supported Switches

Post by Sherman »

Sherman Peabody
Director of Linux Development
User avatar
new_guy
Posts: 59
Joined: Fri Jan 15, 2021 11:12 am

List of X265_CL Supported Switches

Post by new_guy »

User avatar
AYColumbia
Posts: 87
Joined: Sun Feb 12, 2012 11:29 am

List of X265_CL Supported Switches

Post by AYColumbia »

Yummy is right. LOL

You all crack me up! :D
---
omay, arrylay, curlyq & associates
User avatar
Albert
Posts: 40
Joined: Thu Oct 15, 2020 1:20 pm

List of X265_CL Supported Switches

Post by Albert »

Keeping it real.
User avatar
Rocky
Posts: 3623
Joined: Fri Sep 06, 2019 12:57 pm

List of X265_CL Supported Switches

Post by Rocky »

@AYColumbia

Can you please test this:

https://rationalqm.us/misc/DGIndexNV_AYColumbia.zip

If it's good for you I will make a slipstream. Thank you for your suggestion and testing. :salute:
User avatar
AYColumbia
Posts: 87
Joined: Sun Feb 12, 2012 11:29 am

List of X265_CL Supported Switches

Post by AYColumbia »

Rocky wrote:
Sun Dec 17, 2023 7:53 am
@AYColumbia

Can you please test this:

https://rationalqm.us/misc/DGIndexNV_AYColumbia.zip

If it's good for you I will make a slipstream. Thank you for your suggestion and testing. :salute:
Wow that was fast. Those acorns and grubs must have been filled with high energy protein. :D

I tested it with several sources and fed the lines directly to x265 encoder with no issues. These are the lines for each source I used.

Code: Select all

--colorprim bt2020 --transfer smpte2084 --colormatrix bt2020nc
	--master-display "G(8500,39850)B(6550,2300)R(35400,14600)WP(15635,16450)L(10000000,0)" --max-cll "0,0" --frames 1440 --chromaloc 2

--colorprim bt2020 --transfer smpte2084 --colormatrix bt2020nc
	--master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,1)" --max-cll "0,0" --frames 1440 --chromaloc 2

--colorprim bt2020 --transfer smpte2084 --colormatrix bt2020nc
	--master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,50)" --max-cll "0,0" --frames 1444 --chromaloc 2

--colorprim bt2020 --transfer smpte2084 --colormatrix bt2020nc
	--master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,1)" --max-cll "0,0" --frames 1440 --chromaloc 2

--colorprim bt2020 --transfer smpte2084 --colormatrix bt2020nc
	--master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,1)" --max-cll "472,185" --frames 1440 --chromaloc 2

--colorprim bt2020 --transfer smpte2084 --colormatrix bt2020nc
	--master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,1)" --max-cll "1001,888" --frames 1440 --chromaloc 2
Do you think a new dgdecnv switch should be used for this format so not to "break" current users who may be relying on the integer values? Thank you.
---
omay, arrylay, curlyq & associates
User avatar
Rocky
Posts: 3623
Joined: Fri Sep 06, 2019 12:57 pm

List of X265_CL Supported Switches

Post by Rocky »

Thank you for your testing!

I don't think we need an option for that.

I had to fix an issue from renols too. When he reports back I'll make a slipstream, assuming all is well.
User avatar
AYColumbia
Posts: 87
Joined: Sun Feb 12, 2012 11:29 am

List of X265_CL Supported Switches

Post by AYColumbia »

Cool, thank you very much.
---
omay, arrylay, curlyq & associates
Post Reply