Skip to content
Back to all projects

AI

CreatorLens AI (Video Analiz)

A dashboard that scores short videos with rules and has Gemini draft the shooting script. It targets YouTube Shorts and Instagram Reels, collects data for free with yt-dlp and a transcript library, and needs no paid API. I wrote it with FastAPI, SQLite and Chart.js.

Problem

Someone who makes short videos mostly learns what works by guessing. This project is an attempt to build a feedback loop from one channel's own data: which videos rose far above the average, what was said in the first three seconds, how fast the speech was, and which pattern the next video should follow. I set two constraints. It would not depend on a paid API, and the output had to be a script ready to shoot rather than a report.

Highlights

  • Collection: yt-dlp for video metadata (without downloading), youtube-transcript-api for Turkish and English captions, instaloader for Instagram. No API key is needed.
  • Speaking pace is the transcript's word count divided by the duration (WPM); 145 to 185 is treated as the good band, with slower and faster speech judged separately.
  • Outlier detection is real statistics: a Z-score against the channel's mean views and standard deviation, and videos beyond 2 sigma or 2.5 times the average are flagged.
  • The hook (first sentence) analysis, a six-part STEPPS score and the virality index come from a fixed-weight formula: hook 0.30, retention 0.30, sharing 0.25, loop 0.15.
  • Gemini writes the timecoded three-column shooting script (b-roll, voice-over, on-screen text) and A/B hooks; APScheduler runs the daily report at 08:30.
  • The dashboard, built with FastAPI and Jinja, has sign-up and login (PBKDF2), Chart.js charts, a hook tester, thumbnail and PDF generation; there are 78 test functions and a Dockerfile.

Architecture and notes

The flow has three steps: the scrapers/ folder collects videos and transcripts and writes them to SQLite with SQLModel, the analysis modules under services/ compute scores from that data, and finally Gemini gets a summary together with the channel's examples and drafts the script. The dashboard (services/web_dashboard.py) shows everything in one place.

There is something I should state plainly: most of the scores are rules I tuned by hand, not a trained model. Hook type and the STEPPS scores depend on keyword lists, and the retention curve is a simulation derived from the hook score; real audience retention data is not used. The word lists and the video archetypes are tuned to the examples of a single channel (Ottoman history content), so the results would not mean much for another niche without retuning.

The next step I want is to measure how well these rules agree with real view counts, that is, to validate the scores against past videos.

Private repository

Last updated

Technologies

  • Python
  • FastAPI
  • SQLModel
  • SQLite
  • yt-dlp
  • Gemini API
  • Chart.js
  • Docker

The source code is kept private; I can show it on request.

Request flow

Hover or focus a component to see what it is.

A generic request path built from the project's tech list. It illustrates the stack; it is not a measured trace.