Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Youtube API - Grab screenshot of a video at a specific time

I am looking to generate a high definition screenshot of youtube video at a specific time. Say I have the Youtube video ID (ctiJc4yEVow) and I want a screenshot of what appears at 1:32. Is there a clean and easy to implement way to do that? I have read way of using ffmpeg and some misc sloppy code, but nothing reliable.

The only thing I have seen is how to generate an image for a video, unspecific to any time.

https://i1.ytimg.com/vi//default.jpg

My issue is I need a specific time. Please help!

like image 846
jeanhules Avatar asked Oct 20 '22 22:10

jeanhules


1 Answers

I don't see any way to do this within the official API. Their Videos:list and Thumbnails pages don't offer any way to do this.

That said, you could link to the time you want, then screenshot that. This would work best with YouTube's autoplay turned off. Example link based on your post: youtube.com/watch?v=ctiJc4yEVow&t=1m32s

like image 135
Zachary Sheets Avatar answered Oct 28 '22 22:10

Zachary Sheets