# HyperFrames 쇼츠 시안 v2 완료 보고서 (`REPORT_v2.md`)

- **상태**: `succeeded` (1080×1920, 30fps, 47.40초, 11장면, 한국어 TTS 음성 및 균일 카라오케 자막 포함)
- **산출물 경로**:
  - 최종 영상: [`C:\Ai_Coding\scratch\video-skill\pilot\out\pilot_v2.mp4`](file:///C:/Ai_Coding/scratch/video-skill/pilot/out/pilot_v2.mp4) (v1 [`out/pilot_v1.mp4`](file:///C:/Ai_Coding/scratch/video-skill/pilot/out/pilot_v1.mp4) 및 v1 소스 무손실 보존)
  - v2 프로젝트 소스: [`C:\Ai_Coding\scratch\video-skill\pilot\v2\index.html`](file:///C:/Ai_Coding/scratch/video-skill/pilot/v2/index.html), [`v2/tts_timestamps.json`](file:///C:/Ai_Coding/scratch/video-skill/pilot/v2/tts_timestamps.json)
  - 검수용 11장면 프레임 PNG: [`C:\Ai_Coding\scratch\video-skill\pilot\out\v2_frames\scene_01.png`](file:///C:/Ai_Coding/scratch/video-skill/pilot/out/v2_frames/scene_01.png) ~ [`scene_11.png`](file:///C:/Ai_Coding/scratch/video-skill/pilot/out/v2_frames/scene_11.png)

---

## 1. 장면별 시작~끝 시간 표 및 총 길이

- **TTS 설정**: `edge-tts` (`ko-KR-SunHiNeural`, 속도 `+10%`, `WordBoundary` 타임스탬프 추출, 장면 끝 여유 `0.300초`)
- **순수 음성 발화 총합**: `44.081초`
- **장면 여유 포함 전체 타임라인 길이**: `47.381초` (MP4 컨테이너 기준 `47.400초`, 성공 기준 38~55초 충족)

| 장면 # | 헤드라인 (1줄 흰색 / 2줄 주황) | 내레이션 = 자막 원문 | 음성 길이 (s) | 장면 여유 (s) | 장면 길이 (s) | 시작 시각 (s) | 종료 시각 (s) | 중간 프레임 추출 시각 (s) |
|:---:|---|---|---:|---:|---:|---:|---:|---:|
| **1** | 쇼츠 만들기 / AI 둘이 나눠서 | 쇼츠 만들기, 이제 AI 둘한테 나눠 맡겨요. | 3.357 | 0.300 | 3.657 | `0.000` | `3.657` | `1.829` (`scene_01.png`) |
| **2** | 따라 하고 싶은 쇼츠 / 뜯어보기 힘들다 | 따라 하고 싶은 쇼츠가 있어도, 화면 하나하나 뜯어보긴 힘들잖아요. | 4.289 | 0.300 | 4.589 | `3.657` | `8.246` | `5.952` (`scene_02.png`) |
| **3** | 주의할 점 하나 / 끝에 알려드림 | 주의할 점 하나는 끝에 알려 드릴게요. | 2.516 | 0.300 | 2.816 | `8.246` | `11.062` | `9.654` (`scene_03.png`) |
| **4** | 첫 번째 도구 / watch 스킬 | 먼저 클로드 코드의 watch 스킬. 깃허브 별이 2만 개 넘어요. | 4.785 | 0.300 | 5.085 | `11.062` | `16.147` | `13.604` (`scene_04.png`) |
| **5** | 1단계 / 클로드가 본다 | 쇼츠 링크를 주면 1초마다 화면을 캡처하고 자막까지 읽어요. | 4.187 | 0.300 | 4.487 | `16.147` | `20.634` | `18.390` (`scene_05.png`) |
| **6** | 2단계 / 설계서로 정리 | 클로드가 색, 자막, 장면 순서를 설계서 한 장으로 정리해요. | 4.346 | 0.300 | 4.646 | `20.634` | `25.280` | `22.957` (`scene_06.png`) |
| **7** | 두 번째 도구 / HyperFrames | 다음은 HyperFrames. HTML 코드로 영상을 만드는 도구예요. | 5.160 | 0.300 | 5.460 | `25.280` | `30.740` | `28.010` (`scene_07.png`) |
| **8** | 3단계 / 안티그래비티가 만든다 | 안티그래비티가 설계서를 받아 영상을 만들고 목소리까지 입혀요. | 4.210 | 0.300 | 4.510 | `30.740` | `35.250` | `32.995` (`scene_08.png`) |
| **9** | 역할 분담 / 지시 vs 제작 | 클로드는 지시하고 검수하고, 안티그래비티는 만들어요. | 3.812 | 0.300 | 4.112 | `35.250` | `39.362` | `37.306` (`scene_09.png`) |
| **10** | 주의할 점 / 스타일만 참고 | 주의할 점. 스타일만 참고하고, 원본 대본과 음악은 쓰지 마세요. | 4.573 | 0.300 | 4.873 | `39.362` | `44.235` | `41.799` (`scene_10.png`) |
| **11** | 지금 이 영상도 / 이렇게 만들었어요 | 지금 보시는 이 영상도 이렇게 만들었어요. | 2.846 | 0.300 | 3.146 | `44.235` | `47.381` | `45.808` (`scene_11.png`) |
| **합계** | — | 11장면 (30개 자막 그룹, 83개 어절) | **44.081** | **3.300** | **47.381** | `0.000` | `47.381` | 11장 저장 완료 |

---

## 2. `ffprobe` 요약 및 원문 근거

- **파일 경로**: [`C:\Ai_Coding\scratch\video-skill\pilot\out\pilot_v2.mp4`](file:///C:/Ai_Coding/scratch/video-skill/pilot/out/pilot_v2.mp4)
- **해상도**: `1080×1920` (9:16 세로형, H.264 High Profile, `yuv420p`)
- **프레임레이트 / 총 프레임**: `30 fps` (`30/1`), `1,422 frames`
- **재생 길이**: `47.400000초` (`47.40초`)
- **파일 용량**: `7,150,688 bytes` (약 `6.82 MiB` / `7.15 MB`)
- **오디오 유무**: **포함** (`AAC LC`, `48,000 Hz`, `stereo (2ch)`, `171.9 kbps`, `2,223 frames`)

### `ffprobe` JSON 출력 발췌
```json
{
  "streams": [
    {
      "index": 0,
      "codec_name": "h264",
      "profile": "High",
      "codec_type": "video",
      "width": 1080,
      "height": 1920,
      "display_aspect_ratio": "9:16",
      "pix_fmt": "yuv420p",
      "r_frame_rate": "30/1",
      "avg_frame_rate": "30/1",
      "duration": "47.400000",
      "bit_rate": "1027622",
      "nb_frames": "1422"
    },
    {
      "index": 1,
      "codec_name": "aac",
      "profile": "LC",
      "codec_type": "audio",
      "sample_rate": "48000",
      "channels": 2,
      "channel_layout": "stereo",
      "duration": "47.400000",
      "bit_rate": "171967",
      "nb_frames": "2223"
    }
  ],
  "format": {
    "filename": "C:\\Ai_Coding\\scratch\\video-skill\\pilot\\out\\pilot_v2.mp4",
    "nb_streams": 2,
    "format_name": "mov,mp4,m4a,3gp,3g2,mj2",
    "duration": "47.400000",
    "size": "7150688",
    "bit_rate": "1206867"
  }
}
```

---

## 3. 렌더 시간 및 워커 수

- **시스템 논리 코어 수**: `4 코어`
- **적용한 렌더 워커 수**: `--workers 2` (코어 50% 이하 제한 준수)
- **렌더 소요 시간**:
  - HyperFrames 파이프라인 내부 계측: **`180.8초` (`3m 0.8s`)** (`compile 6.2s`, `audio 5.4s`, `probe 0.3s`, `setup 5.4s`, `capture 2m 45.6s`, `encode 0.6s`, `assemble 1.6s`)
  - 외부 프로세스 Wall-clock 총 소요 시간: **`187.68초`**

---

## 4. v1 결함 2개 수정 방법

1. **긴 자막 글자 축소 제거 → 자막 그룹 분할 및 좌우 여백 최소 80px 보장**:
   - v1에서 긴 자막 그룹에 적용했던 `.caption-group.compact { font-size: 46px }` 축소 분기 로직을 완전히 제거했습니다.
   - 전 장면(1~11장면, 총 30개 자막 그룹)의 `.kw` 글자 크기를 **`58px`로 100% 동일하게 고정**했습니다.
   - 자막 컨테이너(`.subtitle-zone`)를 `left: 80px; width: 920px;`로 설정하여 1080px 캔버스 기준 **좌우 여백 최소 80px 이상**을 강제했습니다.
   - 한 줄에 폭이 넓어질 수 있는 2장면 후반부(`["하나하나", "뜯어보긴"]` / `["힘들잖아요."]`), 8장면 전반부(`["안티그래비티가", "설계서를"]` / `["받아", "영상을", "만들고"]`), 10장면 전반부(`["주의할", "점."]` / `["스타일만", "참고하고,"]`)를 각각 2개의 자막 그룹으로 분할하여 순차 표시함으로써 920px 폭 안에 여유 있게 들어오도록 수정했습니다.
2. **자막 어절 간 간격 균일화**:
   - 모든 `.caption-group`에 `display: flex; justify-content: center; align-items: center; gap: 14px;`를 적용하고, 모든 `.kw` 어절 요소에 동일한 좌우 패딩(`padding: 8px 14px`)과 `white-space: nowrap`을 부여하여 어절 간 시각적 간격이 전 장면에서 일정하게 유지되도록 교정했습니다.

---

## 5. `npx hyperframes check` 결과

[`pilot/v2`](file:///C:/Ai_Coding/scratch/video-skill/pilot/v2) 디렉터리에서 실행한 `npx hyperframes check` 최종 결과는 전 항목 **0 errors, 0 warnings**로 통과했습니다:

```text
Lint
  ◇ 0 errors, 0 warnings

Runtime
  ◇ 0 errors, 0 warnings

Layout
  ◇ 0 issues across 9 sample(s)

Motion
  ◇ 0 errors, 0 warnings

Contrast
  ◇ 71/71 text checks pass WCAG AA

Craft
  ◇ 0 errors, 0 warnings

Audio
  ◇ 0 errors, 0 warnings

Snapshots
  ◇ disabled

◇  Check passed
Report: C:\Ai_Coding\scratch\video-skill\pilot\v2\.hyperframes\artifacts\checks\af516312-c5b1-4e8d-8a8e-fe7252527e81.json
```

---

## 6. 장면별 중간 시점 프레임 PNG 11장 목록

- [`pilot/out/v2_frames/scene_01.png`](file:///C:/Ai_Coding/scratch/video-skill/pilot/out/v2_frames/scene_01.png) (`t = 1.829s`, 555,996 bytes)
- [`pilot/out/v2_frames/scene_02.png`](file:///C:/Ai_Coding/scratch/video-skill/pilot/out/v2_frames/scene_02.png) (`t = 5.952s`, 498,715 bytes)
- [`pilot/out/v2_frames/scene_03.png`](file:///C:/Ai_Coding/scratch/video-skill/pilot/out/v2_frames/scene_03.png) (`t = 9.654s`, 519,642 bytes)
- [`pilot/out/v2_frames/scene_04.png`](file:///C:/Ai_Coding/scratch/video-skill/pilot/out/v2_frames/scene_04.png) (`t = 13.604s`, 467,609 bytes)
- [`pilot/out/v2_frames/scene_05.png`](file:///C:/Ai_Coding/scratch/video-skill/pilot/out/v2_frames/scene_05.png) (`t = 18.390s`, 536,649 bytes)
- [`pilot/out/v2_frames/scene_06.png`](file:///C:/Ai_Coding/scratch/video-skill/pilot/out/v2_frames/scene_06.png) (`t = 22.957s`, 572,945 bytes)
- [`pilot/out/v2_frames/scene_07.png`](file:///C:/Ai_Coding/scratch/video-skill/pilot/out/v2_frames/scene_07.png) (`t = 28.010s`, 508,576 bytes)
- [`pilot/out/v2_frames/scene_08.png`](file:///C:/Ai_Coding/scratch/video-skill/pilot/out/v2_frames/scene_08.png) (`t = 32.995s`, 588,630 bytes)
- [`pilot/out/v2_frames/scene_09.png`](file:///C:/Ai_Coding/scratch/video-skill/pilot/out/v2_frames/scene_09.png) (`t = 37.306s`, 498,471 bytes)
- [`pilot/out/v2_frames/scene_10.png`](file:///C:/Ai_Coding/scratch/video-skill/pilot/out/v2_frames/scene_10.png) (`t = 41.799s`, 421,032 bytes)
- [`pilot/out/v2_frames/scene_11.png`](file:///C:/Ai_Coding/scratch/video-skill/pilot/out/v2_frames/scene_11.png) (`t = 45.808s`, 647,150 bytes)
