clipwise 0.2.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.ko.md CHANGED
@@ -5,7 +5,7 @@
5
5
  YAML 시나리오를 작성하면 시네마틱 데모 영상(MP4/GIF)을 자동으로 만들어주는 스크린 레코더. Playwright CDP 기반.
6
6
 
7
7
  <p align="center">
8
- <img src="https://github.com/kwakseongjae/clipwise/releases/download/v0.1.0/demo.gif" width="100%" alt="Clipwise Demo" />
8
+ <video src="https://kwakseongjae.github.io/clipwise/demo.mp4" autoplay loop muted playsinline width="100%"></video>
9
9
  </p>
10
10
 
11
11
  > *`npx clipwise demo` 한 줄로 생성된 영상입니다.*
@@ -100,7 +100,7 @@ output:
100
100
  width: 1280
101
101
  height: 800
102
102
  fps: 30 # 1-60
103
- quality: 80 # 1-100 (MP4: CRF에 매핑)
103
+ preset: social # social | balanced | archive
104
104
 
105
105
  steps:
106
106
  - name: "스텝 이름"
@@ -272,6 +272,52 @@ speedRamp:
272
272
  actionSpeed: 0.8
273
273
  ```
274
274
 
275
+ ## 성능
276
+
277
+ **Apple M1 Max (10코어)** 기준 — Pulse Dashboard 데모, 44초 @ 30fps, 1280×800:
278
+
279
+ | 단계 | v0.3.0 | v0.4.0 | 변화 |
280
+ |------|--------|--------|------|
281
+ | 녹화 | 30.8 s | 31.1 s | — |
282
+ | 합성 + 인코딩 | 97.2 s | 60.6 s | **−38%** |
283
+ | **전체** | **127.9 s** | **91.7 s** | **−28%** |
284
+ | ms / 프레임 | 69 ms | 67 ms | −3% |
285
+ | 캡처 프레임 수 | 1,303 | 902 | −31% (중복 제거) |
286
+
287
+ v0.4.0 주요 최적화: 동시 스트리밍 파이프라인, 정적 프레임 중복 제거(~33% 건너뜀), 워커별 StaticLayers 캐시, raw RGBA 버퍼 파이프라인.
288
+
289
+ ## 출력 압축
290
+
291
+ `preset` 필드로 화질과 파일 크기를 조절합니다:
292
+
293
+ ```yaml
294
+ output:
295
+ format: mp4
296
+ fps: 30
297
+ preset: social # social | balanced | archive
298
+ ```
299
+
300
+ | 프리셋 | libx264 CRF | HEVC VideoToolbox q:v | 용도 |
301
+ |--------|-------------|----------------------|------|
302
+ | `social` | 22 | 60 | Twitter, LinkedIn 등 소셜 공유 (~2-4 MB / 30초) |
303
+ | `balanced` | 18 | 70 | 범용, 포트폴리오 (~4-6 MB / 30초) |
304
+ | `archive` | 13 | 80 | 고화질 보관, 소스 마스터 (무제한) |
305
+
306
+ **권장**: 대부분의 데모에는 `preset: balanced`.
307
+
308
+ > **레거시**: `quality: 1-100`은 계속 작동하며 가장 가까운 프리셋으로 매핑됩니다 (`>= 75` → social, `>= 45` → balanced, `< 45` → archive). 명확성을 위해 `preset` 사용을 권장합니다.
309
+
310
+ ### macOS — 하드웨어 가속
311
+
312
+ **Apple Silicon 및 Intel Mac**에서 Clipwise는 자동으로 `hevc_videotoolbox` (HEVC/H.265) 하드웨어 인코더를 사용합니다. 별도 설정 없이 소프트웨어 인코딩 대비 **~5–10× 빠른 인코딩** 속도를 제공합니다.
313
+
314
+ ```
315
+ macOS (HEVC VideoToolbox) → 44초짜리 1280×800 데모 기준 약 3분
316
+ Linux / Windows → 동일 품질 기준 약 8–12분 (libx264)
317
+ ```
318
+
319
+ VideoToolbox는 런타임에 자동 감지되며, 사용 불가 시 `libx264`로 자동 폴백합니다.
320
+
275
321
  ## AI로 시나리오 작성
276
322
 
277
323
  [PROMPTS.md](./PROMPTS.md)에 바로 사용할 수 있는 AI 프롬프트 템플릿이 있습니다. ChatGPT나 Claude에 복붙하고 내 사이트 URL만 넣으면 YAML 시나리오를 생성해줍니다.
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  Scriptable cinematic screen recorder for product demos — YAML in, polished MP4 out. Powered by Playwright CDP.
6
6
 
7
7
  <p align="center">
8
- <img src="https://github.com/kwakseongjae/clipwise/releases/download/v0.1.0/demo.gif" width="100%" alt="Clipwise Demo" />
8
+ <video src="https://kwakseongjae.github.io/clipwise/demo.mp4" autoplay loop muted playsinline width="100%"></video>
9
9
  </p>
10
10
 
11
11
  > *Generated with `npx clipwise demo` — zero config, one command.*
@@ -100,7 +100,7 @@ output:
100
100
  width: 1280
101
101
  height: 800
102
102
  fps: 30 # 1-60
103
- quality: 80 # 1-100 (MP4: maps to CRF)
103
+ preset: social # social | balanced | archive
104
104
 
105
105
  steps:
106
106
  - name: "Step name"
@@ -281,23 +281,56 @@ speedRamp:
281
281
  actionSpeed: 0.8 # Slow factor near clicks
282
282
  ```
