Skip to main content

AI-powered CLI that generates timestamped chapter summaries for videos using AssemblyAI transcripts and Gemini vision analysis

Project description

Video to Chapters (with Transcript)

AI-powered Python library and CLI that automatically generates timestamped chapter summaries for video content.

Features

  • Automatic transcript generation (with speaker labels) using AssemblyAI
  • Cheap local scene detection (SSIM + histogram comparison) to find chapter boundaries
  • Google Gemini used only where it adds value: describing detected scene changes and writing chapter titles/summaries
  • Chapter segmentation based on scene changes and speaker turns
  • Export formats for YouTube, Vimeo, Spotify, Markdown, SRT, and JSON

Requirements

Installation

uv tool install video-to-chapters-with-transcript

Or for development:

git clone https://github.com/hbmartin/video-to-chapters-with-transcript
cd video-to-chapters-with-transcript
uv sync

Usage

# Process a video end-to-end (transcript, scene detection, chapters)
video-to-chapters process video.mp4

# Choose an output format and save to a file
video-to-chapters process video.mp4 --format youtube --output chapters.txt

# List previously processed videos
video-to-chapters list

# Show chapters for an already-processed video without reprocessing
video-to-chapters show --video-id 1

# Re-segment with a different scene-change threshold (reuses cached AI summaries)
video-to-chapters regenerate --threshold 0.6

Run video-to-chapters --help for all commands and options.

Configuration

Copy .env.example to .env and fill in your API keys:

ASSEMBLYAI_API_KEY=...
GEMINI_API_KEY=...

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

video_to_chapters_with_transcript-0.1.0.tar.gz (25.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file video_to_chapters_with_transcript-0.1.0.tar.gz.

File metadata

File hashes

Hashes for video_to_chapters_with_transcript-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fd5c0ff72d13c9f4203215d50dc20ae69377198fa7ef6320b927117faa88005b
MD5 ea152113a560d505716b713018e84132
BLAKE2b-256 17c452b5f58ffcf4582c96360ed1e0c0486f10cb82b4aae37c851c58faff5a19

See more details on using hashes here.

Provenance

The following attestation bundles were made for video_to_chapters_with_transcript-0.1.0.tar.gz:

Publisher: publish.yml on hbmartin/video-to-chapters-with-transcript

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file video_to_chapters_with_transcript-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for video_to_chapters_with_transcript-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 02083213d90fc304c2e0a90d7ab8581a35fca04e6475ccf70742839882a3ab7b
MD5 5153e46004b9ba12628f02400b3189a6
BLAKE2b-256 c6044e6dac91a58d37a1452b3a3804474c0d00bdefd89d3c9f7b13d1679b1a93

See more details on using hashes here.

Provenance

The following attestation bundles were made for video_to_chapters_with_transcript-0.1.0-py3-none-any.whl:

Publisher: publish.yml on hbmartin/video-to-chapters-with-transcript

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page