How to get a thumbnail or snapshot of a youtube video at a specific “second” with Youtube javascript API?

微笑、不失礼 提交于 2019-12-05 15:56:09

问题


I want to take a thumbnail image of a youtube video, let's say http://www.youtube.com/watch?v=ffaTjpA1scI at 30s or 120s. How can I do that with youtube API?

I do think this is possible, because when I watch a Youtube video, if I move my cursor to the timeline, I can immediately see snapshots at specific time. I just want to retrieve these snapshots programmatically.

I also tried http://img.youtube.com/vi//0.jpg, actually this can get the thumbnail of course, but it cannot get a snapshots at a specific time.


回答1:


Those specific type thumbnails (used for the timeline snapshots) are not exposed via any sort of official URL scheme or API. I wouldn't recommend trying to reverse-engineer a solution, either.



来源:https://stackoverflow.com/questions/13525507/how-to-get-a-thumbnail-or-snapshot-of-a-youtube-video-at-a-specific-second-wit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!