本文介绍了如何在特定“秒"获取 YouTube 视频的缩略图或快照?使用 Youtube javascript API?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想拍摄 youtube 视频的缩略图,比如 http://www.youtube.com/watch?v=ffaTjpA1scI 在 30 或 120 秒.如何使用 youtube API 做到这一点?

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?

我确实认为这是可能的,因为当我观看 Youtube 视频时,如果我将光标移动到时间线,我可以立即看到特定时间的快照.我只想以编程方式检索这些快照.

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.

我也试过 http://img.youtube.com/vi//0.jpg,其实这个当然可以获取缩略图,但是不能获取特定时间的快照.

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.

推荐答案

那些特定类型的缩略图(用于时间线快照)不会通过任何官方 URL 方案或 API 公开.我也不建议尝试对解决方案进行逆向工程.

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.

这篇关于如何在特定“秒"获取 YouTube 视频的缩略图或快照?使用 Youtube javascript API?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 12:49
查看更多