Communitygithub.com

JantonioFC/skillsbank

从MP4视频中按可配置间隔提取关键帧,运行Tesseract OCR,并生成包含视频元数据和带时间戳文本转录的结构化Markdown报告。

skillsbank 是什么?

该技能自动从MP4视频文件中按可配置的时间间隔提取关键帧,对每个帧执行OCR文本识别,并生成结构化的Markdown报告。报告包含视频元数据(如时长、分辨率、编码器)以及逐帧的OCR转录结果,并附有时间戳引用。此技能专为Codex CLI设计,需要本地机器上安装FFmpeg和Tesseract OCR。它特别适用于从视频演示、讲座或截屏中提取文本内容,或为没有内嵌字幕的视频创建可搜索的转录文本。默认每30秒提取一帧,若默认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失败并显示“not found” 解决方案:确保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.

相关技能