자막

Captions

영상의 대사뿐 아니라 화자 구분, 음향 효과까지 텍스트로 전달하는 자막. 청각 장애 사용자와 무음 시청자 모두에게 필요합니다.

다른 이름: Closed captionsSubtitles vs captions
···
html
<div class="stage">
  <div class="player">
    <div class="screen"><div class="play"></div></div>
    <div class="bar"><div class="fill" id="fill"></div></div>
    <div class="cap" id="cap"></div>
  </div>
</div>
css
.stage{width:78%;height:88%;display:grid;place-items:center}
.player{width:100%;height:100%;border-radius:14px;overflow:hidden;background:#0d0d12;position:relative;display:flex;flex-direction:column}
.screen{flex:1;display:grid;place-items:center;background:linear-gradient(135deg,#1c1c26,#0d0d12)}
.play{width:0;height:0;border-top:14px solid transparent;border-bottom:14px solid transparent;border-left:22px solid rgba(255,255,255,.65)}
.bar{height:4px;background:rgba(255,255,255,.15)}
.fill{height:100%;width:0;background:var(--accent)}
.cap{min-height:30px;display:flex;align-items:center;justify-content:center;padding:6px 8%;font:700 clamp(10px,3vmin,13px)/1.2 ui-monospace,monospace;color:#fff;text-align:center;background:rgba(0,0,0,.55)}
js
const fill = document.getElementById('fill');
const cap = document.getElementById('cap');
const lines = [
  { t: 0, text: 'Welcome back to the show.' },
  { t: 20, text: '[applause]' },
  { t: 45, text: "Today we're talking accessibility." },
  { t: 70, text: '[phone ringing]' },
  { t: 90, text: "Let's dive right in." },
];
const DURATION = 6000;
const start = Date.now();
function frame() {
  const elapsed = (Date.now() - start) % DURATION;
  const pct = (elapsed / DURATION) * 100;
  fill.style.width = pct + '%';
  let current = '';
  for (let i = 0; i < lines.length; i++) {
    if (pct >= lines[i].t) current = lines[i].text;
  }
  cap.textContent = current;
  requestAnimationFrame(frame);
}
frame();

자막(caption)은 번역 자막(subtitle)과 다릅니다 — subtitle은 언어를 못 알아듣는 사람을 위해 대사만 옮기지만, caption은 청각 장애가 있는 사람을 위해 누가 말하는지, 어떤 소리가 나는지([전화벨 소리], [박수])까지 포함합니다.

HTML에서는 `<video>` 안에 `<track kind="captions" src="..." srclang="ko">`(WebVTT 파일)로 구현합니다. 사전 녹화된 영상의 캡션은 WCAG의 필수 요건(1.2.2)이고, 라이브 방송의 실시간 캡션은 더 높은 등급에서 요구됩니다.

부수 효과로, 지하철·사무실처럼 소리를 못 켜는 환경에서 캡션은 모든 사용자의 시청을 가능하게 합니다 — 실제로 소셜 미디어 영상 상당수가 무음으로 재생됩니다.

데모는 재생 진행바에 맞춰 캡션 줄이 대사와 함께 "[applause]" 같은 비언어 음향까지 순서대로 나타나는 모습을 보여줍니다.

언제 쓰나

제작하는 모든 사전 녹화 영상에 기본으로 캡션 파일을 붙이세요. 자동 생성 캡션은 반드시 사람이 검수해서 오타·오인식을 고쳐야 합니다.