yt-dlp Metadata & Subtitles
Calls extract_info(download=False) to fetch caption, creator, duration, upload date, and embedded subtitles without downloading video.
A local-first pipeline that extracts captions, Whisper speech transcripts, and Gemini Vision frame OCR, writing deduplicated Markdown notes directly into an existing 3-layer Obsidian LLM Wiki vault.
Every item moves through a 3-stage waterfall. Extracted payloads are stored in sources/reels/<shortcode>.json, and raw media files never enter the vault.
Calls extract_info(download=False) to fetch caption, creator, duration, upload date, and embedded subtitles without downloading video.
Runs only when caption length is under min_caption_chars and no usable subtitles exist. Uses Groq whisper-large-v3-turbo or local faster-whisper.
Extracts 4 evenly spaced frames via ffmpeg when both caption and transcript remain short, then reads on-screen code, slides, or diagrams.
Select one of the four tested Instagram URLs from docs/example-walkthrough.md to inspect URL normalization, stage routing, and output behavior.
Canonical:
Every entry point shares the same queue, deduplication index, and vault writer. Use arrow keys or click a tab to inspect each interface.
# Interactive setup wizard (creates config.yaml + .env)
reels-sync init
# Verify Python, ffmpeg, cookies, API keys, and vault permissions
reels-sync doctor
# Enqueue a single Reel (or /share/ redirect URL)
reels-sync ingest "https://www.instagram.com/reel/DAbCdEfGhIj/?igsh=xyz"
# Import saved_posts.json from an Instagram export
reels-sync import-ig ~/Downloads/instagram-export/ --reels-only
# Preview pending items without spending API calls
reels-sync process --dry-run
# Extract, synthesize, and update _index.md + _log.md
reels-sync process --limit 10 --retry-failed
# Re-synthesize from sources/reels/<shortcode>.json offline
reels-sync reprocess DAbCdEfGhIj
# Queue counts, extraction stages, and LLM token usage JSON
reels-sync --json stats
{
"mcpServers": {
"reels-wiki": {
"command": "/path/to/reels-secretary/.venv/bin/reels-wiki-mcp",
"env": {
"REELS_WIKI_CONFIG": "/path/to/reels-secretary/config.yaml"
}
}
}
}
// Tools: enqueue_reel, import_ig_export, process_reels_queue, get_queue_stats, reprocess_reel, search_vault_notes
from reels_wiki import enqueue, load_config, process_queue
cfg = load_config()
enqueue("https://www.instagram.com/reel/DAbCdEfGhIj/", "script", vault=cfg.vault_path)
summary = process_queue(cfg, limit=3)
print(summary)
# Set TELEGRAM_BOT_TOKEN and numeric TELEGRAM_ALLOWED_CHAT_ID in .env
reels-sync telegram
# Mobile flow:
# Share Reel -> Telegram -> Your bot
# The bot rejects all other chat IDs, validates the shortcode,
# and appends to inbox/reels-queue.jsonl without processing inline.
# Run `reels-sync process --limit 10` on a schedule to digest.
1. Deduplicate by 11-character shortcode before queuing.
2. Never copy video or audio files into the Obsidian vault.
3. Read _CLAUDE.md and _index.md before synthesis to match folders and tags.
4. Downgrade unmatched wikilinks to "(new note candidate) ..." plain text.
5. Preserve user edits to status and created frontmatter on forced re-runs.
Model output is treated as untrusted input and normalized against your vault schema before any file is written.
Scans _CLAUDE.md, _index.md, and note frontmatter for allowed folders and #tags. Excludes sources/ and inbox/ as note destinations.
Checks related_wikilinks against real vault note titles and filenames. Unknown targets are rendered as plain text (new note candidate) ....
Writes snapshots to inbox/reels-queue.jsonl under an exclusive file lock. Stale processing entries auto-reset on the next run, and lost indexes rebuild from the queue.
Generates Turkish titles for Turkish Reels and technical English otherwise, while transliterating Turkish characters into clean ASCII filenames.
Persists extracted payloads in sources/reels/<shortcode>.json so reels-sync reprocess --all can regenerate notes without touching Instagram or Whisper.
Covers URL parsing, Instagram export ingestion, writer idempotency, and JSON repair retries without making network or LLM calls.
Requires Python 3.10 or newer and ffmpeg on your PATH for audio or frame fallbacks.
# PyPI
pip install reels-wiki
# Homebrew (macOS / Linux)
brew install AtaCanYmc/tap/reels-wiki
# From source
git clone https://github.com/AtaCanYmc/reels-wiki.git && cd reels-wiki && pip install -e ".[dev]"
cp config.example.yaml config.yaml
# Set vault_path to your Obsidian vault directory
# Under extraction:, set cookies_from_browser: chrome (or cookies_file: ~/cookies.txt)
cat << 'EOF' > .env
GROQ_API_KEY=your_groq_api_key
GEMINI_API_KEY=your_gemini_api_key
EOF
reels-sync doctor
reels-sync stats