10 ms·
How to summarize YouTube videos using artificial intelligence
- MarcoMoauro 3y agoHow to summarize YouTube videos using artificial intelligence. I often miss videos I like because I'm busy with commitments or other matters. In this issue of Implementing I explain how to make a system from scratch that starting from the link of a YouTube video generates a text summary. https://implementing.substack.com/p/how-to-summarize-youtube-video-using https://implementing.substack.com/p/how-to-summarize-youtube... Let me know what you think!
- lordswork 3y agoHow does this approach differ from pasting the URL to gemini.google.com with prompt "Summarize this video"?
- throwaway14356 3y ago[dead]
- sunbum 3y agoWhy are you not just using yt-dl to download the subtitles? Using yt-dl you can also fallback in case the subtitles don't exist and instead download the videos, convert them to mp3, and then run them through whisper[1] locally. [1] - https://github.com/openai/whisper https://github.com/openai/whisper
- soco 3y agoWouldn't that mean actually more work than even watching the video? The point of such a helper tool is to spare time, not to have fun with toys. I mean nothing wrong with toys but hardly a help in this case.
- fl7305 3y agoI'm interested in 1-2h long videos of people talking about interesting stuff. But I don't have time to watch them all. It'd be great to have a tool to get accurate transcripts. The YouTube subtitles can be easily downloaded, but aren't readable on their own. They often lack even basic punctuation or sentence structure. It'd be even more great to get good condensed transcripts, or event targeted condensed transcripts of the things I'm interested in in that particular video.
- HenryBemis 3y agoDare I add that sometimes the subtitles are auto-generated and words shown are wrong.
- fl7305 3y agoThanks, that's also an issue there.
- infecto 3y agoI think you can get pretty accurate transcripts now with off the shelf tooling. Speaker diarization included.
- lordswork 3y agoThat's still way more work than is necessary, unless you absolutely need to summarize locally for some reason. You can just paste the URL to gemini.google.com with prompt "Summarize this video."
- CastFX 3y agoI just get "I don't have enough information to do that. I'm a large language model, able to communicate in response to a wide range of prompts and questions, but my knowledge about that specific video is limited. Is there anything else I can do to help?"
- lordswork 3y agoPost a link to the conversation or YouTube URL you are trying to summarize?
- djmips 3y agoLots of videos don't have subtitles for various reasons.
- mikeflynn 3y agoYouTube has endpoints in their Data API to list and download captions: https://developers.google.com/youtube/v3/docs/captions https://developers.google.com/youtube/v3/docs/captions
- hardasspunk 3y agoGemini does this now.
- rmarques7 3y agoso, I just tried this, and Gemini answered "I don't have enough information to do this". BUT, then I checked the "drafts", and one of the 3 drafted answers actually contains a short summary of the video. What the hell is happening here?
- lordswork 3y agoPost a link to your conversation? I just tried it and it worked (posted an example in a separate comment).
- getcrunk 3y agoI was hoping you were going to share a great prompt. All my efforts with prompting to get the perfect summary have left me wanting.
- thomastay 3y agoCan't you just ask GPT to give you a summary? Here's my prompt for 3.5, it's not very sophisticated. System: You are a helpful AI assistant who follows instructions to the letter. You will generate a summary of the article. Article: {ARTICLE} User: Summarize the previous text in one paragraph. Include as many topics as possible, make every word count. Create only one single summary and stop once you are done.
- Carol2698hunter 3y ago[dead]
- Carol2698hunter 3y ago[dead]
- thomastay 3y agoA bit tongue in cheek, but I summarized your article using artificial intelligence ;) P.S. GPT 3.5 has a 16k context window now --- AI Generated summary: Marco's newsletter introduces a tutorial on developing a system in Node.js to generate summaries from YouTube videos using OpenAI's completions API. The architecture involves extracting text from videos and then creating text summaries. The process includes scraping subtitles, chunking text, and recursively summarizing using OpenAI. The system is built using Yarn, Node.js, Axios, and other libraries. The CLI allows users to summarize videos by providing the YouTube link and language code. Node.js is favored due to its flexibility, efficiency, and compatibility with the ChatGPT API. The project code and details are available on Marco's GitHub repository. 1: What prerequisites do I need to know before using ChatGPT API and Node.js for summarizing YouTube videos? A: Before using ChatGPT API and Node.js for summarizing YouTube videos, you need to have Yarn and Node.js installed, familiarity with ES6 syntax, knowledge of HTTP calls using Axios, understanding of handling queues for promises, and the ability to work with interactive command line tools using yargs. 2: How can the ChatGPT API be applied to summarize the content of a YouTube video? A: The ChatGPT API can be applied to summarize the content of a YouTube video by first extracting text from the video, chunking the text into manageable parts, and then using the recursive summarization technique to generate a summary by submitting prompts to the completions API. This process involves managing multiple promises concurrently to avoid rate-limiting issues and slower response times. 3: Why is Node.js a preferred choice for implementing a project that summarizes YouTube videos with the ChatGPT API? A: Node.js is a preferred choice for implementing a project that summarizes YouTube videos with the ChatGPT API due to its efficiency in handling asynchronous operations, ease of building scalable applications, compatibility with various libraries and tools required for the project, and support for modern JavaScript features like ES6 syntax.
- TheOtherHobbes 3y agoWritten article that takes two minutes to read -> half hour YT vid with 95% fluff against a background of bookshelves with a succulent, a toy robot, and a mildly interesting light fitting -> AI -> text summary that takes two minutes to read.
- throw10920 3y agoI blame YouTube, and (separately) the ad-supported model. I don't like the trend of turning articles into videos in the first place, but without the fact that the longer you make a video the more ads you can stuff into it (and YouTube's crazy amount of ads), I think most videos would be much shorter, simply because long videos take more effort to produce. YouTube Premium doesn't help much here because (1) as long as there is a significant amount of users watching ads, YouTube will still incentivize creators to make longer videos and (2) the subscription model is a bad deal for everyone but YouTube themselves (users only rent their content instead of "own" (which is still a better deal for almost all values of "item own"), creators get a tiny slice of a fixed-size pie).
- theusus 3y agoDoesn't Gemini does that for you?
- rmarques7 3y agoso, I just tried this, and Gemini answered "I don't have enough information to do this". BUT, then I checked the "drafts", and one of the 3 drafted answers actually contains a short summary of the video. What the hell is happening here?
- jjude 3y agoI am doing similar thing (for fun) using deno. I posted the entire code on Twitter: https://twitter.com/jjude/status/1757604342310310285 https://twitter.com/jjude/status/1757604342310310285 (Code is derived from another open source repository: https://github.com/franekmagiera/just-tell-me/ https://github.com/franekmagiera/just-tell-me/) P.S: I am just surprised how much our coding infra has evolved. I still remember typing 120 lines of code from Charles Petzold book just to pop up a hello world dialog box. Today in less than 30 lines of code, I can fetch Youtube captions and summarise it.
- Lockal 3y agoHopefully they will eventually integrate SponsorBlock, otherwise language model seemlessly incorporates ads into summary...
- jerpint 3y agoI wrote something similar using python if anyone is interested: https://www.jerpint.io/blog/yougptube/ https://www.jerpint.io/blog/yougptube/ I also made a YouTube video about it and summarized it using the tool: https://m.youtube.com/watch?v=WtMrp2hp94E https://m.youtube.com/watch?v=WtMrp2hp94E > The video demonstrates how to use open AI's speech to text model, ChaiGPT, and Librosa to automate the process of summarizing YouTube videos. The tool can provide both long and short summaries of the videos and is best suited for videos with a lot of audio. The examples given in the video include summaries of a video on stretching and a conversation on AI alignment and the future of AI
- lordswork 3y agoYou can just paste the URL to gemini.google.com with prompt "Summarize this video."
- DennisP 3y agoThat's nifty but not really what I want from a summary. I learned what the video is about, but I didn't learn the things I would learn by watching. If the AI could be prompted to give a transcript minus the usual chatty fluff, that would be perfect.
- DennisP 3y agoOr better yet, convert the transcript into a well-structured article.
- monkeydust 3y agoThis tech would be useful in enterprises e.g. summarise the town hall, drop it in my inbox.
- rmarques7 3y agoI believe Microsoft has the same opinion as you, and has done similar using Teams: https://support.microsoft.com/en-gb/office/meeting-recap-in-microsoft-teams-c2e3a0fe-504f-4b2c-bf85-504938f110ef https://support.microsoft.com/en-gb/office/meeting-recap-in-...
- cced 3y agoFor the text extraction I found the quality of whisper to be better in most videos than the subtitles.
- c0brac0bra 3y agoThe Chrome extension Harpa will do this by fetching the transcript and posting it to your ChatGPT session. Takes 3 seconds.
- rmarques7 3y agoI had no idea about this extension. Now I've tried it, and from a quick test it does seem to indeed work. Thank you for sharing.
- BOOSTERHIDROGEN 3y agoI just using Kagi
- lordswork 3y agoCan't you just paste the video URL into https://gemini.google.com/ https://gemini.google.com/ with the prompt "Summarize this video" ? Example (Gemini free tier): Summarize this video: https://www.youtube.com/watch?v=7nsE4MyqQf4 The video is about a Cloudflare outage caused by a poorly written regular expression. The regular expression was part of a web application firewall rule designed to detect cross-site scripting attempts. The rule was supposed to match JavaScript keywords, suspicious characters, and strings with equal signs, which are potential indicators of malicious URL query strings. However, the regular expression was written in a way that caused it to match an unexpectedly large number of strings. This led to the web application firewall consuming 100% of CPU on all of Cloudflare's servers, which caused a global outage. The video goes into detail about how the regular expression worked and why it was so inefficient. It also discusses the steps that Cloudflare took to fix the problem and prevent it from happening again. Here are some of the key points from the video: The regular expression used a non-capturing group, which caused it to match many more strings than it was intended to. The regular expression used a dot star, which matches any character zero or more times. This can be very inefficient if the regular expression is not carefully written. The regular expression used backtracking, which is a technique that can be very slow if the regular expression is not carefully written. The video concludes with a warning about the dangers of using regular expressions without understanding how they work. It also suggests that people should use simpler tools, such as string contains, whenever possible.
- gniv 3y agoI get: "I'm sorry, but I'm unable to access this YouTube content. This is possible for a number of reasons, but the most common are: the content isn't a valid YouTube link, the video is potentially unsafe, the content does not have a captions file that I can read, or the video language is currently not supported."
- lordswork 3y agoPost a link to the conversation or YouTube URL you are trying to summarize?
- jsemrau 3y agoInteresting. Wonder what happens when you combine search and summarization? https://open.substack.com/pub/jdsemrau/p/searching-youtube-with-langchain?r=7fx0t&utm_campaign=post&utm_medium=web https://open.substack.com/pub/jdsemrau/p/searching-youtube-w...
- ignoramous 3y agoI've long found YouTube to search audio, text, and objects in videos.
- youcantcook 3y ago[dead]
- youniverse 3y agoI use https://youtubetranscript.com https://youtubetranscript.com and then paste into chatgpt. There's also https://www.you-tldr.com https://www.you-tldr.com but they are a bit slow and do only shorter videos unless you pay.