Skip to content

Is there a way to setup input.conf to spit out the target's MaxCLL/Peak Luminance? #14277

Answered by kasper93
marat569 asked this question in Q&A
Discussion options

You must be logged in to vote

To show only PQ value, you can use:

n show-text ${video-out-params/max-pq-y}

To show also converted value in cd/m², you can use:

local function pq_eotf(x)
    if not x then
        return x;
    end

    local PQ_M1 = 2610.0 / 4096 * 1.0 / 4
    local PQ_M2 = 2523.0 / 4096 * 128
    local PQ_C1 = 3424.0 / 4096
    local PQ_C2 = 2413.0 / 4096 * 32
    local PQ_C3 = 2392.0 / 4096 * 32

    x = x ^ (1.0 / PQ_M2)
    x = math.max(x - PQ_C1, 0.0) / (PQ_C2 - PQ_C3 * x)
    x = x ^ (1.0 / PQ_M1)
    x = x * 10000.0

    return x
end

mp.add_key_binding('n', function() 
	local pq = mp.get_property_native('video-out-params/max-pq-y')
	if not pq then
		return
	end
	mp.commandv('show-text', string.…

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@marat569
Comment options

@kasper93
Comment options

@marat569
Comment options

@kasper93
Comment options

@marat569
Comment options

Answer selected by marat569
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants