Communitygithub.com

tiancc-cyber/youtube-subtitle-collage

Create native subtitle quote collages from YouTube or local interview videos, supporting real video, OCR subtitles, manual quote selection, and equal-font-size stitching; generate opinionated reader copy, and publish to Chrome Douyin or schedule, or Xiaohongshu draft or publish, with material verification and checkpoint receipts.

What is youtube-subtitle-collage?

This skill, `tiancc-cyber/youtube-subtitle-collage`, enables developers to generate authentic subtitle quote collages from YouTube or local interview videos. It prioritizes preserving original language, subtitles, watermarks, and real scene cuts without regenerating characters or converting quotes into oversized titles. The workflow uses a Python-based script ecosystem for media handling, OCR (default Apple Vision on macOS), rendering, and selection management. It supports a native mode that only uses genuine video frames, cropping subtitle strips from proportional frames rather than adding artificial elements. The skill also provides browser publishing capabilities via Computer Use or AppleScript for platforms like Chrome-based Douyin and Xiaohongshu, including draft creation, scheduling, and material verification with detailed progress tracking. Key features include manual quote selection with context risk display, automatic reader copy generation only when required, and strict validation steps to prevent unauthorized edits or publishing. It is designed for real subtitle tracing, not synthetic generation, and includes robust error handling with bounded retry strategies.

Works with~Claude Code~Codex CLI~Cursor
npx skills add tiancc-cyber/youtube-subtitle-collage

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

YouTube Subtitle Quote Collage

Deliver traceable, authentic video subtitle collages, not regenerated characters or quotes redrawn as large titles. Default to preserving original language, original subtitles, watermarks, and real scene cuts. Use this package's scripts; do not rely on other skills or absolute paths from old projects.

Getting Started or Continuing

  • First, locate the Python environment and the user's output directory; for existing jobs, run scripts/workflow.py status JOB.

  • Read the Runbook before operating media, OCR, and rendering. For initial deployment, read Environment & Troubleshooting.

  • Read the Data Structure before creating or importing shortlist/selection/captions.

  • Reuse existing dependencies if already available; do not arbitrarily install global software, change system proxy, or read browser cookies.

  • Do not force generation of social platform copy when only creating images; generate platform draft only when the user requests a complete content workflow, and do not arbitrarily add accounts or publishing targets.

  • When the user requests publishing existing images, directly read Browser Publishing, locate the corresponding job and finished assets, and do not re-download, re-select quotes, or re-render. Use scripts/publish_queue.py to verify materials, plan timing, and log progress. Prefer Computer Use for page operations; if AppleScript is approved, follow the alternative route in that manual.

  • When writing titles and social copy, read Reader Copy. Images carry the original words; the copy provides evidence-based interpretation, specific feelings, and discussion entry points, and must not present production notes to the reader.

  • In case of macOS Chrome control failures and user permission for AppleScript, read Apple Events DOM Manipulation. Use only when current tool rules also permit the alternative technique; reuse existing authorization, read before writing, and commit with queue accounting.

Mandatory Judgments and Checks

  1. When a subtitle track is available, analyze subtitles first to avoid unnecessary full-video downloads; only when subtitles are burned-in, for text recognition, may the real video be downloaded first. Prefer existing complete local media.
  2. Use bounded retrieval routes. Log error types; after one normal attempt fails, try only one evidence-based alternative route. Do not loop on 403/LOGIN_REQUIRED; return to the user to resolve authorization or provide local media.
  3. OCR is just a candidate locator. Read local candidate packages rather than repeatedly scanning the entire document; for quotes entering the candidate set, verify against real frames and context. Sampling recognition cannot be claimed as an exhaustive, fully proofed verbatim transcript.
  4. Present candidate ID, verbatim text, timestamp, speaker, sharing rationale, and context risks, and stop at awaiting_quote_selection. Do not include weak quotes just to meet quantity.
  5. Only execute choose-quotes after the user explicitly selects an ID. Then build_selection.py generates a draft from the selected candidates' verbatim text, preserving precise frame_seconds, and imports it. Do not silently alter words, delete sentences, or merge undisclosed jump cuts.
  6. Native mode uses only the real video; the first block keeps the full frame, and subsequent blocks crop subtitle strips from frames of the same aspect ratio; do not enlarge the first sentence extra. Default to no added translations, titles, or fake subtitles.
  7. Check image count, dimensions, original text per sentence, characters, and cropping. Automated QA does not replace visual inspection. Deliver original images, previews, timestamps, and available copy/review packages.
  8. When only creating, stop at awaiting_review; creation and download authorization are not publishing authorization. When the user separately requests external publishing, follow the browser publishing process to verify specific assets, target accounts, and operation scope, reusing authorization already established in the session without re-asking. Indicating a source does not constitute a copyright license.

If the original video has varying subtitle sizes, proportional cropping will not magically unify font sizes; explain this first, and if necessary, seek consent before switching to re-typeset subtitle mode. For videos without hardcoded subtitles, do not call images from them "native subtitle collages."

Key Defaults

  • Verified for this run: macOS + Apple Vision OCR; other systems require the user to provide subtitles or select a configured local recognition tool; do not claim cross-platform OCR has been verified.
  • Native mode defaults to subtitle-stack. Keep source width or scale down proportionally; do not upscale low-resolution sources for "HD."
  • Natural height: full frame height after scaling + (number of sentences - 1) × subtitle strip height. Do not enlarge in-strip subtitles for a fixed aspect ratio. Each image currently supports 3–6 sentences; discuss grouping or explicitly adjust the renderer if out of range; do not silently delete.
  • Local download, cropping, OCR, and checking are handled by scripts; the model is responsible for quote selection judgment, verification, and copy. If no actual token data is measured, write "not recorded"; do not use zero values in the ledger or account quota ratios to infer actual tokens.

When the user only requests download troubleshooting, run only media diagnostics; do not extend to quote production.

Related Skills