Communitygithub.com

论文幻灯片转视频

将Beamer PDF幻灯片转换为带有页面对齐旁白、TTS音频、封面和上传元数据的故障关闭式MP4视频。触发条件为旁白幻灯片、幻灯片视频或论文视频请求。

论文幻灯片转视频 是什么?

该技能用于将Beamer PDF幻灯片自动转换为带旁白的MP4视频,适合学术论文演示或技术分享场景。它支持页面精确对齐的旁白生成、文本转语音(TTS)音频合成、封面创建以及元数据生成。用户可以通过CLI子命令逐步执行渲染、旁白注释、TTS、组装、封面和元数据生成等步骤,或者使用`full`命令一键完成整个流程。该技能严格要求旁白与每页物理幻灯片一一对应,确保多方向渲染的一致性,并且在旁白或音频缺失时会以非零退出码终止,实现故障关闭。支持通过环境变量或PATH发现依赖工具(如pdftoppm、ffmpeg、ffprobe、edge-tts),适用于Linux/macOS平台,并可与批处理流水线、B站上传等技能协同工作。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Peytontalismanic424/paper-share-skills/tree/HEAD/paper-slides-to-video

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

论文幻灯片转视频 是做什么的?

公开入口点为:

<SKILLS_DIR>/paper-slides-to-video/scripts/slides_to_video.py

在包环境中运行:

uv run --project <SKILLS_DIR>/paper-slides-to-video python <SKILLS_DIR>/paper-slides-to-video/scripts/slides_to_video.py <子命令>

精确CLI

  • render PDF FRAME_DIR [--dpi 200]
  • plan TEX
  • narrations FRAME_DIR TEX --annotated-tex ANNOTATED_TEX
  • tts FRAME_DIR [--lang zh]
  • assemble FRAME_DIR OUTPUT [--pad-sec 0.5] [--speed 1.25]
  • cover FIRST_FRAME OUTPUT
  • metadata TEX COVER OUTPUT
  • full PAPER_DIR --annotated-tex ANNOTATED_TEX

必需完整工作流

  1. 在调用此包之前,先编译 slides-beamer/main.pdf。
  2. 将 slides-beamer/main.tex 复制为 video/main_with_narration.tex,并为每个渲染的物理页面添加一条非空的 % NARRATION: 注释。这种逐物理页面的约定保证了横向和纵向渲染的一致性:两种方向都由相同的PDF页面组装而成,因此旁白/音频基数约束对每个方向都同等适用。
  3. 使用带注释的TeX路径运行 full 命令。
uv run --project <SKILLS_DIR>/paper-slides-to-video python <SKILLS_DIR>/paper-slides-to-video/scripts/slides_to_video.py full "<PAPER_DIR>" --annotated-tex "<PAPER_DIR>/video/main_with_narration.tex"

full 命令在处理前会删除任何过时的旁白输出。它要求精确的PNG/TXT/MP3基数、非空的旁白和音频、可探测的正向音频持续时间,以及包含视频和音频流的组装MP4文件。缺少旁白或MP3会导致非零退出,并且不会留下任何旁白结果。

工具发现

  • PDFTOPPM 或 POPPLER_DIR(包含 pdftoppm 的目录),然后是 PATH
  • FFMPEG,然后是 PATH
  • FFPROBE,然后是 PATH
  • EDGE_TTS_BIN,然后是 PATH

静默从来不是隐含的。程序调用者只能通过调用 encode_slide(..., require_audio=False) 来创建有意静音的页面。公共默认值是 require_audio=True。

输出写入 <PAPER_DIR>/video/ 目录下:video_frames/、<paper>_narrated.mp4、cover.png、frames_data.json、narrations.json 和 video_meta.json。

相关技能

  • skill://batch-papers-single-omp-full-pipeline
  • skill://batch-slides-to-video
  • skill://blog-to-bilibili
  • skill://edge-tts-retry-video-driver
  • skill://index-tts-fallback

Individual skills in this repo

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

Peytontalismanic424/paper-share-skills

Validate and upload narrated paper videos to Bilibili with biliup. Handles required landscape-first/portrait-second submissions, series uploads, CST scheduling, diagnostics, dry-run validation, and durable upload receipts. Trigger on: "upload to bilibili", "bilibili upload", "发布到B站", "上传到B站".

Peytontalismanic424/paper-share-skills

Download the TeX source (e-print tar.gz) of an arXiv paper from an arXiv URL or bare ID, and unpack it into paper_src/. Use FIRST whenever a pipeline input is an arXiv link and the TeX source is preferred over the PDF (paper-to-beamer, paper-to-bilibili, paper-venue-discovery). Invoke with an arXiv URL (abs/pdf/e-print, arxiv.org or export.arxiv.org) or a bare ID like 2509.07996v4.

Peytontalismanic424/paper-share-skills

Automated pipeline: paper (PDF or TeX source) → SUSTech Beamer slides (11-section 论文分享 structure) → compiled PDF. When TeX source is available, skip MinerU and extract content directly from LaTeX. Use when the user asks to create Beamer slides from an academic paper, or says "论文分享", "paper to slides", "make beamer from paper". Invoke with an absolute or relative path to a PDF, .tar.gz TeX archive, .tex file, or an arXiv URL/ID (source TeX is downloaded first via skill://paper-download-arxiv-paper-source).

Peytontalismanic424/paper-share-skills

Orchestrate a paper PDF through MinerU, SUSTech Beamer slides, complete Chinese narration, landscape and portrait video, metadata gates, and Bilibili upload. Supports single-paper and batch slides, video, or bilibili phases. Trigger on full paper-to-Bilibili requests, PDF-to-video publication, and batch paper publishing.

Peytontalismanic424/paper-share-skills

Generate a deterministic 16:10 video-cover poster from a paper directory. Extracts paper metadata and figures and atomically produces poster.tex, poster.pdf, and poster.png. Use for paper-video covers, not conference posters.

Peytontalismanic424/paper-share-skills

Convert a PDF (especially academic papers) to clean Markdown using MinerU — preserves reading order, LaTeX equations, tables, and figures, and runs on the GPU. Use when the user asks to convert/extract a PDF to markdown/text. Invoke directly — no need for the user to type the skill name.

Peytontalismanic424/paper-share-skills

Fix for undefined \setsource/\setdomains/\setpresenter/\setvenue commands when compiling SUSTech Beamer slides from the standard template. Copy the extended beamerthemesustech.sty from the sustech-slides-template repository.

相关技能