From fbce1ec8ea911c32f62a12094ef21b79f100df4c Mon Sep 17 00:00:00 2001 From: "hehihoho3@gmail.com" Date: Thu, 25 Jun 2026 15:42:57 +0900 Subject: [PATCH] =?UTF-8?q?feat(rework):=20=ED=99=94=EB=A9=B4=20=EC=9E=90?= =?UTF-8?q?=EB=A7=89=20OCR=20=EC=86=8D=EB=8F=84(sample=5Ffps)=20=EC=BB=A8?= =?UTF-8?q?=ED=8A=B8=EB=A1=A4=20=EC=B6=94=EA=B0=80,=20=EA=B8=B0=EB=B3=B8?= =?UTF-8?q?=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 저사양 서버(N150)에서 sample_fps=3은 프레임 과다로 10분 타임아웃 발생. OCR 영역(crop %) 옆에 'fps' 입력을 추가하고 기본을 1로 낮춰 빠르게 끝나게 함 (자막이 빨리 바뀌면 2~3으로 올림). ocrScreen()이 sampleFps 를 함께 전달. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/main/resources/templates/rework.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/resources/templates/rework.html b/src/main/resources/templates/rework.html index daa3e45..85fa1e1 100644 --- a/src/main/resources/templates/rework.html +++ b/src/main/resources/templates/rework.html @@ -160,6 +160,10 @@ title="OCR 대상 영역(하단 %). 100=전체화면" style="width:54px; padding:6px; background:var(--surface-2); border:1px solid var(--glass-border); border-radius:6px; color:var(--text); font-size:0.85rem;"> % + · 속도 fps + @@ -701,7 +705,8 @@ status.textContent = '화면 자막 OCR 중… (프레임 분석, 영상 길이에 따라 수십 초~)'; try { const lang = document.getElementById('langSel').value || 'ko'; - let q = '?lang=' + encodeURIComponent(lang); + const fps = Math.min(5, Math.max(1, parseInt(document.getElementById('ocrFps').value) || 1)); + let q = '?lang=' + encodeURIComponent(lang) + '&sampleFps=' + fps; // 자막영역(하단 N%)을 영상 실제 해상도로 환산해 crop 전달 → 정확도·속도↑ const pct = Math.min(100, Math.max(10, parseInt(document.getElementById('ocrCropPct').value) || 30)); const v = document.getElementById('localVideo');