Communitygithub.com

JantonioFC/skillsbank

從 MP4 影片中以可設定的間隔提取關鍵影格,執行 Tesseract OCR 辨識,並生成包含影片元資料與時間戳文字記錄的結構化 Markdown 報告。

skillsbank 是什麼?

這個技能(Skill)旨在讓 AI 代理(如 Codex CLI)能自動化處理 MP4 影片檔案,從中提取文字內容。其主要功能包括:使用 FFmpeg 以可設定的時間間隔(預設每30秒)擷取關鍵影格、利用 Tesseract OCR 對每個影格進行光學字元辨識,並將所有結果(含影片元資料與影格級別的文字轉錄)整合成一份結構化的 Markdown 報告。此技能特別適合處理無內建字幕的教學影片、簡報錄影或螢幕錄製,能產生可供搜尋的文字記錄。所有處理皆在本機進行,不涉及網路傳輸,安全性高。支援的平台為 Codex CLI,並需在本機安裝 FFmpeg 與 Tesseract OCR。

相容平台~Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/JantonioFC/skillsbank/tree/HEAD/skills/video-content-extractor

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

影片內容提取器

概述

自動從 MP4 影片檔案中,以可設定的時間間隔提取關鍵影格,對每個影格執行 OCR 文字辨識,並生成結構化的 Markdown 報告。報告內容包含影片元資料(時長、解析度、編碼格式)以及附有時間戳記的逐格 OCR 文字記錄。

此技能專為 Codex CLI 設計,且需在本機安裝 FFmpeg 和 Tesseract OCR。

何時使用此技能

  • 當你需要從影片簡報、講座或螢幕錄影中提取文字內容時。
  • 當你想為沒有內嵌字幕的影片檔案建立可搜尋的文字記錄時。
  • 當你需要以程式化方式分析影片內容並生成結構化摘要時。
  • 當使用者要求「讀取螢幕上的內容」或「從此影片中提取內容」時。

運作方式

步驟 1:分析影片元資料

此技能使用 ffprobe 提取影片元資料:時長、解析度、影格率、編碼資訊和檔案大小。

步驟 2:提取關鍵影格

使用 FFmpeg,技能以設定的間隔(預設:每 30 秒)擷取影格。每個影格會儲存為帶有時間戳記的 JPEG 圖片。

步驟 3:OCR 文字辨識

每個提取的影格由 Tesseract OCR 處理。如果預設的 PSM 模式未能回傳有意義的文字,則會回退使用全自動頁面分割模式。

步驟 4:生成 Markdown 報告

所有提取的資料會被整合成一份結構化的 Markdown 文件。

範例

範例 1:基本提取

Agent 提示詞: 使用 video-content-extractor 技能從 lecture.mp4 中提取內容

輸出會產生 lecture.md 以及 lecture_frames/ 目錄。

範例 2:自訂間隔

參數:video_path, output_dir, interval(seconds), lang 每 60 秒提取一次,僅 OCR 英文: python scripts/extract_video.py recording.mp4 ./output 60 eng

範例 3:雙語內容

使用預設的中文 + 英文 OCR 進行提取: python scripts/extract_video.py lecture.mp4 . 15 chi_sim+eng

最佳實踐

  • 對於節奏快、文字變化頻繁的內容,使用較短的間隔(10-15 秒)。
  • 對於簡報投影片或節奏慢的講座,使用較長的間隔(30-60 秒)以減少重複影格。
  • 對於中文內容,請確保已安裝 Tesseract 中文語言包(chi_sim)。

限制

  • 需安裝 FFmpeg 和 Tesseract OCR,且需可透過 PATH 存取。
  • Tesseract OCR 的準確度取決於影片品質、文字大小和字型清晰度。
  • 不提取音訊,也不執行語音轉文字。
  • 影格提取是基於時間(而非場景變化),可能會產生近乎重複的影格。
  • 大型影片搭配短間隔可能會產生大量影格,請確保有足夠的磁碟空間。

安全與注意事項

  • 此技能僅讀取影片檔案,並寫入提取的影格和 Markdown 報告。
  • 它不會透過網路發送任何資料,所有處理都在本機進行。
  • FFmpeg 和 Tesseract 會使用固定的、預先驗證過的參數來呼叫。
  • 此技能不會修改或刪除原始影片檔案。

常見問題

  • 問題:Tesseract 回傳亂碼文字 解決方案:確保已安裝正確的語言包。執行 tesseract --list-langs 來驗證。

  • 問題:FFmpeg 失敗並顯示「找不到」 解決方案:確保 FFmpeg 已加入 PATH。執行 ffmpeg -version 來驗證。

  • 問題:大型影片上 OCR 速度很慢 解決方案:增加 interval 參數以減少需要處理的影格數量。

