0

I know I can get a URL to thumbnail for a youtube video. For ex: https://i.ytimg.com/vi/J---aiyznGQ/hqdefault.jpg

Also, I know I can get link to the video at any second like this: https://youtu.be/J---aiyznGQ?t=7

I would like to get a thumbnail for the video at the time specified. Does youtube provide that? Is there a way to generate thumbnail at the time specified programmatically?

arun
  • 13
  • 2
  • You should probably look something similar to [Html Video Snapshot](https://stackoverflow.com/questions/13760805/how-to-take-a-snapshot-of-html5-javascript-based-video-player) – Atakan Atamert Mar 15 '20 at 18:35
  • no, various sizes but there is only 3, i.e hq0.jpg (same as hqdefault), hq1.jpg, hq2.jpg – Lawrence Cherone Mar 15 '20 at 18:36

1 Answers1

0

I think what you're asking for is a screencap/screenshot of the video at a particular time frame. The simplest thing to do in this case is to use your system's inbuilt screenshot software and then capture your image.

But since you asked programmatically:

  1. You can use Pyscreenshot
  2. or follow this tutorial which uses pyautogui.

Note: You need Python in both the cases above.