Skip to main content

Local-first multi-source video summarization with any OpenAI-compatible LLM

Project description

Video Summarizer

sample

Transcribe and summarize videos from YouTube, Instagram, TikTok, Twitter, Reddit, Facebook, Google Drive, Dropbox, and local files.

Works with any OpenAI-compatible LLM provider, including locally hosted endpoints.

Interfaces

Pick your poison:

Interface Command
CLI python -m summarizer --source <source>
HTTP API python -m summarizer servehttp://localhost:8000/docs
Streamlit GUI python -m streamlit run app.py
Docker docker compose up -dhttp://localhost:8501
Agent Skill .agent/skills/summarize/SKILL.md

Quick Start

git clone https://github.com/martinopiaggi/summarize.git
cd summarize
pip install -e .
python -m summarizer --source "https://youtube.com/watch?v=VIDEO_ID"

The summary is saved to summaries/watch_YYYYMMDD_HHMMSS.md.

How It Works

               +--------------------+
               |  Video URL/Path    |
               +---------+----------+
                         |
                         v
               +---------+----------+
               |    Source Type?    |
               +---------+----------+
                         |
        +----------------+--------------------+
        | visual flag                         |
        v                                     v
+-------+--------+                  +---------+----------+
|  Visual Mode   |                  | Transcript Cache   |-------------> HIT ---+
|  base64 / url  |                  +---------+----------+                      |  
+-------+--------+                            | MISS                            |  
        |                                     |                                 |  
        |                                     v                                 |  
        |         +-------+ +-------+ +-------+ +-------+                       |  
        |         |YouTube| |yt-dlp | | Local | |Dropbox|                       |  
        |         |       | |X.com  | | File  | |G.Drive|                       |  
        |         |       | |TikTok | |       | |       |                       |  
        |         |       | |etc.   | |       | |       |                       |  
        |         +---+---+ +---+---+ +---+---+ +---+---+                       |  
        |             |         |         |         |                           |  
        |             v         v         |         |                           |  
        |         +----+---+  +--+---+    |         |                           |  
        |         |Captions|  |Cobalt|    |         |                           |  
        |         | Exist? |  +--+---+    |         |                           |  
        |         +---+----+         |    |         |                           |  
        |          Yes  No           |    |         |                           |  
        |          +----+            |    +--------+--------------+             |  
        |            |               |                            |             |  
        |            +-------------->|                            v             |  
        |                            |                   +--------+--------+    |  
        |                            |                   |     Whisper     |    |  
        |                            |                   |    endpoint?    |    |  
        |                            |                   +--------+--------+    |  
        |                            |                            |             |  
        |                            |                +-----------+-----------+ |  
        |                            |                |                       | |  
        |                            |                |  Cloud Whisper Local  | |  
        |                            |                |                       | |  
        |                            |                +----------+------------+ |  
        |                            |                           |              |  
        |                            +------------------------|--+              |  
        |                                                     v                 |  
        |                                               store in cache          |  
        |                                                     |                 |  
        |                                                     +-----------------+  
        |                                                     |                    
        |                                                     |         Transcript 
        |                                                     |                    
        |                                                     v                        
        |                                summarizer.yaml -> +------------+----------+
        |                                 prompts.json  ->  |    Prompt + LLM       |
        |                                                   |    Merge              |
        |                                                   +------------+----------+
        |                                                            |
        |                                                            v
        v                                                   +------------+----------+
+-------+--------+                                          |                       |
| Vision-capable |                                          |          Output       |
|     model      |----------------------------------------->+                       |
+-------+--------+                                          +-----------------------+
        ^ 
        | 
        +----- prompts.json
  • Transcript path (default): downloads audio/video, transcribes with Whisper or captions, caches the transcript, then summarizes with an LLM.
  • Visual path (--visual): sends the video directly to a vision-capable model, skipping transcription. Uses the same prompts, provider config, and .env keys as the transcript path. Supports base64 chunks (default) and url passthrough for YouTube.

Documentation

Full docs live at summarize.martino.im.

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

martino_summarize-0.2.0.tar.gz (61.7 kB view details)

Uploaded Source

Built Distribution

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

martino_summarize-0.2.0-py3-none-any.whl (59.9 kB view details)

Uploaded Python 3

File details

Details for the file martino_summarize-0.2.0.tar.gz.

File metadata

  • Download URL: martino_summarize-0.2.0.tar.gz
  • Upload date:
  • Size: 61.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for martino_summarize-0.2.0.tar.gz
Algorithm Hash digest
SHA256 177d4a09179f071183268c657f350100c81fc5afcd262a90b45c0dfa66943441
MD5 81d8dea444ec76fbf7416b87310b355b
BLAKE2b-256 cca19d9333ada33d0af469375a79a2f0d59f4354deb7d8fda84ec31cd04fe348

See more details on using hashes here.

Provenance

The following attestation bundles were made for martino_summarize-0.2.0.tar.gz:

Publisher: publish-pypi.yml on martinopiaggi/summarize

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

File details

Details for the file martino_summarize-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for martino_summarize-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ba49824aeeaee9376071c9f38e4ec8aae27752dcfdccef503e40b096cd4fda8c
MD5 15b429a8f404a9c9b4dd4ab59e843945
BLAKE2b-256 16dfb5d162b995c79e06ab552b0e9faa73db84154dcca70c9d94fb8956022a83

See more details on using hashes here.

Provenance

The following attestation bundles were made for martino_summarize-0.2.0-py3-none-any.whl:

Publisher: publish-pypi.yml on martinopiaggi/summarize

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