相關技能

  • @media-summarizer - 用於透過視覺和音訊線索總結影片內容。
  • @document-ocr - 用於對靜態圖片或掃描文件執行 OCR,無需影片處理。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

JantonioFC/skillsbank

AI-powered image editing with style transfer and object removal

JantonioFC/skillsbank

Internationalization and localization patterns. Detecting hardcoded strings, managing translations, locale files, RTL support.

JantonioFC/skillsbank

Analise e auditoria de editais de leilao judicial e extrajudicial. Riscos ocultos, clausulas perigosas, debitos, ocupante e classificacao da oportunidade.

JantonioFC/skillsbank

Embed Photopea in web apps using photopea.js. Covers embedding, file I/O, scripting, exporting, layers, text, filters, and the full Photoshop-compatible API.

JantonioFC/skillsbank

Best practices for Remotion - Video creation in React

JantonioFC/skillsbank

Generate walkthrough videos from Stitch projects using Remotion with smooth transitions, zooming, and text overlays

JantonioFC/skillsbank

Seek and analyze video content using Memories.ai Large Visual Memory Model for persistent video intelligence

JantonioFC/skillsbank

Writes complete, structured landing pages optimized for SEO ranking, AEO citation, and visitor conversion. Activate when the user wants to write or generate a landing page for a product, service, or offer.

JantonioFC/skillsbank

Video and audio perception, indexing, and editing. Ingest files/URLs/live streams, build visual/spoken indexes, search with timestamps, edit timelines, add overlays/subtitles, generate media, and create real-time alerts.

JantonioFC/skillsbank

Upload, stream, search, edit, transcribe, and generate AI video and audio using the VideoDB SDK.

JantonioFC/skillsbank

Skill for discovering and researching autonomous AI agents, tools, and ecosystems using the AgentFolio directory.

JantonioFC/skillsbank

Expert in building portfolios that actually land jobs and clients - not just showing work, but creating memorable experiences. Covers developer portfolios, designer portfolios, creative portfolios, and portfolios that convert visitors into opportunities.

JantonioFC/skillsbank

Tool lifecycle UI components for React/Next.js from ui.inference.sh. Display tool calls: pending, progress, approval required, results. Capabilities: tool status, progress indicators, approval flows, results display. Use for: showing agent tool calls, human-in-the-loop approvals, tool output. Triggers: tool ui, tool calls, tool status, tool approval, tool results, agent tools, mcp tools ui, function calling ui, tool lifecycle, tool pending

JantonioFC/skillsbank

Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.

JantonioFC/skillsbank

When the user wants help with paid advertising campaigns on Google Ads, Meta (Facebook/Instagram), LinkedIn, Twitter/X, or other ad platforms. Also use when the user mentions 'PPC,' 'paid media,' 'ROAS,' 'CPA,' 'ad campaign,' 'retargeting,' 'audience targeting,' 'Google Ads,' 'Facebook ads,'...

JantonioFC/skillsbank

Create AI avatar and talking head videos with OmniHuman, Fabric, PixVerse via inference.sh CLI. Models: OmniHuman 1.5, OmniHuman 1.0, Fabric 1.0, PixVerse Lipsync. Capabilities: audio-driven avatars, lipsync videos, talking head generation, virtual presenters. Use for: AI presenters, expla...

JantonioFC/skillsbank

Create AI marketing videos for ads, promos, product launches, and brand content. Models: Veo, Seedance, Wan, FLUX for visuals, Kokoro for voiceover. Types: product demos, testimonials, explainers, social ads, brand videos. Use for: Facebook ads, YouTube ads, product launches, brand awarene...

JantonioFC/skillsbank

Generate AI videos with Google Veo, Seedance, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 1.5 Pro, Wan 2.5, Grok Imagine Video, OmniHuman, Fabric, HunyuanVideo. Capabilities: text-to-video, image-to-video, lipsync, avatar animation, video upscaling, fole...

JantonioFC/skillsbank

Production-ready CI/CD configurations for Playwright — GitHub Actions, GitLab CI, CircleCI, Azure DevOps, Jenkins, Docker, parallel sharding, reporting, code coverage, and global setup/teardown.

JantonioFC/skillsbank

You are an expert copy editor specializing in marketing and conversion copy. Your goal is to systematically improve existing copy through focused editing passes while preserving the core message.

相關技能