zonefile does not appear to work
I am trying to use a zonefile and its not being applied. I know it is being parsed because if I use an option not supported, I get an error otherwise I don’t.
e.g. Here is a zonefile sample:
5 --aq-mode 0
If I set aq-mode to 1 and encode, it never changes to 0 per my zonefile. I am using 2pass encode.
I have confirmed that in “bool CLIOptions::parseZoneFile()” that it does correctly increment zonefileCount to match the number of entries in the zonefile. However, it is 0 outside of this function. e.g. I added zonefileCount to the stats file, above zoneCount, and its always 0 even though I can see it calculate the proper number in parseZoneFile.
If I am using it wrong, would love to know what I need to change.
Comments (2)
-
reporter -
reporter If I move the parseZoneFile to before:
m_encoder = m_cliopt.api->encoder_open(m_param);
Then the zonefileCount is correct.
However, the StartFrame of the zones is set to -1 in api.cpp on line 211.
param->rc.zones[i].startFrame = -1;
And so the startFrame is never hit in all future if statements as its -1 and that never matches the actual frames.
Obviously I don’t fully understand the code yet, so not sure what is correct. Hoping someone can take a look.
- Log in to comment
I have spent some more time debugging this.
From what I can tell, the parsing of the zonefile works, it just that the parsing comes too late.
abvEncApp.cpp
Line: 520 - if (!m_cliopt.parseZoneFile())
All of the zonefilecount stuff occurs in params.cpp before the above gets called and it never goes through params.cpp again after this call.
In the parseZoneFile, it calculates that I have two entries. However, zonefileCount is always 0 since that is what it is set to during params.cpp.
Here is what is on my command line:
--preset placebo --input-res 3840x2160 --input-csp i420 --fps 24000/1001 --profile main10 --level-idc 51 --high-tier --no-open-gop --keyint 24 --bitrate 80000 --vbv-maxrate 84000 --vbv-bufsize 99000 --hrd --aud --sar 1:1 --input-depth 10 --output-depth 10 --uhd-bd --repeat-headers --range limited --slices 1 --zonefile F:\myzonefile.txt --frames 11235 --output foo.hevc --input F:\YUV\foo.yuv