Rendered at 22:28:53 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
runjake 2 hours ago [-]
Instead of grabbing the video, grab the transcript, if its available.
Edit: I see from OP's comment, they actually want to OCR frames for text. From personal experience at a much smaller scale than what you're talking about, YT will probably nix that. Use a disposable Google account as it will likely get permanently banned.
forthechemicals 14 hours ago [-]
HaaaHaaa! this is exactly the issue i'm facing. fun to see it as the first post on ask page. "obviously yt-dlp is against terms of service from what i know" ---> If you're scraping and keeping the data, no one's stopping you. having said that i also haven't done it. If you are building a context pipeline I feel keeping the transcript(which you know is high quality) and the url is enough unless you want to download the video itself. Lemme know what you choose to do. I am also working on this exact workload.
vivzkestrel 13 hours ago [-]
- well my app is more complicated
- i need video frames to ocr
- maybe i can process video to frames and send frames over to server directly or aws s3 bucket directly with video id as folder
- not sure if there are better ways
forthechemicals 8 hours ago [-]
Sounds interesting. downloading the video is the hassle. better send the video url to the server and do all heavy things there. What is your ocr workflow? I have a use case that i had built previously but it wasn't very accurate. I tried to build a pullup counter which would classify bad form also but then that was beyond just a hassle and i gave it up, but now i feel with these system one workflows maybe these problem shapes can be approached but i haven't tried them.
vivzkestrel 7 hours ago [-]
- if i send the url to the server, my backend would need to download it inside a worker.
- this worker would have to use yt-dlp unless youtube api provides a way to download videos not belonging to your channel
- the worker's IP address ll definitely get flagged by youtube after a few short runs
- not to mention i have no idea what is the legality of doing this as a limited liability company
- the workflow for ocr is simple, once i have the frames from input video, i can add a task to the queue with s3 image links per video id and any model such as paddle ocr, chandra etc can quickly perform the image analysis and send my express server back the results
- the major bottleneck for me seems to be the process to get an mp4 out of youtube currently
forthechemicals 6 hours ago [-]
i dont think youtube will let you download the mp4 cause why would they. I am thinking about the download option youtube provides. When you download a video its in your system now right so it must be somewhere. IndexDB perhaps idk but if that can be salvaged you could lean into youtube's own feature for your requirement but then i dont think every video is downloadable. This will also allow you to keep your download and frame processing workload in the client side and only stream frames.
Edit: I see from OP's comment, they actually want to OCR frames for text. From personal experience at a much smaller scale than what you're talking about, YT will probably nix that. Use a disposable Google account as it will likely get permanently banned.
- i need video frames to ocr
- maybe i can process video to frames and send frames over to server directly or aws s3 bucket directly with video id as folder
- not sure if there are better ways
- this worker would have to use yt-dlp unless youtube api provides a way to download videos not belonging to your channel
- the worker's IP address ll definitely get flagged by youtube after a few short runs
- not to mention i have no idea what is the legality of doing this as a limited liability company
- the workflow for ocr is simple, once i have the frames from input video, i can add a task to the queue with s3 image links per video id and any model such as paddle ocr, chandra etc can quickly perform the image analysis and send my express server back the results
- the major bottleneck for me seems to be the process to get an mp4 out of youtube currently