# Media Ingest

Ingest video, audio, PDF, book, screenshot, and GitHub repo content into the brain.

- Repository: https://github.com/garrytan/gbrain (31427 stars)
- Category: Documents
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add garrytan/gbrain --skill media-ingest -g -a claude-code -y`
Codex: `npx skills add garrytan/gbrain --skill media-ingest -g -a codex -y`
Cursor: `npx skills add garrytan/gbrain --skill media-ingest -g -a cursor -y`
Gemini CLI: `npx skills add garrytan/gbrain --skill media-ingest -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add garrytan/gbrain`

## Description

Ingest video, audio, PDF, book, screenshot, and GitHub repo content into the brain. Multi-format handling with entity extraction and backlink propagation. Covers video-ingest, youtube-ingest, and book-ingest subtypes.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Media Ingest Skill

Ingest video, audio, PDF, book, screenshot, and GitHub repo content into the brain.

> **Filing rule:** Read `skills/_brain-filing-rules.md` before creating any new page.

## Input

| Parameter | Required | Description |
|-----------|----------|-------------|
| source | yes | URL, file path, or uploaded file reference |
| title | no | Override title (auto-detected if omitted) |
| target_slug | no | Override page slug (auto-generated if omitted) |

## Contract

This skill guarantees:
- Every ingested media item has a brain page with analysis (not just a transcript dump)
- Transcripts (video/audio) saved in raw and human-readable formats
- Entity extraction: every person and company mentioned gets back-linked
- Raw source files preserved via `gbrain files upload-raw`
- Filing by primary subject, not by media format

> **Convention:** See `skills/conventions/quality.md` for Iron Law back-linking.

Every mention of a person or company with a brain page MUST create a back-link.

## Phases

### Phase 1: Identify format and fetch

| Format | Action |
|--------|--------|
| YouTube/video URL | Fetch transcript (Whisper, transcription service, or captions) |
| Audio file | Transcribe with available STT service |
| PDF | Extract text (OCR if needed) |
| Book PDF | Extract text, identify chapters/sections |
| Screenshot/image | OCR via vision model, extract text and entities |
| GitHub repo | Clone, read README + key files, summarize architecture |

### Phase 2: Upload raw source

Save the original file for provenance: `gbrain files upload-raw <file> --page <slug>`

### Phase 3: Create brain page

File by primary subject (not format). Use this template:

```markdown
# {Title}

**Source:** {URL or file path}
**Format:** {video/audio/PDF/book/screenshot/repo}
**Created:** {date}

## Summary
{Key points, not a transcript dump}

## Key Segments / Highlights
{For video/audio: timestamped highlights. For books: chapter summaries.}

The rest: https://github.com/garrytan/gbrain/blob/HEAD/plugin-variants/gbrain-daily/skills/media-ingest/SKILL.md
