A small web app that provides a short summary of any YouTube video. The logic is the following:
- Fetch captions from YouTube video
- Ask ChatGPT to provide the summary of the video by provided captions
The results are cached (in-memory, expiration duration is configurable).
HTML page is embedded to the binary file, so the whole app is a single file
The service can be easily deployed to fly.io with flyctl deploy
command. The app
variable in fly.toml
has to be
updated accordingly
There is a rate limiter (by default 3 requests per minute).
OPENAI_KEY
- the OpenAI key that is used by ChatGPT
MAX_VIDEO_DURATION_MINUTES
- the maximum video length (in minutes). Default value is20
. It's required to avoid sending long videos to ChatGPT, because it might be costlyCACHE_EXPIRATION_HOURS
- how long to store data in cache. Default value is12
hoursREQUEST_PER_MINUTE_RATE
- maximum requests per minute per IP Address. Default value is3
The app is accessible on https://youtube-summarise.fly.dev/