Closed SiV44 closed 1 year ago
I'm not aware of "calculation" of MaxCLL and MaxFALL, so I cannot say if it is possible or not. I think QSVEnc can copy or set MaxCLL and MaxFALL already.
Would you please let me know the details of the idea?
I think QSVEnc can copy or set MaxCLL and MaxFALL already.
QSVEnc / NVEnc is able to copy / set these values, but there are cases where these values are missing.
Would you please let me know the details of the idea?
- What will be the input data?
- The details of the calculation process (How will it be calculated, what kind of formula is it used)?
Specifically, I'm talking about recording gameplay on next-gen consoles, which allows to keep the correct color metadata for HDR10 in the container but without the MaxCLL
/ MaxFALL
values (Master Display and Chroma location are also missing, but that's not the point), I did some research and found an AviSynth plugin that is able to "calculate" / analyze these values as well as a forum thread that died a while ago.
Thread AVS Plugin Input Sample
I'm not a programmer, so most of what I've read is "dark magic" to me. And I understand that such "calculations" should be made on raw material.
From the perspective of how many tools you have added - Tweaks, Colorspace conversion with LUT3D, Color curves - such a tool could be an interesting / useful? addition.
Thanks for your time, Ragards
Thank you for the information.
I've looked through the thread and the code, it seems like it needs to look throuhgt the video once, and then calculate the values for MaxCLL/MaxFALL, and finally encode again.
I think it's not suitable to add an option to QSVEnc application for this algorithm, as it is completely a pre-encode process.
I've looked through the thread and the code, it seems like it needs to look throuhgt the video once, and then calculate the >values for MaxCLL/MaxFALL, and finally encode again.
I think it's not suitable to add an option to QSVEnc application for this algorithm, as it is completely a pre-encode process.
Thanks for your reply and sorry for the very late response.
Hypothetically, the speed of MaxCLL
/MaxFALL
analysis is equal to the speed of the encoding process, the process saves the result in an external file (for example "MaxCLL.txt"
) after completion and the program is able to read / copy this result.
Would it be possible to create an option similar to coding in 2 passes? or just encoding in 2 passes?
In which the first pass would analyze the values and write them, while the second pass would read / copy these values and then encode.
1-pass: Input -> Analyze -> write MaxCLL/MaxFALL
2-pass: Input -> read MaxCLL/MaxFALL -> encode -> Output
Question about QSVEnc and NVEnc.
Thanks for your time.
Actually, considering the role of the encoder, first pass analysis is not a role of the encoder. Therefore, it is not sutiable to add this into the encoder.
We should think of using what is already there first, rather than to re-implement something new. We can simply use the avs plugin that already exists.
The process can be completely automated by a simple script. I have created a example of the python script calc_maxcll.zip.
calc_maxcll.py will run following process automatically.
Install Avisynth, and plugins ffms2 and MaxCLLFind.
Install python3.
Download avs2pipemod and put it in same folder to calc_maxcll.py.
Download QSVEncC64 and put it in same folder to calc_maxcll.py.
Run following command line.
python calc_maxcll.py <input file> <output file> <other command lines to encoder>
Awesome, I'll check it out for sure.
Thanks for your time, work and patience. Best regards.
Hello @rigaya, Is it possible to add an option or a tool to calculate MaxCLL and MaxFALL values?
Thanks for your time Regards