xiaohongshu
xiaohongshu
ingest-youtube
Extract transcripts from YouTube videos. Use when user says "get transcript", "transcribe this video", "what does this YouTube video say", "extract captions", "youtube transcript", or provides a YouTube URL and wants the text content.
Full skill instructions
Extract transcripts from YouTube videos with three-tier fallback:
cd .pi/skills/ingest-youtube
# Get transcript (auto-fallback through all tiers)
uv run python youtube_transcript.py get -i dQw4w9WgXcQ
# Skip proxy tier
uv run python youtube_transcript.py get -i VIDEO_ID --no-proxy
# Skip whisper tier
uv run python youtube_transcript.py get -i VIDEO_ID --no-whisper
# List available transcript languages
uv run python youtube_transcript.py list-languages -i VIDEO_ID
# Check proxy configuration
uv run python youtube_transcript.py check-proxy
uv run python youtube_transcript.py get \
--url "https://youtube.com/watch?v=dQw4w9WgXcQ" \
--lang en
Options:
| Option | Short | Description |
|---|---|---|
--url | -u | YouTube video URL |
--video-id | -i | Video ID directly |
--lang | -l | Language code (default: en) |
--no-proxy | Skip proxy tier | |
--no-whisper | Skip Whisper fallback tier | |
--retries | -r | Max retries per tier (default: 3) |
Output: JSON with transcript segments (text, start time, duration)
uv run python youtube_transcript.py list-languages -i VIDEO_ID
Output: JSON with available transcript languages
uv run python youtube_transcript.py check-proxy
uv run python youtube_transcript.py check-proxy --test-rotation
Tests IPRoyal proxy connectivity and IP rotation.
{
"meta": {
"video_id": "dQw4w9WgXcQ",
"language": "en",
"took_ms": 3029,
"method": "direct"
},
"transcript": [
{"text": "Hello world", "start": 0.0, "duration": 2.5},
{"text": "This is a test", "start": 2.5, "duration": 3.0}
],
"full_text": "Hello world This is a test...",
"errors": []
}
Method values: direct, proxy, whisper-local, whisper-api, or null (if all failed)
.env fileEnvironment variables (in .env):
| Variable | Description |
|---|---|
IPROYAL_HOST | Proxy host (e.g., geo.iproyal.com) |
IPROYAL_PORT | Proxy port (e.g., 12321) |
IPROYAL_USER | Proxy username |
IPROYAL_PASSWORD | Proxy password |
Note: Some channels (like TheRemembrancer) have NO native captions, so 100% of videos require Whisper fallback. This is significantly slower but fully automatic.
pip install youtube-transcript-api requests yt-dlp openai faster-whisper rich
youtube-transcript-api - Tier 1 & 2requests - Proxy supportyt-dlp - Tier 3 audio downloadfaster-whisper - Tier 3 local transcription (CTranslate2, 4-8x faster than openai-whisper)openai - Tier 3 API transcription (fallback if local fails)rich - Progress displayDownload transcripts from entire channels with intelligent rate limiting:
# Get all video IDs from a YouTube channel
yt-dlp --flat-playlist --print id "https://www.youtube.com/@ChannelName/videos" > videos.txt
uv run python youtube_transcript.py batch \
--input videos.txt \
--output ./transcripts \
--delay-min 5 --delay-max 15 \
--whisper \
--resume
Options:
| Option | Short | Description |
|---|---|---|
--input | -f | File with video IDs (one per line) |
--output | -o | Output directory for transcripts |
--delay-min | Minimum delay between requests (default: 30) | |
--delay-max | Maximum delay between requests (default: 60) | |
--lang | -l | Language code (default: en) |
--no-proxy | Skip proxy tier | |
--whisper/--no-whisper | Enable/disable Whisper fallback | |
--resume/--no-resume | Resume from last position (default: True) | |
--max | -n | Max videos to process (0 = all) |
The batch processor uses adaptive delays based on fetch method:
This dramatically speeds up channels with native captions while remaining cautious after failures.
Batch processing saves state after each video to .batch_state.json in the output directory. State includes:
If interrupted, simply re-run the same command to resume from where it left off.
The supervisor provides:
cd .pi/skills/ingest-youtube
# Single batch with supervisor
uv run python supervisor.py run \
--input videos.txt \
--output ./transcripts \
--delay-min 5 --delay-max 15
# Multiple batches from config
uv run python supervisor.py multi --config batches.json
{
"jobs": [
{
"name": "Luetin09",
"input": "/path/to/luetin09_videos.txt",
"output": "/path/to/luetin09",
"delay_min": 5,
"delay_max": 15,
"max_restarts": 20,
"hung_timeout": 600
},
{
"name": "Remembrancer",
"input": "/path/to/remembrancer_videos.txt",
"output": "/path/to/remembrancer",
"delay_min": 5,
"delay_max": 15,
"max_restarts": 20,
"hung_timeout": 2700
}
]
}
Config options:
| Option | Description | Default |
|---|---|---|
name | Job display name | filename |
input | Path to video IDs file | required |
output | Output directory | required |
delay_min | Min delay seconds | 30 |
delay_max | Max delay seconds | 60 |
max_restarts | Max automatic restarts | 10 |
hung_timeout | Seconds without progress before restart | 1800 |
Hung timeout recommendations:
# Human-readable output
uv run python supervisor.py status --output ./transcripts
# JSON output for agents
uv run python supervisor.py status --output ./transcripts --json
JSON output:
{
"output_dir": "./transcripts",
"completed": 150,
"stats": {"success": 145, "failed": 3, "skipped": 2, "rate_limited": 0, "whisper": 50},
"current_video": "dQw4w9WgXcQ",
"current_method": "whisper",
"last_updated": "2026-01-21 15:30:00",
"consecutive_failures": 0
}
Tier 3 uses faster-whisper (CTranslate2 optimized) by default:
Model size: base (good balance of speed/quality)
Performance benchmarks:
| Video Length | GPU Time | CPU Time |
|---|---|---|
| 10 min | ~30 sec | ~2 min |
| 1 hour | ~3 min | ~15 min |
| 10 hours | ~15 min | ~90 min |
| Channel Type | Native Captions | Rate | ETA (1000 videos) |
|---|---|---|---|
| Most channels | Yes | ~200-400/hr | 3-5 hours |
| No captions (e.g., Remembrancer) | No (100% Whisper) | ~4-12/hr | 80-250 hours |
Start the status API server:
cd .pi/skills/ingest-youtube
uv run python status_api.py --port 8765
Then from any project/agent:
# List all jobs
curl http://localhost:8765/
# Get all job status (aggregated)
curl http://localhost:8765/all
# Get specific job status
curl http://localhost:8765/status/luetin09
curl http://localhost:8765/status/remembrancer
Response format:
{
"jobs": {
"luetin09": {"completed": 535, "stats": {...}, "current_video": "..."},
"remembrancer": {"completed": 183, "stats": {...}, "current_video": "..."}
},
"totals": {"completed": 718, "success": 88, "failed": 2, "whisper": 24}
}
# Simple status check
python .pi/skills/ingest-youtube/status.py /path/to/transcripts
# Watch mode (updates every 5s)
python .pi/skills/ingest-youtube/status.py /path/to/transcripts --watch
# Read state file directly (no dependencies)
cat /path/to/transcripts/.batch_state.json | jq '{completed: .completed | length, stats, current_video, last_updated}'
Active batch locations:
/home/graham/workspace/experiments/pi-mono/run/youtube-transcripts/luetin09/home/graham/workspace/experiments/pi-mono/run/youtube-transcripts/remembrancerThe supervisor monitors progress and auto-restarts hung processes. If a process shows no progress for hung_timeout seconds, it will be killed and restarted.
Symptoms:
current_method: "fetching" for >10 minutes → likely hungcurrent_method: "whisper" for >45 minutes on non-huge video → may be hungManual restart:
# Kill specific batch process
kill -9 <PID>
# Supervisor will auto-restart it
Some channels have NO native captions. Check:
uv run python youtube_transcript.py list-languages -i VIDEO_ID
If empty, the video has no captions and requires Whisper.
uv run python youtube_transcript.py check-proxy--test-rotation to verify IP rotationxiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience