Extract the sermon from a 2-hour church livestream archive, add an intro card, and upload it to YouTube as Unlisted for review. Runs locally; no cost beyond a Claude subscription.
There are two ways to run it: interactively with the Claude Code skills below, or as a Docker service with a web dashboard that watches the channel and queues each new Sunday service for one-click processing (docker/README.md).
Two passes so the full 2-hour video is never moved:
- Discovery — download audio only, transcribe locally (faster-whisper), Claude reads the transcript to find the sermon and draft title/description/ chapters.
- Render — download only the sermon window (
yt-dlp --download-sections), prepend an intro card, normalize audio, upload Unlisted.
Run it with the /sermon-cut skill (URL or latest; --yes to skip the confirm
gate; --speaker "Name" for guest weeks).
Once a sermon is rendered, the /sermon-shorts <run-id> skill can cut vertical
(9:16) YouTube Shorts from it — captioned, subject-tracked, branded, uploaded
Unlisted. Candidate moments are Claude's judgment call; a human always picks
which ones render. See CLAUDE.md for details.
- System tools:
yt-dlpandffmpegfrom your package manager (pacman -S yt-dlp ffmpeg,apt install ffmpegpluspipx install yt-dlp, orbrew install yt-dlp ffmpeg). An NVIDIA GPU makes transcription much faster but isn't required. - Python env:
Pulls in everything, including
cd sermon-cut python3 -m venv .venv .venv/bin/python -m pip install -U pip -e .
opencv-python-headless+numpyused only by the Shorts subject-tracking stage — no extra install step needed. - Config:
cp config.example.toml config.tomland fill inchurch_name,youtube_channel_id,default_speaker,canva_template_id,description_footer. - YouTube upload auth (free):
- Create a Google Cloud project; enable YouTube Data API v3.
- Create an OAuth client ID → Desktop app; download it as
client_secrets.jsoninto the project root. - First upload opens a browser to authorize your channel; the refresh token
is cached to
token.json. Daily quota (10,000 units) covers a ~1,600-unit weekly upload.
- Intro card: drop
assets/intro_card.png(1920x1080). Per-week dynamic Canva generation is a planned upgrade (see below).
Each stage is a CLI subcommand writing into a run dir:
P=.venv/bin/python
$P -m sermon_cut fetch-audio "https://youtu.be/VIDEOID" --workdir runs/VIDEOID
$P -m sermon_cut transcribe --audio runs/VIDEOID/audio.m4a --workdir runs/VIDEOID
# author runs/VIDEOID/plan.json from the transcript, then:
$P -m sermon_cut validate-plan --plan runs/VIDEOID/plan.json --workdir runs/VIDEOID
$P -m sermon_cut clip "https://youtu.be/VIDEOID" --start 3000 --end 4500 --workdir runs/VIDEOID
$P -m sermon_cut intro --image assets/intro_card.png --workdir runs/VIDEOID
$P -m sermon_cut assemble --intro runs/VIDEOID/intro.mp4 --sermon runs/VIDEOID/sermon.mp4 --workdir runs/VIDEOID
$P -m sermon_cut upload --video runs/VIDEOID/final.mp4 --plan runs/VIDEOID/plan.json --workdir runs/VIDEOIDThe make_intro stage takes a finished PNG. To generate a per-week card,
add a step before it that fills the Canva brand template
(canva_template_id) with the sermon title/speaker/date via the Canva MCP,
exports a PNG to runs/<id>/intro_card.png, and passes that to intro.
This was intentionally deferred from v1.
.venv/bin/python -m pytest -v — all stages are unit-tested with injected
fakes; tests never hit the network, a GPU, or real binaries.