Find the moments that matter — TopicMiner turns long-form video/audio into a set of topic-aligned, ready-to-clip moments, then helps you trim, overlay, and export.
If you’ve ever thought “I know there’s a great 20–60s segment in here somewhere…”, TopicMiner is for that.
- Ingest a source (URL or upload)
- Transcribe (locally via Whisper-family tooling)
- Segment into topic chapters
- Chat with an assistant to find the best moments for a topic
- Trim + overlay + export an MP4 you can post
- Long-form → short-form mining
- Topic segmentation and “where’s the good part?” discovery
- Clip workspace
- A per-clip page at
GET /clip/<clip_id>
- A per-clip page at
- Transcript support
- VTT transcript serving (
GET /api/clips/<clip_id>/transcript)
- VTT transcript serving (
- Exports
- Downloadable MP4 (
GET /api/clips/<clip_id>/download)
- Downloadable MP4 (
- Overlays
- Add text overlays via API (
POST /api/clips/<clip_id>/overlay) - Upload overlay images (
POST /api/clips/upload-image)
- Add text overlays via API (
- Reaction video support
- Upload a webcam reaction track (
POST /api/clips/<clip_id>/reaction)
- Upload a webcam reaction track (
- Auth + roles
- Login-protected app area, manager/admin area, session-based auth
- Optional billing
- Stripe routes exist; billing features are disabled if Stripe env vars aren’t set
- Optional persistence
- S3-backed restore/upload for clip files if configured (otherwise runs local-only)
- Python 3.10+
- Flask 3
- uv for dependency management / execution
- ffmpeg for video operations
- yt-dlp for downloads
- faster-whisper for transcription
- Backboard SDK for assistant + storage primitives
- Stripe (optional) for billing
- Terraform + Docker (deployment)
src/app.py— Flask app entry point & route wiringsrc/api/— REST endpoints (clips, chat, auth, stripe, admin, etc.)templates/— server-rendered HTMLstatic/— frontend assets + uploadstmp/— per-clip working directory (video, transcript, exports, etc.)scripts/— utilities (e.g. admin bootstrap)terraform/— infrastructure
Install:
- ffmpeg
- macOS:
brew install ffmpeg
- macOS:
- uv
curl -LsSf https://astral.sh/uv/install.sh | sh
You’ll also need a Backboard API key to run the app.
- Clone and enter the repo
- Create your
.env - Start the app
Create clipper/.env (you can base it off .env.example if present) and set at least:
BACKBOARD_API_KEY— requiredSECRET_KEYorFLASK_SECRET_KEY— recommended (required in production)FLASK_PORT— optional (defaults to5001)FLASK_DEBUG— optional (trueby default insrc/app.py)
Optional features:
- Stripe (billing):
STRIPE_SECRET_KEY(and any other Stripe settings you use)
- Persistence (S3):
S3_BUCKET(and AWS credentials in your environment)
From the clipper/ directory:
./start.sh
What start.sh does for you:
- Verifies
ffmpeganduv - Loads
.env - Verifies
BACKBOARD_API_KEY - Clears and recreates
tmp/andstatic/uploads/ - Runs
uv sync - Optionally bootstraps an admin user if
ADMIN_EMAILandADMIN_PASSWORDare set - Starts Flask
Then open:
- Landing page:
http://localhost:5001/ - App:
http://localhost:5001/app - Health:
http://localhost:5001/health
POST /api/clips with JSON:
source_url— video/audio URLtitle— display title
Then open the workspace:
/clip/<clip_id>
GET /api/clips/<clip_id>/local-status
This endpoint reports whether the clip has:
- source video
- transcript
- trimmed export
- final export
GET /api/clips/<clip_id>/download
GET /api/clips/<clip_id>/preview
POST /api/clips/<clip_id>/overlay with JSON:
text(required)position(e.g."bottom")font_size(int)color(hex or supported value)bg_opacity(float)
In production (when ENVIRONMENT is not development), the app requires:
SECRET_KEY(orFLASK_SECRET_KEY) of 32+ characters
If it’s missing/weak, the app will refuse to boot.
By default, clip artifacts live under:
clipper/tmp/<clip_id>/...
If S3 is configured, the API includes logic to restore clip files back into tmp/ on demand.
This repo includes a deployment script that builds/pushes a Docker image and applies Terraform.
From clipper/:
./deploy.sh <env>
Notes:
<env>defaults todevif not provided- The script is set up for AWS (ECR + Terraform), and expects your AWS credentials/region to be configured in the environment where you run it.
Because infrastructure varies by org/account, treat terraform/ as the source of truth for what gets created.
Install it:
- macOS:
brew install ffmpeg
Set it in clipper/.env:
BACKBOARD_API_KEY=...
Stripe is optional. If STRIPE_SECRET_KEY is missing, the app will run with billing features disabled.
Set up S3 persistence (e.g. S3_BUCKET) and ensure your environment has AWS credentials.
- Don’t commit
.envfiles - Use a strong
SECRET_KEYin production - Treat API keys like passwords
- If you expose this app publicly, put it behind TLS and a reverse proxy; the app uses
ProxyFixfor forwarded headers.
Add a license file if you plan to distribute this project publicly.