Communitygithub.com

XiaoBeiCoder/course-video-pipeline

Download, transcribe, cut, subtitle, document, verify, and upload course videos when reusable processing rules or custom merged and non-merged outputs are needed.

What is course-video-pipeline?

course-video-pipeline is a Claude Code agent skill that download, transcribe, cut, subtitle, document, verify, and upload course videos when reusable processing rules or custom merged and non-merged outputs are needed.

Works with~Claude Code~Codex CLI~Cursor
npx skills add XiaoBeiCoder/course-video-pipeline

Ask in your favorite AI

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

Documentation

Course Video Pipeline

Process course recordings end to end while preserving the user's requested output shape. Prefer independent clips unless the user explicitly asks for a merged lecture video. Do not infer permission to delete local sources or existing remote outputs.

Before Processing

  1. Read the user's source and destination paths exactly. Treat leading labels such as 全部文件 as UI text unless they exist in the remote path.
  2. Inspect remote filenames, sizes, formats, and existing outputs before downloading.
  3. Check local free space and available GPU, FFmpeg codec, WhisperX environment, and BaiduPCS-Go login.
  4. Choose the course adapter after sampling filenames, transcript text, and video structure. Read references/course-adapters.md for known styles and for detecting unfamiliar styles.
  5. Confirm the output mode: individual clips, merged clips, or both. Default to individual clips when unspecified.

Pipeline

  1. Download and validate every source video without changing its natural ordering.
  2. Transcribe source files independently. Reuse valid transcripts and clip plans instead of repeating GPU work.
  3. Build a deterministic clip or unit manifest. Review candidate boundaries when markers are ambiguous.
  4. Render clips and generate one SRT per clip. Generate a merged video and combined SRT only when requested.
  5. Generate a Markdown manifest containing label, output filename, source filename, source timestamps, duration, and any adaptation notes.
  6. Run the output validator before upload.
  7. Upload to the user's exact remote directory and verify remote counts and filenames.
  8. Clean up only after verification and only within the user's deletion authorization.

Required Output Contract

For every selected clip or retained knowledge unit, provide:

  • One MP4 unless the requested unit is metadata-only.
  • One timestamp-reset SRT with matching basename.
  • One row in the lecture or chapter Markdown list.
  • Stable sequential prefixes plus the original example or unit ID.

For merged mode, keep individual normalized clips locally and add one merged MP4 plus one timeline-adjusted combined SRT. Do not replace an existing merged or non-merged version unless the user asks to overwrite or remove it.

Execution Notes

  • Use source-specific transcripts so timestamps reset to zero for each output clip.
  • Prefer accurate FFmpeg trimming with h264_nvenc when supported. Fall back to libx264 rather than silently skipping accurate boundaries.
  • Preserve course wording in Markdown; only normalize filenames and administrative labels.
  • Stop on missing sources, invalid timestamps, zero-byte media, or unexplained count mismatches. Retry only failed files.
  • For large batches, report concrete progress after download, transcription, rendering, and upload stages.

Read references/workflow.md before running the full pipeline. Read references/course-adapters.md when choosing split policy. Read references/manifest-upload.md when constructing manifests, Markdown lists, uploads, verification, or cleanup.

Related Skills