[Feature Request] Timely high-resolution screenshot of a live stream

As far as I can tell, the only image of a stream you can grab with Twitch’s API is the thumbnail image, which is low-res and not updated that often. Which means that getting a hi-res screenshot of the current second of a stream involves grabbing the stream itself, waiting for the pre-roll ad to finish, then waiting for the stream to load and THEN grabbing a screenshot of whatever browser you are using.
If one plans to use a lot of screenshots of different streams for his or her program, going through the aforementioned steps is quite time consuming. Is it possible to add proper screenshots of a stream to the API?

Have you looked into the previews object? It has multiple sizes as well as a template for grabbing any size preview image.

You can also modify the thumbnail URL to get a higher res image. Ex: http://static-cdn.jtvnw.net/previews-ttv/live_user_CHANNELNAME-1280x720.jpg

But that doesn’t change the fact that the thumbnail image isn’t updated that often, right? I don’t see an easier way of getting a current image of a screen than the method I mentioned above.

How often would you want the thumbnail to update? What is the use case for the latest and greatest preview? I doubt we would ever add on-demand preview updates to the API since people could request a new preview image every second and absolutely wreck the API. Having said that, if there is a compelling use case, I can help push for more frequent updates to the existing images. :slight_smile:

1 Like

The images could use a little less of a cache time, I’ve seen the same thumbnail cached for several hours, and after the user has changed games several times. Something like updated every 15-30 minutes, OR cache invalidated when the user changes their stream dashboard would be nice. (Specifically the game being streamed, and possibly title since people use that to denote game variants)

My use case would be grabbing screenshots of multi-channel tournament coverage and cutting out the part of the image which shows the teams currently playing. This would allow users to see, who is playing on what stream, with one button press. I’m mainly targeting games with varying game time, where the preset schedules are usually not representative of the actual game times.
This use case obviously doesn’t require the thumbnail image to be updated every second. Every minute or two would probably work. But the current interval of ~5 minutes is too long to be useful.
If timely on-demand images of a stream are too much to handle for the API, would it be possible to limit those requests per user? Or maybe give the same preview image to multiple requests, as long as they were made in the same minute?

1 Like

+1 for shorter cache interval like 1-2min and dynamically triggered by title, created_at or game changes.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.