Show HN: Summary Cat, a YouTube Video Summary Generator (summarycat.com)
Hello HN!
Please check out Summary Cat (https://www.summarycat.com). It uses OpenAI's GPT-3.5 to summarize YouTube transcripts.
Please note that it only works for
- *English* videos.
- videos that are not too long in length.
I'd appreciate any feedbacks, criticisms, or feature requests!! You can also find my contact info in my profile. Thank you in advance.------------Technical Details---------------
Tech Stack
- Frontend: HTML/CSS
- Backend: Python/Flask
APIs: - For grabbing YouTube's transcripts: I used youtube-transcript-api (https://pypi.org/project/youtube-transcript-api/)
- For summarizing the transcripts: I used OpenAI's GPT-3.5-turbo-16k: https://platform.openai.com/docs/guides/gpt.
- I used GPT-3.5 because GPT-4 is quite a lot more expensive (roughly 10X).
My Prompt (Super Simple!) - "please summarize the following text into a few paragraphs:" + the full transcript.
Thoughts about GPT-4 vs GPT-3.5-Turbo-16k for Summary Cat - GPT-4 was 20% better for "summary quality"
- GPT-4 feels 50% faster
- However, GPT-4 is about 10X as expensive as GPT-3.5
- Winner: GPT-3.5-Turbo-16k
53 comments
[ 3.6 ms ] story [ 281 ms ] threadSo far, I found that each ~10 minute video uses around 1000 tokens. It costs me about 3 cents to summarize, which is not too bad as I don't have many users, and users haven't been requesting summaries for super long videos yet.
If this sites gets a lot of interest, I might start restricting something :)..
GPT 3.5 Pricing: https://openai.com/pricing
However, how does it do on videos where there's not a lot of speaking? Any plans to do actual video (image) processing?
Summary Cat doesn't work for videos where there's not a lot of speaking. I am hoping to build a bit more on text-rich videos first, so I do not plan to do actual video (image) processing any time soon.
I will keep that in mind!!
Are you using celery for your async workers? Cool project!
But in the second video https://www.youtube.com/watch?v=NBFyvOV7fz8 the app keeps mentioning things like: "The text discusses...", but the content is not a text, it's a video.
Really cool app, it's really quick too!
To be fair, OP did say that they summarise the YouTube transcript. So OpenAI GPT receives text.
But if OP didn’t do so already maybe they could start the OpenAI system prompt with something like “you are summarising transcripts of YouTube videos” and possibly it could help to make the summary refer to the material as video.
----------- My prompt is super simple. It is "please summarize the following text into a few paragraphs:" + the full transcript. -----------
Seriously that's it!
I think GPT-4 didn't quite get it but StevenNunez is making fun of the overly complex prompts people sometimes use (which, to be fair, was more important before instruct and chat tuning)
Edit: Thank you!
I would say, GPT-4 is - 20% better at "summary quality" - feels 50% faster - BUT, 10X as expensive.
So using GPT-3.5 was the right choice for me at this point.
For those interested in comparing, https://www.summarize.tech/ also builds summaries from YouTube videos but includes an overview, then a summary of each 5 min segment
As for non-Youtube URL: I indeed do not handle that error right now :D. Thanks so much for bringing it up!
This 1hr video works (but I note you don't seem to be caching the output?) https://www.youtube.com/watch?v=0s9fpFPAC94
That's so evil. Please correct the alignment!
Only note I have at this time is that it seemed to time out or hang or something on a long video (>2h) -- I'm guessing that there might be limitations to how much transcript you can chuck into GPT, it might be worth throwing an error of some sort in that scenario rather than the forever load
E: Seen you've asked for an example to the other person mentioning this. In my case it was this video https://www.youtube.com/watch?v=hFL6qRIJZ_Y
Thanks for your suggestion about how to address it.
I suggest a progress bar rather than a spinny thingy. Give the user some sense that a conclusion is on the horizon.
From my own experiments, I think you'll get better summaries with a prompt like "This is a transcription of a youtube video. Please etc etc etc". Context seems to help.
Idea for the future: Use the summarize to re-cut the videos to the most important parts. Like a super to the point tiktok style video that is nothing but dopamine being injected into your veins. There seems to already be "auto podcast clipper ai agents" out there but nothing for consumers to use. those are more video editor adjacent. If anyone wants to work on something like this, lemme know.
Your "use the summarizer to re-cut the videos" is fantastic!
Would love if I could ask follow up questions. Would be awesome to ask "Is X also explained?" and get a little summary back with the timestamp so I can jump to that point in the video.
Also it feels a bit slow and doesn't really give feedback whether it's making progress. That would be a good UX improvement.
Out of curiosity I downloaded the transcript myself with `youtube_transcript_api --format text` and counted the tokens via ttok [0], it was a tad over 16k. So what does your site do in that case? Is the transcript truncated?
[0]: https://github.com/simonw/ttok
https://www.youtube.com/watch?v=GuiTN4tOBr4 (edit: this has no captions so maybe it's expected, but a proper error would be better)
https://www.youtube.com/watch?v=iShzzAK9zxk (edit: this may be because I marked the subtitles as UK English)