Design & media

transcribe-video

Try it

Extract transcript or subtitles from a local video file. Use this skill whenever the user asks to transcribe a video, extract speech-to-text, get subtitles,...

What it does

Extract transcript text from a local video file. The skill checks for embedded subtitles first (faster and more accurate), and only falls back to API-based speech recognition if none are found.

The skill document

Transcribe Video

Extract transcript text from a local video file. The skill checks for embedded subtitles first (faster and more accurate), and only falls back to API-based speech recognition if none are found.

Step 1: Identify the video file

Confirm the video file path with the user. Supported formats: mp4, mkv, mov, avi, webm, and any format ffmpeg can handle.

Step 2: Check for embedded subtitles

ffprobe -v quiet -select_streams s -show_entries stream=index,codec_name:stream_tags=language,title -of json ""
  • If subtitle streams exist → go to Step 3a (extract embedded subtitles)
  • If no subtitle streams → go to Step 3b (API transcription)

Step 3a: Extract embedded subtitles

If multiple subtitle tracks exist, prefer the one matching the video's primary language or ask the user which track to use.

# Extract as SRT (stream index 0 for first subtitle track; adjust if needed)
ffmpeg -i "" -map 0:s:0 -c:s srt ".srt" -y

After extraction, convert SRT to clean text:

  • Remove sequence numbers
  • Remove timestamp lines (lines matching \d{2}:\d{2}:\d{2})
  • Remove HTML-like tags (, , etc.)
  • Join remaining non-empty lines

Save the clean transcript to .txt next to the video file. Done — skip Step 3b.

Step 3b: API-based transcription

Use the bundled transcription script. It reads credentials from ~/.transcribe_video.env.

Prerequisites check

  1. Verify the env file exists:

    test -f ~/.transcribe_video.env && echo "OK" || echo "MISSING"
    
  2. If MISSING, tell the user to create ~/.transcribe_video.env with:

    OPENAI_API_KEY=your-key-here
    # Optional Base URL:
    # OPENAI_API_BASE=https:///v1/
    # Optional Model Name:
    # TRANSCRIBE_MODEL=gpt-4o-transcribe
    

    Wait for the user to confirm before proceeding.

  3. Verify dependencies:

    python3 -c "from openai import OpenAI; from dotenv import load_dotenv; print('OK')" 2>&1
    

    If missing: pip install openai python-dotenv

Run transcription

python3 /scripts/transcribe.py ""

The script extracts audio (WAV, 16kHz mono), sends it to the API, and saves the transcript to .txt next to the video file.

Step 4: Report results

Tell the user:

  • Where the transcript file was saved
  • How many lines / approximate word count
  • Whether it came from embedded subtitles or API transcription
  • Display the first few lines as a preview

Related skills

Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.

by johnpatternai21 installs8 stars

Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.

by nssa.io1.0k installs47 stars

Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.

by Iván1 installs

Read and write Excel workbooks, worksheets, ranges, tables, and charts in OneDrive through Microsoft Graph with managed OAuth.

by byungkyu800 installs42 stars

Fetch raw ad creative, app, ranking, and revenue data from AdMapix as structured JSON.

by fly0pants

More from feiskyer

Browse all skills

深度调研的多Agent编排工作流:把一个调研目标拆成可并行子目标,用 Claude Code 非交互模式(`claude -p`)运行子进程;联网与采集优先使用已安装的 skills,其次使用 MCP 工具;用脚本聚合子结果并分章精修,最终交付"成品报告文件路径 + 关键结论/建议摘要"。用于:系统性网页/资料调...

by feiskyer39 installs1 stars

Execute long-running, multi-session tasks autonomously using Claude Code headless mode or in-session hook-based loops. Supports structured task decomposition...

by feiskyer37 installs1 stars

Use when user asks to leverage codex, gpt-5, or gpt-5.1 to implement something (usually implement a plan or feature designed by Claude). Provides non-interac...

by feiskyer38 installs1 stars

Use when user asks to leverage claude or claude code to do something (e.g. implement a feature design or review codes, etc). Provides non-interactive automat...

by feiskyer35 installs1 stars

Use xfetch CLI to fetch X/Twitter data - tweets, user profiles, search results, timelines, lists, DMs, and notifications. Use this skill whenever you need to...

by feiskyer30 installs1 stars

Extract subtitles/transcripts from YouTube videos. Triggers: "youtube transcript", "extract subtitles", "video captions", "视频字幕", "字幕提取", "YouTube转文字", "提取字幕".

by feiskyer34 installs2 stars