| name | transcribe-youtube |
| description | Download and transcribe YouTube videos to markdown. Use when user says "transcribe youtube", "transcribe this video", "youtube transcript", or provides a YouTube URL to transcribe. |
YouTube Video Transcription
This skill downloads YouTube videos and transcribes them using Whisper, outputting a markdown file to the Obsidian vault.
Configuration
- Output directory:
~/obsidian/Intake/
- Temp directory:
/tmp/
- Whisper model: medium (good balance of speed and accuracy)
Workflow
Step 1: Extract Video ID and Metadata
First, get the video metadata:
yt-dlp --print "%(id)s|||%(title)s|||%(channel)s|||%(upload_date)s" "<URL>"
Parse the output to extract:
id - YouTube video ID
title - Video title
channel - Channel name
upload_date - Upload date (YYYYMMDD format)
Step 2: Download Audio
Download only the audio (much faster than full video):
yt-dlp -x --audio-format mp3 -o "/tmp/%(id)s.%(ext)s" "<URL>"
This creates /tmp/<video-id>.mp3
Step 3: Transcribe with Whisper
Run Whisper transcription:
whisper /tmp/<video-id>.mp3 --model medium --language en --output_format txt --output_dir /tmp
This creates /tmp/<video-id>.txt with the transcript.
Step 4: Create Markdown File
Read the transcript and format as markdown with frontmatter:
---
title: "<Video Title>"
source: <YouTube URL>
channel: <Channel Name>
date: <YYYY-MM-DD>
transcribed: <today's date>
type: transcript
---
# <Video Title>
**Source:** [<Channel Name>](<YouTube URL>)
**Date:** <YYYY-MM-DD>
---
<Transcript content>
Step 5: Save to Intake
Sanitize the title for use as filename (remove special characters, limit length):
- Replace
/, \, :, *, ?, ", <, >, | with -
- Limit to 100 characters
- Trim whitespace
Save to: ~/obsidian/Intake/<Sanitized-Title>.md
Step 6: Cleanup
Remove temporary files:
rm /tmp/<video-id>.mp3 /tmp/<video-id>.txt
Step 7: Confirm
Tell the user:
- The file was created at
Intake/<filename>.md
- Video title and channel
- Approximate transcript length
Error Handling
- Invalid URL: If yt-dlp fails to recognize the URL, inform the user it's not a valid YouTube URL
- Download failed: Check if video is private, age-restricted, or region-locked
- Whisper fails: Check if audio file exists and is not corrupted
- Long videos: Warn user that videos over 1 hour may take several minutes to transcribe
Notes
- Only downloads audio to save time and bandwidth
- Uses Whisper medium model for good accuracy without excessive processing time
- Transcripts go to Intake/ for later processing into Zettelkasten notes