pdf-to-video

0
0
Source

Use when user wants to convert a PDF document into a showcase video, extract key points from PDF, or create video presentation from PDF file

Install

mkdir -p .claude/skills/pdf-to-video && curl -L -o skill.zip "https://mcp.directory/api/skills/download/5782" && unzip -o skill.zip -d .claude/skills/pdf-to-video && rm skill.zip

Installs to .claude/skills/pdf-to-video

About this skill

PDF to Video

将 PDF 文档转换为展示视频,自动提取核心观点并生成动态展示。

工作流程

digraph pdf_to_video {
    rankdir=TB;
    "接收 PDF 路径" -> "读取 PDF 内容";
    "读取 PDF 内容" -> "分析提取核心观点";
    "分析提取核心观点" -> "生成 props.json";
    "生成 props.json" -> "复制 PDF 到 public";
    "复制 PDF 到 public" -> "执行 remotion render";
    "执行 remotion render" -> "输出 MP4 视频";
}

步骤详解

1. 读取 PDF 文件

使用 Read 工具读取用户提供的本地 PDF 文件路径。

2. 分析并提取核心观点

从 PDF 内容中识别:

  • 标题:文档主标题,通常在首页
  • 副标题:可选,如"核心内容概览"
  • 核心观点:3-5 个关键页面及其标题
  • 内容描述:每个关键页面的简要说明(1-2 句话),用于底部打字机效果展示

分析时关注:

  • 章节标题和大纲
  • 重点段落(加粗、高亮)
  • 摘要和结论部分
  • 图表和数据页面

3. 生成配置并渲染

目录结构:

props/           # 配置文件目录
  glm45.json     # 以文档名命名
  report-2024.json
out/             # 输出视频目录
  glm45.mp4
  report-2024.mp4
public/          # 源 PDF 文件
  document.pdf

创建 props/<name>.json

{
  "src": "/document.pdf",
  "title": "文档标题",
  "subtitle": "核心内容概览",
  "highlights": [1, 3, 7, 12, 15],
  "pageTitles": {
    "1": "封面",
    "3": "执行摘要",
    "7": "市场分析"
  },
  "pageDescriptions": {
    "1": "这是文档的封面页,展示了报告的主题和作者信息。",
    "3": "执行摘要概述了报告的核心发现和建议。",
    "7": "市场分析部分详细分析了当前市场趋势和竞争格局。"
  }
}

执行命令:

# 复制 PDF 到 public 目录
cp /path/to/source.pdf ./public/document.pdf

# 写入配置到 props 目录(使用 Write 工具)

# 渲染视频(配置和输出使用相同命名)
npx remotion render PdfShowcase out/<name>.mp4 --props=./props/<name>.json

Props 参数说明

参数类型必填说明
srcstringPDF 文件路径,相对于 public 目录
titlestring主标题
subtitlestring副标题
highlightsnumber[]要聚焦展示的页码
pageTitlesRecord<string, string>每页的标题
pageDescriptionsRecord<string, string>每页的内容描述,底部打字机效果展示
scriptScriptItem[]自定义脚本,完全控制展示流程

场景类型

可通过 script 参数使用不同的展示模式:

类型说明默认时长
stack卡片堆叠展示60 帧
focus聚焦放大某页120 帧
switch滑动切换120 帧
fan扇形轮盘展示150 帧

扇形模式示例:

{
  "script": [
    { "type": "stack", "duration": 60 },
    { "type": "fan", "page": 1, "duration": 150 },
    { "type": "fan", "page": 3, "duration": 150 },
    { "type": "stack", "duration": 120 }
  ]
}

输出

  • 视频文件:out/<name>.mp4
  • 格式:MP4
  • 分辨率:1920x1080
  • 帧率:30fps

示例交互

用户: 帮我把这个 PDF 转成展示视频:/Users/me/docs/report-2024.pdf

执行:

  1. 读取 PDF 内容
  2. 分析识别:标题"2024年度报告",核心观点在第1、3、7、12、15页
  3. 复制 PDF 到 public/report-2024.pdf
  4. 生成配置 props/report-2024.json
  5. 执行 npx remotion render PdfShowcase out/report-2024.mp4 --props=./props/report-2024.json
  6. 告知用户视频已生成在 out/report-2024.mp4

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

643969

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

591705

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

318399

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

340397

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

452339

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

304231

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.