283
283
 
284
+ ## Performance
285
+
286
+ Measured on **Apple M1 Max (10 cores)** — Pulse Dashboard demo, 44s @ 30fps, 1280×800:
287
+
288
+ | Stage | v0.3.0 | v0.4.0 | Change |
289
+ |-------|--------|--------|--------|
290
+ | Recording | 30.8 s | 31.1 s | — |
291
+ | Compose + Encode | 97.2 s | 60.6 s | **−38%** |
292
+ | **Total** | **127.9 s** | **91.7 s** | **−28%** |
293
+ | ms / frame | 69 ms | 67 ms | −3% |
294
+ | Frames captured | 1,303 | 902 | −31% (dedup) |
295
+
296
+ Key optimisations in v0.4.0: concurrent streaming pipeline, static frame deduplication (~33% skipped), per-worker StaticLayers cache, and raw RGBA buffer pipeline.
297
+
284
298
  ## Output Compression
285
299
 
286
- MP4 output uses `libx264` with `slow` preset and `animation` tuning for best quality-per-byte. The `quality` field maps to CRF:
300
+ Use the `preset` field to control quality and file size:
287
301
 
288
- | quality | CRF | Use case |
289
- |---------|-----|----------|
290
- | 90-100 | 0-5 | Lossless / archival |
291
- | 70-85 | 8-15 | High quality demos |
292
- | 50-70 | 15-26 | Web sharing |
293
- | 30-50 | 26-36 | Small file size |
302
+ ```yaml
303
+ output:
304
+ format: mp4
305
+ fps: 30
306
+ preset: social # social | balanced | archive
307
+ ```
308
+
309
+ | Preset | libx264 CRF | HEVC VideoToolbox q:v | Target use case |
310
+ |--------|-------------|----------------------|-----------------|
311
+ | `social` | 22 | 60 | Twitter, LinkedIn, Loom-style sharing (~2-4 MB / 30s) |
312
+ | `balanced` | 18 | 70 | General purpose, portfolio sites (~4-6 MB / 30s) |
313
+ | `archive` | 13 | 80 | High-fidelity storage, source masters (uncapped) |
314
+
315
+ **Recommended**: `preset: balanced` for most demos.
316
+
317
+ > **Legacy**: `quality: 1-100` still works and maps to the nearest preset (`>= 75` → social, `>= 45` → balanced, `< 45` → archive). Prefer `preset` for clarity.
318
+
319
+ ### macOS — Hardware Acceleration
320
+
321
+ On **Apple Silicon and Intel Mac**, Clipwise automatically uses `hevc_videotoolbox` (HEVC/H.265) for hardware-accelerated encoding. This delivers **~5–10× faster encoding** than software `libx264` with no setup required.
322
+
323
+ ```
324
+ macOS (HEVC VideoToolbox) → ~3 min wall time for a 44s, 1280×800 demo
325
+ Linux / Windows → ~8–12 min wall time (libx264, same quality)
326
+ ```
294
327
 
295
- **Recommended**: `quality: 80` for most demos (CRF ~10, good visual quality, ~3-7 MB for 30s).
328
+ VideoToolbox is detected at runtime no config needed. If VideoToolbox is unavailable, it falls back to `libx264` automatically.
296
329
 
297
330
  For further compression after export:
298
331
 
299
332
  ```bash
300
- # Re-encode with tighter CRF
333
+ # Re-encode with tighter settings
301
334
  ffmpeg -i input.mp4 -c:v libx264 -crf 26 -preset slow -movflags +faststart output.mp4
302
335
 
303
336
  # Convert to WebM (smaller, web-native)
@@ -327,7 +360,7 @@ effects:
327
360
  output:
328
361
  format: mp4
329
362
  fps: 30
330
- quality: 80
363
+ preset: social # social | balanced | archive
331
364
 
332
365
  steps:
333
366
  - name: "Open app"