Closed timotheeg closed 2 years ago
Done and released with https://github.com/timotheeg/nestrischamps/commit/cad79765569500fef05b118047c8e81d79be0694
Add parameter fixbuffer=N
, where N is between 1 and 5 to the OCR page's URL to use a larger buffer.
I streamed with fixbuffer=4
yesterday and things worked just fineon my setup, with the delay hardly noticeable in relation to the player cam video.
I might consider making this the default 🤔
I also corrected unnecessary complicated code to make changes with this simple logic: level can only change when lines change lines can only change when score change score can change on its own (drop down point)
Therefore, we only need to monitor changes in score and read the 3 values of score, lines, level together after the stabilization period has elapsed.
Made more changes as part of the unification work. There's now 2 frames of buffer at OCR time, and there's no longer a query string arg to change that.
Depending on multiple factor, like the capture frame rate, the source console or clone, or the make of the AV capture device, ocr anomalies may persists over multiple frames and mess up with nestrischamps stats tracking. See the sequence of score from a game during the Illinois qualifier 2022:
NTC has a 1 frame buffer to catch and correct anomalies, but it looks like it is not enough. Experiment with increasing the size of the frame buffer to 2, 3, or even 4 frames (or some manual entry). a larger frame buffer adds delay in relation to the player video, but it might be worth it, 4 frame at 60fps is 64ms, 4 frames at 30fps capture is 128ms.