feat(rework): 화면 자막 OCR 속도(sample_fps) 컨트롤 추가, 기본 1
저사양 서버(N150)에서 sample_fps=3은 프레임 과다로 10분 타임아웃 발생. OCR 영역(crop %) 옆에 'fps' 입력을 추가하고 기본을 1로 낮춰 빠르게 끝나게 함 (자막이 빨리 바뀌면 2~3으로 올림). ocrScreen()이 sampleFps 를 함께 전달. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
32b2eae62c
commit
fbce1ec8ea
@ -160,6 +160,10 @@
|
|||||||
title="OCR 대상 영역(하단 %). 100=전체화면"
|
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;">
|
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;">
|
||||||
<span class="text-xs text-muted">%</span>
|
<span class="text-xs text-muted">%</span>
|
||||||
|
<span class="text-xs text-muted" title="초당 OCR 프레임 수. 낮을수록 빠름(저사양 서버는 1 권장). 자막이 빨리 바뀌면 2~3">· 속도 fps</span>
|
||||||
|
<input id="ocrFps" type="number" value="1" min="1" max="5" step="1"
|
||||||
|
title="초당 OCR 프레임 수(낮을수록 빠름). N150 같은 저사양은 1 권장"
|
||||||
|
style="width:46px; padding:6px; background:var(--surface-2); border:1px solid var(--glass-border); border-radius:6px; color:var(--text); font-size:0.85rem;">
|
||||||
<button class="btn btn-secondary px-3 py-2 flex items-center gap-1" id="copyBtn" onclick="copyToEditor()">
|
<button class="btn btn-secondary px-3 py-2 flex items-center gap-1" id="copyBtn" onclick="copyToEditor()">
|
||||||
<i data-lucide="copy" style="width:15px;"></i> 에디터로 복사
|
<i data-lucide="copy" style="width:15px;"></i> 에디터로 복사
|
||||||
</button>
|
</button>
|
||||||
@ -701,7 +705,8 @@
|
|||||||
status.textContent = '화면 자막 OCR 중… (프레임 분석, 영상 길이에 따라 수십 초~)';
|
status.textContent = '화면 자막 OCR 중… (프레임 분석, 영상 길이에 따라 수십 초~)';
|
||||||
try {
|
try {
|
||||||
const lang = document.getElementById('langSel').value || 'ko';
|
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 전달 → 정확도·속도↑
|
// 자막영역(하단 N%)을 영상 실제 해상도로 환산해 crop 전달 → 정확도·속도↑
|
||||||
const pct = Math.min(100, Math.max(10, parseInt(document.getElementById('ocrCropPct').value) || 30));
|
const pct = Math.min(100, Math.max(10, parseInt(document.getElementById('ocrCropPct').value) || 30));
|
||||||
const v = document.getElementById('localVideo');
|
const v = document.getElementById('localVideo');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user