---
name: "youtube-to-text"
description: "YouTube videos extrahieren, transkribieren, zusammenfassen, slide decks generieren."
---

# Skill: YouTube to Text

## Purpose
YouTube videos extrahieren, transkribieren, zusammenfassen, slide decks generieren.

## Workflow

### 1. Metadata Extraction
```
curl -s "https://noembed.com/?url=https://www.youtube.com/watch?v=VIDEO_ID"
```
Get: title, author, duration, description.

Fallback:
```
yt-dlp --dump-json https://www.youtube.com/watch?v=VIDEO_ID
```

### 2. Transcript Extraction
```
yt-dlp --write-sub --write-auto-sub --sub-lang de en https://www.youtube.com/watch?v=VIDEO_ID
```

Fallbacks wenn IP-blocked:
- `youtube-transcript-api` (npm)
- `https://youtubetranscript.com/` web_fetch
- summarize CLI skill

### 3. Summarization
Read transcript → generate summary.
- Key topics extracted
- Timestamp mapping
- Core teachings distilled

### 4. Slide Deck Generation
HTML presentation:
- Cyberpunk aesthetic (Orbitron font, neon glow, glitch effects)
- 15 slides covering core topics
- Image backgrounds (generated via image_generate or thumbnail)
- Navigation buttons (◄ ► + ▶ YouTube jump)
- Slide info labels with YouTube timestamps

### 5. Image Generation (Optional)
```
image_generate prompt="Cyberpunk aesthetic: [TOPIC] visualization. Glowing neon borders. Dark background with holographic display. AI architecture."
```

### 6. Sync & Serve
```
bash scripts/sync-downloads-to-webroot.sh
```
Public URL: `https://files.raumkommander.at/slides/[DECK_NAME].html`

## Nginx Config
```
location /slides/ {
    alias /var/www/openclaw-downloads/slides/;
    autoindex off;
    add_header Cache-Control "public, max-age=3600";
}
```

## HTML Template Structure
- Slide-border (neon glow)
- Image background (30vh, object-fit:cover)
- Content section (glow-cyan, glow-pink tags)
- Slide-number (bottom-right)
- Slide-info (bottom-left: label + YouTube timestamp)
- Navigation (◄ PREV, NEXT ►, ▶ YouTube)

## YouTube Timestamp Mapping
```
const youtubeTimestamps = {
  1: '0:00',    // Intro
  2: '3:00',    // Topic 1
  3: '7:00',    // Topic 2
  ...
};
function jumpYouTube() {
  window.open('https://www.youtube.com/watch?v=VIDEO_ID&t=' + youtubeTimestamps[current], '_blank');
}
```

## Notes
- YouTube IP blocking common — fallback transcript APIs needed
- `slides/` exclude in sync-downloads-to-webroot.sh to prevent deletion
- Cyberpunk aesthetic: Orbitron font, neon cyan/pink, glitch effects, holographic display
