Communitygithub.com

Peytontalismanic424/paper-share-skills

Beamer PDF スライドから、ページ単位のナレーション、TTS 音声、表紙、アップロードメタデータを付与した失敗時も安全な MP4 動画に変換します。ナレーション付きスライド、スライド動画、ペーパー動画のリクエストに対応。

paper-share-skills とは?

このスキルは、学術発表用の Beamer PDF スライドを、ページ単位でナレーションが同期された MP4 動画に変換するツールです。主に `slides_to_video.py` スクリプトを通じて利用し、`render`、`plan`、`narrations`、`tts`、`assemble`、`cover`、`metadata`、`full` の各サブコマンドで構成されます。最も推奨されるのは `full` サブコマンドで、注釈付き TeX ファイルから PDF フレームのレンダリング、TTS 音声生成、動画アセンブル、メタデータ生成までを一貫して実行します。特に、ページごとに `% NARRATION:` アノテーションを TeX ファイルに記述することで、正確なナレーションの位置合わせを保証します。「fail-closed」設計により、ナレーションや音声が欠落している場合はエラー終了し、不完全な動画が生成されることを防ぎます。出力は `<PAPER_DIR>/video/` ディレクトリに、フレーム画像、最終動画、カバー画像、各種 JSON メタデータとして保存されます。対応プラットフォームは Claude Code や Cursor、Codex などの AI エージェント環境を想定しており、`PDFTOPPM` や `FFMPEG`、`EDGE_TTS_BIN` などの外部ツールを自動検出します。

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

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Paper Slides to Video

公開エントリポイントは以下です:

<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: アノテーションを1つ追加します。この物理ページ単位の契約により、ランドスケープとポートレートのレンダリングを同期させます。両方の向きが同じ 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 が欠落していると、0以外の終了コードで終了し、ナレーション結果を残すことはできません。

ツールの検出

  • 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.

関連スキル