Hey guys, any idea on how I can grab the current frame from a live youtube feed into a jpg image?
For example:
Hey guys, any idea on how I can grab the current frame from a live youtube feed into a jpg image?
For example:
I’m not sure what this has to do with Anvil but suggest you look at youtube-dl for downloading a short clip, then FFMPEG for extracting a single frame (or just use any number of free video editing tools to get a screen grab if you don’t need an ‘industrial’ automated process).
Alternatively on a Windows machine just use the Snip & Sketch tool (Shift-WIN-S), or any number of (free) screen capture apps.
You could also look at ImageGrab from the Pillow (PIL) Library.
It’s difficult to know what kind of solution you’re looking for or what you’ve tried so far with such a terse question…
If you are looking for thumbnails then YouTube automatically generates them. You can access via the API or simply use this StackOverflow post to figure out the URL for each video.
A little context. I’m looking to pull current frames from a live YouTube feed to download into an anvil database every Y number of seconds.